Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 21, 2009, 2:17:09 PM (15 years ago)
Author:
landauf
Message:

renamed plugins as modules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/libraries/cmake/TargetUtilities.cmake

    r5649 r5666  
    3535 #      NO_SOURCE_GROUPS:  Don't create msvc source groups
    3636 #      STATIC/SHARED:     Inherited from ADD_LIBRARY
    37  #      PLUGIN:            For dynamic plugin libraries
     37 #      MODULE:            For dynamic module libraries
    3838 #      WIN32:             Inherited from ADD_EXECUTABLE
    3939 #      PCH_NO_DEFAULT:    Do not make precompiled header files default if
     
    8181  SET(_switches   FIND_HEADER_FILES  EXCLUDE_FROM_ALL  ORXONOX_EXTERNAL
    8282                  NO_DLL_INTERFACE   NO_SOURCE_GROUPS  ${_additional_switches}
    83                   PCH_NO_DEFAULT     NO_INSTALL        PLUGIN)
     83                  PCH_NO_DEFAULT     NO_INSTALL        MODULE)
    8484  SET(_list_names LINK_LIBRARIES  VERSION   SOURCE_FILES  DEFINE_SYMBOL
    8585                  TOLUA_FILES     PCH_FILE  PCH_EXCLUDE OUTPUT_NAME)
     
    148148  ENDIF()
    149149
    150   # PLUGIN A, always create shared libraries
    151   IF(_arg_PLUGIN)
     150  # MODULE A
     151  # Always create shared libraries
     152  IF(_arg_MODULE)
    152153    SET(_arg_SHARED SHARED)
    153154    SET(_arg_STATIC)
     
    163164  ENDIF()
    164165
    165   # PLUGIN B
    166   IF (_arg_PLUGIN)
     166  # MODULE B
     167  IF (_arg_MODULE)
    167168    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES
    168       RUNTIME_OUTPUT_DIRECTORY ${CMAKE_PLUGIN_OUTPUT_DIRECTORY} # Windows
    169       LIBRARY_OUTPUT_DIRECTORY ${CMAKE_PLUGIN_OUTPUT_DIRECTORY} # Unix
     169      RUNTIME_OUTPUT_DIRECTORY ${CMAKE_MODULE_OUTPUT_DIRECTORY} # Windows
     170      LIBRARY_OUTPUT_DIRECTORY ${CMAKE_MODULE_OUTPUT_DIRECTORY} # Unix
    170171    )
    171     ADD_PLUGIN(${_target_name})
     172    ADD_MODULE(${_target_name})
    172173  ENDIF()
    173174
     
    200201
    201202  IF(NOT _arg_STATIC AND NOT _arg_NO_INSTALL)
    202     IF(_arg_PLUGIN)
     203    IF(_arg_MODULE)
    203204      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}
    206207      )
    207208    ELSE()
     
    216217
    217218
    218 # Creates a helper file with name <name_of_the_library>.plugin
    219 # This helps finding dynamically loadable plugins at runtime
    220 
    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
     222FUNCTION(ADD_MODULE _target)
    222223  # We use the properties to get the name because the librarys name may differ from
    223224  # the target name (for example orxonox <-> liborxonox)
     
    228229  IF(CMAKE_CONFIGURATION_TYPES)
    229230    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})
    233234
    234235      INSTALL(
    235         FILES ${_plugin_filename}
    236         DESTINATION ${ORXONOX_PLUGIN_INSTALL_PATH}
     236        FILES ${_module_filename}
     237        DESTINATION ${ORXONOX_MODULE_INSTALL_PATH}
    237238        CONFIGURATIONS ${_config}
    238239      )
    239240    ENDFOREACH()
    240241  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})
    244245
    245246    INSTALL(
    246       FILES ${_plugin_filename}
    247       DESTINATION ${ORXONOX_PLUGIN_INSTALL_PATH}
     247      FILES ${_module_filename}
     248      DESTINATION ${ORXONOX_MODULE_INSTALL_PATH}
    248249    )
    249250  ENDIF()
    250 ENDFUNCTION(ADD_PLUGIN)
     251ENDFUNCTION(ADD_MODULE)
Note: See TracChangeset for help on using the changeset viewer.