Changeset 5636
- Timestamp:
- Aug 12, 2009, 2:21:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/libraries/cmake/TargetUtilities.cmake
r5626 r5636 150 150 # PLUGIN A 151 151 IF(_arg_PLUGIN) 152 SET(_arg_PLUGIN MODULE) 153 SET(_arg_SHARED) 152 SET(_arg_SHARED MODULE) 154 153 SET(_arg_STATIC) 155 154 ENDIF() … … 157 156 # Add the library/executable 158 157 IF("${_target_type}" STREQUAL "LIBRARY") 159 ADD_LIBRARY(${_target_name} ${_arg_STATIC} ${_arg_SHARED} ${_arg_PLUGIN}158 ADD_LIBRARY(${_target_name} ${_arg_STATIC} ${_arg_SHARED} 160 159 ${_arg_EXCLUDE_FROM_ALL} ${_${_target_name}_files}) 161 160 ELSE() … … 167 166 IF (_arg_PLUGIN) 168 167 SET_TARGET_PROPERTIES(${_target_name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_PLUGIN_OUTPUT_DIRECTORY}) 169 SET_TARGET_PROPERTIES(${_target_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_PLUGIN_OUTPUT_DIRECTORY})170 168 ADD_PLUGIN(${_target_name}) 171 169 ENDIF() … … 207 205 RUNTIME DESTINATION ${ORXONOX_RUNTIME_INSTALL_PATH} 208 206 LIBRARY DESTINATION ${_library_destination} 209 #ARCHIVE DESTINATION ${ORXONOX_ARCHIVE_INSTALL_PATH}210 207 ) 211 208 ENDIF() … … 217 214 # This helps finding dynamically loadable plugins at runtime 218 215 219 FUNCTION(ADD_PLUGIN _ name)216 FUNCTION(ADD_PLUGIN _target) 220 217 # We use the properties to get the name because the librarys name may differ from 221 # the target sname (for example orxonox <-> liborxonox)222 223 GET_TARGET_PROPERTY(_target_loc ${_ name} LOCATION)218 # the target name (for example orxonox <-> liborxonox) 219 220 GET_TARGET_PROPERTY(_target_loc ${_target} LOCATION) 224 221 GET_FILENAME_COMPONENT(_target_name ${_target_loc} NAME_WE) 225 222 226 SET(_plugin_filename "${CMAKE_PLUGIN_OUTPUT_DIRECTORY}/${_target_name}.plugin") 227 228 FILE(WRITE ${_plugin_filename}) 229 230 INSTALL( 231 FILES ${_plugin_filename} 232 DESTINATION ${ORXONOX_PLUGIN_INSTALL_PATH} 233 ) 223 IF(CMAKE_CONFIGURATION_TYPES) 224 FOREACH(_config ${CMAKE_CONFIGURATION_TYPES}) 225 SET(_plugin_filename ${CMAKE_PLUGIN_OUTPUT_DIRECTORY}/${_config}/${_target_name}.plugin) 226 227 FILE(WRITE ${_plugin_filename}) 228 229 INSTALL( 230 FILES ${_plugin_filename} 231 DESTINATION ${ORXONOX_PLUGIN_INSTALL_PATH} 232 CONFIGURATIONS ${_config} 233 ) 234 ENDFOREACH() 235 ELSE() 236 SET(_plugin_filename ${CMAKE_PLUGIN_OUTPUT_DIRECTORY}/${_target_name}.plugin) 237 238 FILE(WRITE ${_plugin_filename}) 239 240 INSTALL( 241 FILES ${_plugin_filename} 242 DESTINATION ${ORXONOX_PLUGIN_INSTALL_PATH} 243 ) 244 ENDIF() 234 245 ENDFUNCTION(ADD_PLUGIN)
Note: See TracChangeset
for help on using the changeset viewer.