Changeset 5666 for code/branches/libraries/cmake
- Timestamp:
- Aug 21, 2009, 2:17:09 PM (15 years ago)
- Location:
- code/branches/libraries/cmake
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/libraries/cmake/BuildConfig.cmake
r5626 r5666 31 31 SET(DEFAULT_LIBRARY_PATH lib) 32 32 SET(DEFAULT_ARCHIVE_PATH lib/static) 33 SET(DEFAULT_ PLUGIN_PATH lib/plugins)33 SET(DEFAULT_MODULE_PATH lib/modules) 34 34 SET(DEFAULT_DOC_PATH doc) 35 35 SET(DEFAULT_MEDIA_PATH media) … … 41 41 SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_LIBRARY_PATH}) 42 42 SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_ARCHIVE_PATH}) 43 SET(CMAKE_ PLUGIN_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_PLUGIN_PATH})43 SET(CMAKE_MODULE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_MODULE_PATH}) 44 44 # Do not set doc and media, rather check in the two subdirectories 45 45 # whether they concur with the DEFAULT_..._PATH … … 72 72 ENDIF() 73 73 74 # Set the extension of the dynamic modules 75 SET(ORXONOX_MODULE_EXTENSION ".module") 74 76 75 77 ################# OGRE Plugins ################## … … 134 136 SET(ORXONOX_LIBRARY_INSTALL_PATH ${DEFAULT_LIBRARY_PATH}) 135 137 SET(ORXONOX_ARCHIVE_INSTALL_PATH ${DEFAULT_ARCHIVE_PATH}) 136 SET(ORXONOX_ PLUGIN_INSTALL_PATH ${DEFAULT_PLUGIN_PATH})138 SET(ORXONOX_MODULE_INSTALL_PATH ${DEFAULT_MODULE_PATH}) 137 139 SET(ORXONOX_DOC_INSTALL_PATH ${DEFAULT_DOC_PATH}) 138 140 SET(ORXONOX_MEDIA_INSTALL_PATH ${DEFAULT_MEDIA_PATH}) … … 145 147 SET(ORXONOX_LIBRARY_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/orxonox) 146 148 SET(ORXONOX_ARCHIVE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/orxonox/static) 147 SET(ORXONOX_ PLUGIN_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/orxonox/plugins)149 SET(ORXONOX_MODULE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/orxonox/modules) 148 150 SET(ORXONOX_DOC_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/share/doc/orxonox) 149 151 SET(ORXONOX_MEDIA_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/share/orxonox) … … 156 158 SET(ORXONOX_LIBRARY_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LIBRARY_PATH}) 157 159 SET(ORXONOX_ARCHIVE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_ARCHIVE_PATH}) 158 SET(ORXONOX_ PLUGIN_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_PLUGIN_PATH})160 SET(ORXONOX_MODULE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_MODULE_PATH}) 159 161 SET(ORXONOX_DOC_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DOC_PATH}) 160 162 SET(ORXONOX_MEDIA_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_MEDIA_PATH}) -
code/branches/libraries/cmake/TargetUtilities.cmake
r5649 r5666 35 35 # NO_SOURCE_GROUPS: Don't create msvc source groups 36 36 # STATIC/SHARED: Inherited from ADD_LIBRARY 37 # PLUGIN: For dynamic pluginlibraries37 # MODULE: For dynamic module libraries 38 38 # WIN32: Inherited from ADD_EXECUTABLE 39 39 # PCH_NO_DEFAULT: Do not make precompiled header files default if … … 81 81 SET(_switches FIND_HEADER_FILES EXCLUDE_FROM_ALL ORXONOX_EXTERNAL 82 82 NO_DLL_INTERFACE NO_SOURCE_GROUPS ${_additional_switches} 83 PCH_NO_DEFAULT NO_INSTALL PLUGIN)83 PCH_NO_DEFAULT NO_INSTALL MODULE) 84 84 SET(_list_names LINK_LIBRARIES VERSION SOURCE_FILES DEFINE_SYMBOL 85 85 TOLUA_FILES PCH_FILE PCH_EXCLUDE OUTPUT_NAME) … … 148 148 ENDIF() 149 149 150 # PLUGIN A, always create shared libraries 151 IF(_arg_PLUGIN) 150 # MODULE A 151 # Always create shared libraries 152 IF(_arg_MODULE) 152 153 SET(_arg_SHARED SHARED) 153 154 SET(_arg_STATIC) … … 163 164 ENDIF() 164 165 165 # PLUGINB166 IF (_arg_ PLUGIN)166 # MODULE B 167 IF (_arg_MODULE) 167 168 SET_TARGET_PROPERTIES(${_target_name} PROPERTIES 168 RUNTIME_OUTPUT_DIRECTORY ${CMAKE_ PLUGIN_OUTPUT_DIRECTORY} # Windows169 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_ PLUGIN_OUTPUT_DIRECTORY} # Unix169 RUNTIME_OUTPUT_DIRECTORY ${CMAKE_MODULE_OUTPUT_DIRECTORY} # Windows 170 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_MODULE_OUTPUT_DIRECTORY} # Unix 170 171 ) 171 ADD_ PLUGIN(${_target_name})172 ADD_MODULE(${_target_name}) 172 173 ENDIF() 173 174 … … 200 201 201 202 IF(NOT _arg_STATIC AND NOT _arg_NO_INSTALL) 202 IF(_arg_ PLUGIN)203 IF(_arg_MODULE) 203 204 INSTALL(TARGETS ${_target_name} 204 RUNTIME DESTINATION ${ORXONOX_ PLUGIN_INSTALL_PATH}205 LIBRARY DESTINATION ${ORXONOX_ PLUGIN_INSTALL_PATH}205 RUNTIME DESTINATION ${ORXONOX_MODULE_INSTALL_PATH} 206 LIBRARY DESTINATION ${ORXONOX_MODULE_INSTALL_PATH} 206 207 ) 207 208 ELSE() … … 216 217 217 218 218 # Creates a helper file with name <name_of_the_library>. plugin219 # This helps finding dynamically loadable plugins at runtime220 221 FUNCTION(ADD_ PLUGIN_target)219 # Creates a helper file with name <name_of_the_library>.module 220 # This helps finding dynamically loadable modules at runtime 221 222 FUNCTION(ADD_MODULE _target) 222 223 # We use the properties to get the name because the librarys name may differ from 223 224 # the target name (for example orxonox <-> liborxonox) … … 228 229 IF(CMAKE_CONFIGURATION_TYPES) 229 230 FOREACH(_config ${CMAKE_CONFIGURATION_TYPES}) 230 SET(_ plugin_filename ${CMAKE_PLUGIN_OUTPUT_DIRECTORY}/${_config}/${_target_name}.plugin)231 232 FILE(WRITE ${_ plugin_filename})231 SET(_module_filename ${CMAKE_MODULE_OUTPUT_DIRECTORY}/${_config}/${_target_name}${ORXONOX_MODULE_EXTENSION}) 232 233 FILE(WRITE ${_module_filename}) 233 234 234 235 INSTALL( 235 FILES ${_ plugin_filename}236 DESTINATION ${ORXONOX_ PLUGIN_INSTALL_PATH}236 FILES ${_module_filename} 237 DESTINATION ${ORXONOX_MODULE_INSTALL_PATH} 237 238 CONFIGURATIONS ${_config} 238 239 ) 239 240 ENDFOREACH() 240 241 ELSE() 241 SET(_ plugin_filename ${CMAKE_PLUGIN_OUTPUT_DIRECTORY}/${_target_name}.plugin)242 243 FILE(WRITE ${_ plugin_filename})242 SET(_module_filename ${CMAKE_MODULE_OUTPUT_DIRECTORY}/${_target_name}${ORXONOX_MODULE_EXTENSION}) 243 244 FILE(WRITE ${_module_filename}) 244 245 245 246 INSTALL( 246 FILES ${_ plugin_filename}247 DESTINATION ${ORXONOX_ PLUGIN_INSTALL_PATH}247 FILES ${_module_filename} 248 DESTINATION ${ORXONOX_MODULE_INSTALL_PATH} 248 249 ) 249 250 ENDIF() 250 ENDFUNCTION(ADD_ PLUGIN)251 ENDFUNCTION(ADD_MODULE)
Note: See TracChangeset
for help on using the changeset viewer.