Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 17, 2011, 5:47:22 AM (14 years ago)
Author:
rgrieder
Message:

Stripped down trunk to form a new light sandbox.

Location:
code/forks/sandbox_light/cmake/tools
Files:
10 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • code/forks/sandbox_light/cmake/tools/TargetUtilities.cmake

    r7818 r7908  
    3434 #      NO_DLL_INTERFACE:  Link statically with MSVC
    3535 #      NO_SOURCE_GROUPS:  Don't create msvc source groups
    36  #      MODULE:            For dynamic module libraries (libraries only)
    3736 #      WIN32:             Inherited from ADD_EXECUTABLE (executables only)
    3837 #      PCH_NO_DEFAULT:    Do not make precompiled header files default if
     
    4645 #      SOURCE_FILES:      Source files for the target
    4746 #      DEFINE_SYMBOL:     Sets the DEFINE_SYMBOL target property
    48  #      TOLUA_FILES:       Files with tolua interface
    4947 #      PCH_FILE:          Precompiled header file
    5048 #      PCH_EXCLUDE:       Source files to be excluded from PCH support
     
    6058INCLUDE(CMakeDependentOption)
    6159INCLUDE(CapitaliseName)
    62 INCLUDE(GenerateToluaBindings)
    6360INCLUDE(ParseMacroArguments)
    6461INCLUDE(SourceFileUtilities)
     
    8582                  NO_INSTALL         NO_VERSION        ${_additional_switches})
    8683  SET(_list_names LINK_LIBRARIES     VERSION           SOURCE_FILES
    87                   DEFINE_SYMBOL      TOLUA_FILES       PCH_FILE
     84                  DEFINE_SYMBOL      PCH_FILE
    8885                  PCH_EXCLUDE        OUTPUT_NAME)
    8986
     
    165162  LIST(REMOVE_DUPLICATES _${_target_name}_files)
    166163
    167   # TOLUA_FILES
    168   IF(_arg_TOLUA_FILES)
    169     GENERATE_TOLUA_BINDINGS(${_target_name_capitalised} _${_target_name}_files
    170                             INPUTFILES ${_arg_TOLUA_FILES})
    171   ENDIF()
    172 
    173164  # First part (pre target) of precompiled header files
    174165  IF(PCH_COMPILER_SUPPORT AND _arg_PCH_FILE)
     
    258249  ENDIF()
    259250
    260   # Configure modules
    261   IF (_arg_MODULE)
    262     SET_TARGET_PROPERTIES(${_target_name} PROPERTIES
    263       RUNTIME_OUTPUT_DIRECTORY ${CMAKE_MODULE_OUTPUT_DIRECTORY} # Windows
    264       LIBRARY_OUTPUT_DIRECTORY ${CMAKE_MODULE_OUTPUT_DIRECTORY} # Unix
    265     )
    266     ADD_MODULE(${_target_name})
    267     # Ensure that the main program depends on the module
    268     SET(ORXONOX_MODULES ${ORXONOX_MODULES} ${_target_name} CACHE STRING "" FORCE)
    269   ENDIF()
    270 
    271251  # Static library flags are not globally available
    272252  IF(ORXONOX_STATIC_LINKER_FLAGS)
     
    306286  # Install all targets except for static ones (executables also have SHARED in _link_mode)
    307287  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    )
    319292  ENDIF()
    320293
    321294ENDMACRO(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 runtime
    326 
    327 FUNCTION(ADD_MODULE _target)
    328   # We use the properties to get the name because the librarys name may differ from
    329   # 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.