Revision: 1406
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1406&view=rev
Author: rorthomas
Date: 2010-06-20 22:46:19 +0000 (Sun, 20 Jun 2010)
Log Message:
-----------
improved windows building, for dependency archive 7
boost and wxwidgets not required to be installed anymore
Modified Paths:
--------------
trunk/CMakeDependenciesConfig.txt
trunk/source/configurator/CMakeLists.txt
trunk/source/installer/CMakeLists.txt
trunk/source/main/CMakeLists.txt
Modified: trunk/CMakeDependenciesConfig.txt
===================================================================
--- trunk/CMakeDependenciesConfig.txt 2010-06-18 22:23:34 UTC (rev 1405)
+++ trunk/CMakeDependenciesConfig.txt 2010-06-20 22:46:19 UTC (rev 1406)
@@ -36,9 +36,8 @@
set(Ois_LIBRARY_DIRS "${ROR_DEPENDENCIES_DIR}/lib" CACHE PATH
"The OIS lib path to use")
set(Ois_LIBRARIES "ois" CACHE STRING "The ogre lib to link
against")
- set(BOOST_PATH "C:/Program Files/boost/boost_1_39" CACHE PATH
"The BOOST root path to use")
- include_directories(${BOOST_PATH})
- link_directories (${BOOST_PATH}/lib)
+ set(BOOST_INCLUDE_DIRS "${ROR_DEPENDENCIES_DIR}/include/boost"
CACHE PATH "The BOOST include path to use")
+ set(BOOST_LIBRARY_DIRS "${ROR_DEPENDENCIES_DIR}/lib/boost"
CACHE PATH "The BOOST lib path to use")
set(PThread_INCLUDE_DIRS
"${ROR_DEPENDENCIES_DIR}/include/pthread" CACHE PATH "The pthread include path
to use")
set(PThread_LIBRARY_DIRS "${ROR_DEPENDENCIES_DIR}/lib" CACHE
PATH "The pthread lib path to use")
@@ -114,7 +113,17 @@
set(HYDRAX_LIBRARIES "Hydrax.lib" CACHE STRING "The
Hydrax lib to link against")
endif(ROR_USE_HYDRAX)
+ if(ROR_BUILD_CONFIGURATOR)
+ set(WXWIDGETS_SHARED_INCLUDE_DIRS
"${ROR_DEPENDENCIES_DIR}/include/wxWidgets" CACHE PATH "The wxWidgets (shared)
include paths to use")
+ set(WXWIDGETS_SHARED_LIBRARY_DIRS
"${ROR_DEPENDENCIES_DIR}/lib/wx/shared" CACHE PATH "The wxWidgets (shared) lib
path to use")
+ set(WXWIDGETS_SHARED_LIBRARIES
"wxbase29u.lib;wxmsw29u_core.lib;wxmsw29u_html.lib;wxbase29u_net.lib;wxmsw29u_adv.lib;wxpng.lib;wxtiff.lib;wxjpeg.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;winmm;comctl32;rpcrt4;wsock32"
CACHE STRING "The wxWidgets(shared) libs to link against")
+ endif(ROR_BUILD_CONFIGURATOR)
+ if(ROR_BUILD_INSTALLER)
+ set(WXWIDGETS_STATIC_INCLUDE_DIRS
"${ROR_DEPENDENCIES_DIR}/include/wxWidgets" CACHE PATH "The wxWidgets (static)
include paths to use")
+ set(WXWIDGETS_STATIC_LIBRARY_DIRS
"${ROR_DEPENDENCIES_DIR}/lib/wx/static" CACHE PATH "The wxWidgets (static) lib
path to use")
+ set(WXWIDGETS_STATIC_LIBRARIES
"wxbase29u.lib;wxmsw29u_core.lib;wxmsw29u_html.lib;wxmsw29u_adv.lib;wxbase29u_net.lib;wxpng.lib;wxtiff.lib;wxjpeg.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;winmm;comctl32;rpcrt4;wsock32"
CACHE STRING "The wxWidgets(shared) libs to link against")
+ endif(ROR_BUILD_INSTALLER)
ELSEIF(UNIX)
find_package(PkgConfig)
PKG_CHECK_MODULES (GTK gtk+-2.0 REQUIRED)
Modified: trunk/source/configurator/CMakeLists.txt
===================================================================
--- trunk/source/configurator/CMakeLists.txt 2010-06-18 22:23:34 UTC (rev
1405)
+++ trunk/source/configurator/CMakeLists.txt 2010-06-20 22:46:19 UTC (rev
1406)
@@ -1,18 +1,13 @@
project(RoR_Configurator)
-# find wxWidgets
-SET(wxWidgets_USE_UNICODE ON)
-FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS base core html net adv)
-include_directories(${wxWidgets_INCLUDE_DIRS})
-add_definitions("-D${wxWidgets_DEFINITIONS}" ${wxWidgets_CXX_FLAGS})
-link_directories (${wxWidgets_LIB_DIR})
-
IF(WIN32)
- include_directories(${BOOST_PATH})
- link_directories (${BOOST_PATH}/lib)
+ include_directories(${BOOST_INCLUDE_DIRS})
+ link_directories (${BOOST_LIBRARY_DIRS})
include_directories(${PThread_INCLUDE_DIRS})
link_directories (${PThread_LIBRARY_DIRS})
-
+ include_directories(${WXWIDGETS_SHARED_INCLUDE_DIRS})
+ link_directories (${WXWIDGETS_SHARED_LIBRARY_DIRS})
+
set(OS_LIBS "${PThread_LIBRARIES} dinput8.lib dxguid.lib")
set(OS_SOURCE "icon.rc")
@@ -53,5 +48,7 @@
add_executable(rorconfig ${sources} ${headers} ${OS_SOURCE}
../main/InputEngine.cpp)
windows_hacks(rorconfig)
-TARGET_LINK_LIBRARIES(rorconfig ${wxWidgets_LIBRARIES} ${Ogre_LIBRARIES}
${Ois_LIBRARIES} ${OS_LIBS})
+TARGET_LINK_LIBRARIES(rorconfig ${WXWIDGETS_SHARED_LIBRARIES}
${Ogre_LIBRARIES} ${Ois_LIBRARIES} ${OS_LIBS})
+
+
Modified: trunk/source/installer/CMakeLists.txt
===================================================================
--- trunk/source/installer/CMakeLists.txt 2010-06-18 22:23:34 UTC (rev
1405)
+++ trunk/source/installer/CMakeLists.txt 2010-06-20 22:46:19 UTC (rev
1406)
@@ -4,18 +4,6 @@
set(source_files ConfigManager.cpp wizard.cpp wthread.cpp cevent.cpp
symlink.cpp wxStrel.cpp utils.cpp threadpool.cpp wsyncdownload.cpp
installerlog.cpp SHA1.cpp)
set(include_files ConfigManager.h wizard.h wxStrel.h wthread.h cevent.h
symlink.h utils.h)
-SET(wxWidgets_USE_UNICODE ON)
-#SET(wxWidgets_USE_STATIC ON)
-
-set(Boost_USE_STATIC_LIBS ON)
-set(Boost_USE_MULTITHREADED ON)
-find_package( Boost 1.3 COMPONENTS date_time filesystem system regex )
-
-if(Boost_FOUND)
-else()
- message(" !!! boost not found!")
-endif()
-
IF(WIN32)
set(INSTALLER_PLATFORM "win32" CACHE PATH "Installer chosen platform")
ENDIF(WIN32)
@@ -23,79 +11,50 @@
set(INSTALLER_PLATFORM "ubuntu9.10" CACHE PATH "Installer chosen platform")
ENDIF(UNIX)
-FIND_PACKAGE(wxWidgets COMPONENTS base core html net adv )
-IF(wxWidgets_FOUND)
- include_directories(${wxWidgets_INCLUDE_DIRS})
- add_definitions(${wxWidgets_DEFINITIONS} ${wxWidgets_CXX_FLAGS})
- add_definitions("-DINSTALLER_PLATFORM=\"${INSTALLER_PLATFORM}\"")
- #message("the default installer platform is \"${INSTALLER_PLATFORM}\". To
change this, edit INSTALLER_PLATFORM value in cmake.")
- include_directories(${Boost_INCLUDE_DIRS})
+include_directories(${WXWIDGETS_STATIC_INCLUDE_DIRS})
+add_definitions("-DINSTALLER_PLATFORM=\"${INSTALLER_PLATFORM}\"")
+#message("the default installer platform is \"${INSTALLER_PLATFORM}\". To
change this, edit INSTALLER_PLATFORM value in cmake.")
+include_directories(${BOOST_INCLUDE_DIRS})
+link_directories (${BOOST_LIBRARY_DIRS})
- IF(WIN32)
- include_directories(${wxWidgets_INCLUDE_DIRS}/msvc)
- include_directories("C:\\wxWidgets-2.9.0-static\\include
C:\\wxWidgets-2.9.0-static\\include\\msvc")
- add_definitions("-D__WIN32__ -D_CRT_SECURE_NO_WARNINGS -DPLATFORM=1
-DWIN32_LEAN_AND_MEAN")
-
- link_directories ("C:\\Program Files\\boost\\boost_1_39\\lib")
- link_directories ("C:\\Program Files (x86)\\boost\\boost_1_39\\lib")
+IF(WIN32)
+ add_definitions("-D__WIN32__ -D_CRT_SECURE_NO_WARNINGS -DPLATFORM=1
-DWIN32_LEAN_AND_MEAN")
+ link_directories ("C:\\Program Files\\boost\\boost_1_39\\lib")
+ link_directories ("C:\\Program Files (x86)\\boost\\boost_1_39\\lib")
link_directories ("C:\\wxWidgets-2.9.0-static\\lib\\vc_lib")
- ENDIF(WIN32)
- IF(UNIX)
- add_definitions("-DPLATFORM=2")
- FIND_PACKAGE(PkgConfig REQUIRED)
- PKG_CHECK_MODULES(GTK gtk+-2.0 REQUIRED)
- INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS})
- link_directories (${wxWidgets_LIB_DIR})
- ENDIF(UNIX)
- include_directories(${Boost_INCLUDE_DIRS})
+ENDIF(WIN32)
+IF(UNIX)
+ add_definitions("-DPLATFORM=2")
+ FIND_PACKAGE(PkgConfig REQUIRED)
+ PKG_CHECK_MODULES(GTK gtk+-2.0 REQUIRED)
+ INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS})
+ link_directories (${wxWidgets_LIB_DIR})
+ENDIF(UNIX)
+add_definitions("-DNOOGRE -D_UNICODE")
- add_definitions("-DNOOGRE -D_UNICODE")
+# always use no debug, otherwise we cannot link against the wxWidgets lib
(that used no debug mode on compile time)
+add_definitions("-DNDEBUG")
- # always use no debug, otherwise we cannot link against the wxWidgets lib
(that used no debug mode on compile time)
- add_definitions("-DNDEBUG")
+#add_definitions("${CMAKE_WXWINDOWS_CXX_FLAGS}")
- #add_definitions("${CMAKE_WXWINDOWS_CXX_FLAGS}")
+add_executable(installer ${source_files} ${include_files} ${resource_files})
+windows_hacks(installer)
- add_executable(installer ${source_files} ${include_files} ${resource_files})
- windows_hacks(installer)
-
- # we dont need to add ${Boost_LIBRARIES} here, could be wrong as well ...
+# we dont need to add ${Boost_LIBRARIES} here, could be wrong as well ...
- IF(WIN32)
- SET_TARGET_PROPERTIES(installer PROPERTIES COMPILE_FLAGS "/bigobj /MT /MP")
- SET_TARGET_PROPERTIES(installer PROPERTIES LINK_FLAGS
"/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\"
/SUBSYSTEM:WINDOWS /NODEFAULTLIB:\"msvcprt.lib\" /NODEFAULTLIB:\"MSVCRT.lib\"")
+IF(WIN32)
+ SET_TARGET_PROPERTIES(installer PROPERTIES COMPILE_FLAGS "/bigobj /MT
/MP")
+ SET_TARGET_PROPERTIES(installer PROPERTIES LINK_FLAGS
"/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\"
/SUBSYSTEM:WINDOWS /NODEFAULTLIB:\"msvcprt.lib\" /NODEFAULTLIB:\"MSVCRT.lib\"")
+ TARGET_LINK_LIBRARIES(installer ${WXWIDGETS_STATIC_LIBRARIES})
+ELSE(WIN32)
+ #TARGET_LINK_LIBRARIES(installer ${Boost_LIBRARIES})
+ #TARGET_LINK_LIBRARIES(installer ${wxWidgets_LIBRARIES})
+ENDIF(WIN32)
+# already in correct path, no need to install at all!
+#install(TARGETS rorconfig DESTINATION ${BIN_DIR})
- TARGET_LINK_LIBRARIES(installer
-wxbase29u.lib
-wxmsw29u_core.lib
-wxmsw29u_html.lib
-wxmsw29u_adv.lib
-wxbase29u_net.lib
-wxpng.lib
-wxtiff.lib
-wxjpeg.lib
-wxzlib.lib
-wxregexu.lib
-wxexpat.lib
-winmm
-comctl32
-rpcrt4
-wsock32
- )
- ELSE(WIN32)
- TARGET_LINK_LIBRARIES(installer ${Boost_LIBRARIES})
- TARGET_LINK_LIBRARIES(installer ${wxWidgets_LIBRARIES})
- ENDIF(WIN32)
- # already in correct path, no need to install at all!
- #install(TARGETS rorconfig DESTINATION ${BIN_DIR})
-
-ELSE(wxWidgets_FOUND)
- MESSAGE("wxWidgets not found. Will not build the installer.")
-ENDIF(wxWidgets_FOUND)
-
-
Modified: trunk/source/main/CMakeLists.txt
===================================================================
--- trunk/source/main/CMakeLists.txt 2010-06-18 22:23:34 UTC (rev 1405)
+++ trunk/source/main/CMakeLists.txt 2010-06-20 22:46:19 UTC (rev 1406)
@@ -21,6 +21,8 @@
# config below
IF(WIN32)
+ include_directories(${BOOST_INCLUDE_DIRS})
+ link_directories (${BOOST_LIBRARY_DIRS})
include_directories(${PThread_INCLUDE_DIRS})
link_directories (${PThread_LIBRARY_DIRS})
set(OS_LIBS "${PThread_LIBRARIES} dinput8.lib dxguid.lib")
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel