Changeset 7908 for code/forks/sandbox_light/cmake
- Timestamp:
- Feb 17, 2011, 5:47:22 AM (14 years ago)
- Location:
- code/forks/sandbox_light/cmake
- Files:
-
- 10 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/forks/sandbox_light/cmake/InstallConfig.cmake
r7163 r7908 43 43 SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LIBRARY_PATH}) 44 44 SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_ARCHIVE_PATH}) 45 SET(MODULE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_MODULE_PATH})46 45 SET(DOC_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DOC_PATH}) 47 46 SET(DATA_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DATA_PATH}) … … 55 54 SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/games/orxonox) 56 55 SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/games/orxonox/static) 57 SET(MODULE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/games/orxonox/modules)58 56 SET(DOC_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/doc/orxonox) 59 57 SET(DATA_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/games/orxonox) -
code/forks/sandbox_light/cmake/LibraryConfig.cmake
r7459 r7908 93 93 # Performs the search and sets the variables # 94 94 95 FIND_PACKAGE(OGRE 1.4 REQUIRED) 96 #FIND_PACKAGE(ENet 1.1 REQUIRED) 97 FIND_PACKAGE(Ogg REQUIRED) 98 FIND_PACKAGE(Vorbis REQUIRED) 99 FIND_PACKAGE(ALUT REQUIRED) 100 FIND_PACKAGE(ZLIB REQUIRED) 101 IF(POCO_REQUIRED) 102 FIND_PACKAGE(POCO REQUIRED) 103 ENDIF() 95 #FIND_PACKAGE(POCO REQUIRED) 104 96 IF(WIN32) 105 97 FIND_PACKAGE(DbgHelp) 106 FIND_PACKAGE(DirectX REQUIRED)107 98 ENDIF() 108 109 ##### CEGUI #####110 # We make use of the CEGUI script module called CEGUILua.111 # However there is a small issue with that: We use Tolua, a C++ binding112 # generator ourselves. And we also have to use our bindings in the same113 # lua state is CEGUILua's. Unfortunately this implies that both lua runtime114 # version are equal or else you get segmentation faults.115 # In order to match the Lua versions we decided to ship CEGUILua in our116 # repository, mainly because there is no way to determine which version of117 # Lua CEGUILua was linked against (you'd have to specify yourself) and secondly118 # because we can then choose the Lua version. Future plans might involve only119 # accepting Lua 5.1.120 121 # Insert all internally supported CEGUILua versions here122 SET(CEGUILUA_INTERNAL_SUPPORT 0.5.0 0.6.0 0.6.1 0.6.2)123 OPTION(CEGUILUA_USE_EXTERNAL_LIBRARY "Force the use of external CEGUILua library" OFF)124 FIND_PACKAGE(CEGUI 0.5 REQUIRED)125 126 ##### Lua #####127 IF(CEGUILUA_USE_EXTERNAL_LIBRARY)128 COMPARE_VERSION_STRINGS(${CEGUI_VERSION} "0.6" _version_comparison)129 IF(version_comparison LESS 0)130 SET(LUA_VERSION_REQUEST 5.0)131 ELSE()132 SET(LUA_VERSION_REQUEST 5.1)133 ENDIF()134 ELSE()135 SET(LUA_VERSION_REQUEST 5)136 ENDIF()137 FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED)138 139 ##### OpenAL #####140 FIND_PACKAGE(OpenAL REQUIRED)141 # Also use parent include dir (without AL/) for ALUT142 IF(OPENAL_INCLUDE_DIR MATCHES "/AL$")143 GET_FILENAME_COMPONENT(ALT_OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} PATH)144 ENDIF()145 SET(OPENAL_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR} ${ALT_OPENAL_INCLUDE_DIR})146 # Notfiy user147 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)148 # Hide variables created by the script149 MARK_AS_ADVANCED(OPENAL_INCLUDE_DIR OPENAL_LIBRARY)150 151 ##### Tcl #####152 # We only require Tcl, so avoid confusing user about other Tcl stuff by153 # applying a little workaround154 SET(Tclsh_FIND_QUIETLY TRUE)155 FIND_PACKAGE(TCL QUIET)156 # Display messages separately157 SET(TCL_FIND_QUIETLY FALSE)158 FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH)159 99 160 100 ##### Boost ##### … … 176 116 IF(WIN32) 177 117 OPTION(LINK_BOOST_DYNAMIC "Link Boost dynamically on Windows" TRUE) 178 OPTION(LINK_CEGUI_DYNAMIC "Link CEGUI dynamicylly on Windows" TRUE)179 #OPTION(LINK_ENET_DYNAMIC "Link ENet dynamically on Windows" TRUE)180 OPTION(LINK_OGRE_DYNAMIC "Link OGRE dynamically on Windows" TRUE)181 OPTION(LINK_TCL_DYNAMIC "Link TCL dynamically on Windows" TRUE)182 OPTION(LINK_ZLIB_DYNAMIC "Link ZLib dynamically on Windows" TRUE)183 COMPARE_VERSION_STRINGS("${LUA_VERSION}" "5.1" _version_comparison)184 IF(_version_comparison LESS 0)185 OPTION(LINK_LUA_DYNAMIC "Link Lua dynamically on Windows" FALSE)186 ELSE(_version_comparison LESS 0)187 OPTION(LINK_LUA_DYNAMIC "Link Lua dynamically on Windows" TRUE)188 ENDIF(_version_comparison LESS 0)189 118 190 119 IF(DEPENDENCY_PACKAGE_ENABLE) 191 MARK_AS_ADVANCED( 192 LINK_BOOST_DYNAMIC LINK_CEGUI_DYNAMIC #LINK_ENET_DYNAMIC 193 LINK_OGRE_DYNAMIC LINK_TCL_DYNAMIC LINK_ZLIB_DYNAMIC 194 LINK_LUA_DYNAMIC 195 ) 120 MARK_AS_ADVANCED(LINK_BOOST_DYNAMIC) 196 121 ENDIF() 197 122 ENDIF(WIN32) 198 199 200 ################# OGRE Plugins ##################201 202 # More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager203 SET(OGRE_PLUGINS_INT Plugin_ParticleFX)204 IF(WIN32)205 # CG program manager is probably DirectX related (not available under unix)206 LIST(APPEND OGRE_PLUGINS_INT Plugin_CgProgramManager)207 ENDIF(WIN32)208 SET(OGRE_PLUGINS ${OGRE_PLUGINS_INT} CACHE STRING209 "Specify which OGRE plugins to load. Existance check is performed.")210 211 # Check the plugins and determine the plugin folder212 # You can give a hint by setting the environment variable ENV{OGRE_PLUGIN_DIR}213 INCLUDE(CheckOGREPlugins)214 CHECK_OGRE_PLUGINS(${OGRE_PLUGINS})215 -
code/forks/sandbox_light/cmake/LibraryConfigTardis.cmake
r6746 r7908 72 72 LIST(APPEND CMAKE_LIBRARY_PATH "/usr/pack/ogre-1.6.1-sd/i686-debian-linux5.0") 73 73 74 #SET(ENV{CEGUIDIR} "/usr/pack/cegui-0.6.2-sd;/usr/pack/cegui-0.6.2-sd/i686-debian-linux5.0")75 #SET(ENV{ENETDIR} "/usr/pack/enet-1.2-sd;/usr/pack/enet-1.2-sd/i686-debian-linux4.0")76 #SET(ENV{ALUTDIR} "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")77 #SET(ENV{OGGDIR} "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0")78 #SET(ENV{VORBISDIR} "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0")79 #SET(ENV{LUA_DIR} "/usr/pack/lua-5.1.4-sd;/usr/pack/lua-5.1.4-sd/i686-debian-linux4.0")80 #SET(ENV{OGRE_HOME} "/usr/pack/ogre-1.4.9-sd;/usr/pack/ogre-1.4.9-sd/i686-debian-linux4.0")81 #SET(ENV{OPENALDIR} "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")82 #SET(TCL_INCLUDE_PATH "/usr/pack/tcltk-8.4.9.linux-mo/include")83 74 ENDIF(TARDIS) -
code/forks/sandbox_light/cmake/PackageConfig.cmake
r7459 r7908 78 78 79 79 # Include paths and other special treatments 80 SET(ENV{ALUTDIR} ${DEP_INCLUDE_DIR}/freealut)81 80 SET(ENV{BOOST_ROOT} ${DEP_INCLUDE_DIR}/boost) 82 SET(ENV{CEGUIDIR} ${DEP_INCLUDE_DIR}/cegui)83 81 SET(ENV{DBGHELP_DIR} ${DEP_INCLUDE_DIR}/dbghelp) 84 SET(ENV{DXSDK_DIR} ${DEP_INCLUDE_DIR}/directx)85 #SET(ENV{ENETDIR} ${DEP_INCLUDE_DIR}/enet)86 SET(ENV{LUA_DIR} ${DEP_INCLUDE_DIR}/lua)87 SET(ENV{OGGDIR} ${DEP_INCLUDE_DIR}/libogg)88 SET(ENV{VORBISDIR} ${DEP_INCLUDE_DIR}/libvorbis)89 SET(ENV{OGRE_HOME} ${DEP_INCLUDE_DIR}/ogre)90 SET(ENV{OGRE_PLUGIN_DIR} ${DEP_BINARY_DIR})91 SET(ENV{OPENALDIR} ${DEP_INCLUDE_DIR}/openal)92 82 SET(ENV{POCODIR} ${DEP_INCLUDE_DIR}/poco) 93 LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl/include)94 LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib/include)95 83 96 84 ### INSTALL ### 97 98 # Tcl script library99 INSTALL(100 DIRECTORY ${DEP_LIBRARY_DIR}/tcl/101 DESTINATION lib/tcl102 )103 85 104 86 # On Windows, DLLs have to be in the executable folder, install them -
code/forks/sandbox_light/cmake/PackageConfigMSVC.cmake
r7818 r7908 54 54 # Certain find scripts don't behave as ecpected to we have 55 55 # to specify the libraries ourselves. 56 SET(TCL_LIBRARY ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "") 57 SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib CACHE FILEPATH "") 56 #SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib CACHE FILEPATH "") 58 57 59 58 ENDIF(MSVC) -
code/forks/sandbox_light/cmake/PackageConfigMinGW.cmake
r5781 r7908 47 47 # Certain find scripts don't behave as ecpected to we have 48 48 # to specify the libraries ourselves. 49 SET(TCL_LIBRARY ${DEP_BINARY_DIR}/tcl85.dll CACHE FILEPATH "") 50 SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "") 49 #SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "") 51 50 52 51 ENDIF(MINGW) -
code/forks/sandbox_light/cmake/tools/TargetUtilities.cmake
r7818 r7908 34 34 # NO_DLL_INTERFACE: Link statically with MSVC 35 35 # NO_SOURCE_GROUPS: Don't create msvc source groups 36 # MODULE: For dynamic module libraries (libraries only)37 36 # WIN32: Inherited from ADD_EXECUTABLE (executables only) 38 37 # PCH_NO_DEFAULT: Do not make precompiled header files default if … … 46 45 # SOURCE_FILES: Source files for the target 47 46 # DEFINE_SYMBOL: Sets the DEFINE_SYMBOL target property 48 # TOLUA_FILES: Files with tolua interface49 47 # PCH_FILE: Precompiled header file 50 48 # PCH_EXCLUDE: Source files to be excluded from PCH support … … 60 58 INCLUDE(CMakeDependentOption) 61 59 INCLUDE(CapitaliseName) 62 INCLUDE(GenerateToluaBindings)63 60 INCLUDE(ParseMacroArguments) 64 61 INCLUDE(SourceFileUtilities) … … 85 82 NO_INSTALL NO_VERSION ${_additional_switches}) 86 83 SET(_list_names LINK_LIBRARIES VERSION SOURCE_FILES 87 DEFINE_SYMBOL TOLUA_FILESPCH_FILE84 DEFINE_SYMBOL PCH_FILE 88 85 PCH_EXCLUDE OUTPUT_NAME) 89 86 … … 165 162 LIST(REMOVE_DUPLICATES _${_target_name}_files) 166 163 167 # TOLUA_FILES168 IF(_arg_TOLUA_FILES)169 GENERATE_TOLUA_BINDINGS(${_target_name_capitalised} _${_target_name}_files170 INPUTFILES ${_arg_TOLUA_FILES})171 ENDIF()172 173 164 # First part (pre target) of precompiled header files 174 165 IF(PCH_COMPILER_SUPPORT AND _arg_PCH_FILE) … … 258 249 ENDIF() 259 250 260 # Configure modules261 IF (_arg_MODULE)262 SET_TARGET_PROPERTIES(${_target_name} PROPERTIES263 RUNTIME_OUTPUT_DIRECTORY ${CMAKE_MODULE_OUTPUT_DIRECTORY} # Windows264 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_MODULE_OUTPUT_DIRECTORY} # Unix265 )266 ADD_MODULE(${_target_name})267 # Ensure that the main program depends on the module268 SET(ORXONOX_MODULES ${ORXONOX_MODULES} ${_target_name} CACHE STRING "" FORCE)269 ENDIF()270 271 251 # Static library flags are not globally available 272 252 IF(ORXONOX_STATIC_LINKER_FLAGS) … … 306 286 # Install all targets except for static ones (executables also have SHARED in _link_mode) 307 287 IF(${_link_mode} STREQUAL "SHARED" AND NOT _arg_NO_INSTALL) 308 IF(_arg_MODULE) 309 INSTALL(TARGETS ${_target_name} 310 RUNTIME DESTINATION ${MODULE_INSTALL_DIRECTORY} 311 LIBRARY DESTINATION ${MODULE_INSTALL_DIRECTORY} 312 ) 313 ELSE() 314 INSTALL(TARGETS ${_target_name} 315 RUNTIME DESTINATION ${RUNTIME_INSTALL_DIRECTORY} 316 LIBRARY DESTINATION ${LIBRARY_INSTALL_DIRECTORY} 317 ) 318 ENDIF() 288 INSTALL(TARGETS ${_target_name} 289 RUNTIME DESTINATION ${RUNTIME_INSTALL_DIRECTORY} 290 LIBRARY DESTINATION ${LIBRARY_INSTALL_DIRECTORY} 291 ) 319 292 ENDIF() 320 293 321 294 ENDMACRO(TU_ADD_TARGET) 322 323 324 # Creates a helper file with name <name_of_the_library>${ORXONOX_MODULE_EXTENSION}325 # This helps finding dynamically loadable modules at runtime326 327 FUNCTION(ADD_MODULE _target)328 # We use the properties to get the name because the librarys name may differ from329 # the target name (for example orxonox <-> liborxonox)330 331 GET_TARGET_PROPERTY(_target_loc ${_target} LOCATION)332 GET_FILENAME_COMPONENT(_target_name ${_target_loc} NAME_WE)333 334 IF(CMAKE_CONFIGURATION_TYPES)335 FOREACH(_config ${CMAKE_CONFIGURATION_TYPES})336 SET(_module_filename ${CMAKE_MODULE_OUTPUT_DIRECTORY}/${_config}/${_target_name}${ORXONOX_MODULE_EXTENSION})337 338 FILE(WRITE ${_module_filename})339 340 INSTALL(341 FILES ${_module_filename}342 DESTINATION ${MODULE_INSTALL_DIRECTORY}343 CONFIGURATIONS ${_config}344 )345 ENDFOREACH()346 ELSE()347 SET(_module_filename ${CMAKE_MODULE_OUTPUT_DIRECTORY}/${_target_name}${ORXONOX_MODULE_EXTENSION})348 349 FILE(WRITE ${_module_filename})350 351 INSTALL(352 FILES ${_module_filename}353 DESTINATION ${MODULE_INSTALL_DIRECTORY}354 )355 ENDIF()356 ENDFUNCTION(ADD_MODULE)
Note: See TracChangeset
for help on using the changeset viewer.