[Orxonox-commit 5889] r10548 - code/branches/core7/cmake/tools
landauf at orxonox.net
landauf at orxonox.net
Wed Aug 26 22:09:44 CEST 2015
Author: landauf
Date: 2015-08-26 22:09:43 +0200 (Wed, 26 Aug 2015)
New Revision: 10548
Modified:
code/branches/core7/cmake/tools/TargetUtilities.cmake
Log:
write the module's name into the .module/.plugin file
Modified: code/branches/core7/cmake/tools/TargetUtilities.cmake
===================================================================
--- code/branches/core7/cmake/tools/TargetUtilities.cmake 2015-08-23 09:57:53 UTC (rev 10547)
+++ code/branches/core7/cmake/tools/TargetUtilities.cmake 2015-08-26 20:09:43 UTC (rev 10548)
@@ -469,24 +469,24 @@
# Creates a helper file with name <name_of_the_library>.<extension>
# This helps finding dynamically loadable modules or plugins at runtime
-FUNCTION(ADD_MODULE_OR_PLUGIN _target _output_dir _install_dir _extension)
+FUNCTION(ADD_MODULE_OR_PLUGIN _target_name _output_dir _install_dir _extension)
# We use the properties to get the name because the librarys name may differ from
# the target name (for example orxonox <-> liborxonox)
IF (POLICY CMP0026)
CMAKE_POLICY(PUSH)
CMAKE_POLICY(SET CMP0026 OLD) # we only use the file's name, not its actual location, so the old policy is fine
ENDIF()
- GET_TARGET_PROPERTY(_target_loc ${_target} LOCATION)
- GET_FILENAME_COMPONENT(_target_name ${_target_loc} NAME_WE)
+ GET_TARGET_PROPERTY(_target_loc ${_target_name} LOCATION)
+ GET_FILENAME_COMPONENT(_target_filename ${_target_loc} NAME_WE)
IF (POLICY CMP0026)
CMAKE_POLICY(POP) # set policy back to original settings
ENDIF()
IF(CMAKE_CONFIGURATION_TYPES)
FOREACH(_config ${CMAKE_CONFIGURATION_TYPES})
- SET(_helper_filename ${_output_dir}/${_config}/${_target_name}${_extension})
+ SET(_helper_filename ${_output_dir}/${_config}/${_target_filename}${_extension})
- FILE(WRITE ${_helper_filename})
+ FILE(WRITE ${_helper_filename} ${_target_name})
INSTALL(
FILES ${_helper_filename}
@@ -495,9 +495,9 @@
)
ENDFOREACH()
ELSE()
- SET(_helper_filename ${_output_dir}/${_target_name}${_extension})
+ SET(_helper_filename ${_output_dir}/${_target_filename}${_extension})
- FILE(WRITE ${_helper_filename})
+ FILE(WRITE ${_helper_filename} ${_target_name})
INSTALL(
FILES ${_helper_filename}
More information about the Orxonox-commit
mailing list