Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10548 for code/branches/core7


Ignore:
Timestamp:
Aug 26, 2015, 10:09:43 PM (9 years ago)
Author:
landauf
Message:

write the module's name into the .module/.plugin file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/cmake/tools/TargetUtilities.cmake

    r10547 r10548  
    470470# This helps finding dynamically loadable modules or plugins at runtime
    471471
    472 FUNCTION(ADD_MODULE_OR_PLUGIN _target _output_dir _install_dir _extension)
     472FUNCTION(ADD_MODULE_OR_PLUGIN _target_name _output_dir _install_dir _extension)
    473473  # We use the properties to get the name because the librarys name may differ from
    474474  # the target name (for example orxonox <-> liborxonox)
     
    477477    CMAKE_POLICY(SET CMP0026 OLD) # we only use the file's name, not its actual location, so the old policy is fine
    478478  ENDIF()
    479   GET_TARGET_PROPERTY(_target_loc ${_target} LOCATION)
    480   GET_FILENAME_COMPONENT(_target_name ${_target_loc} NAME_WE)
     479  GET_TARGET_PROPERTY(_target_loc ${_target_name} LOCATION)
     480  GET_FILENAME_COMPONENT(_target_filename ${_target_loc} NAME_WE)
    481481  IF (POLICY CMP0026)
    482482    CMAKE_POLICY(POP) # set policy back to original settings
     
    485485  IF(CMAKE_CONFIGURATION_TYPES)
    486486    FOREACH(_config ${CMAKE_CONFIGURATION_TYPES})
    487       SET(_helper_filename ${_output_dir}/${_config}/${_target_name}${_extension})
    488 
    489       FILE(WRITE ${_helper_filename})
     487      SET(_helper_filename ${_output_dir}/${_config}/${_target_filename}${_extension})
     488
     489      FILE(WRITE ${_helper_filename} ${_target_name})
    490490
    491491      INSTALL(
     
    496496    ENDFOREACH()
    497497  ELSE()
    498     SET(_helper_filename ${_output_dir}/${_target_name}${_extension})
    499 
    500     FILE(WRITE ${_helper_filename})
     498    SET(_helper_filename ${_output_dir}/${_target_filename}${_extension})
     499
     500    FILE(WRITE ${_helper_filename} ${_target_name})
    501501
    502502    INSTALL(
Note: See TracChangeset for help on using the changeset viewer.