[Orxonox-commit 7081] r11698 - code/trunk/src

landauf at orxonox.net landauf at orxonox.net
Wed Jan 3 11:19:53 CET 2018


Author: landauf
Date: 2018-01-03 11:19:53 +0100 (Wed, 03 Jan 2018)
New Revision: 11698

Modified:
   code/trunk/src/CMakeLists.txt
Log:
still trying to avoid CMP0026... can we define ORXONOX_EXECUTABLE_NAME like this? seems to work on windows and probably works on linux too (please test)

Modified: code/trunk/src/CMakeLists.txt
===================================================================
--- code/trunk/src/CMakeLists.txt	2018-01-03 10:13:37 UTC (rev 11697)
+++ code/trunk/src/CMakeLists.txt	2018-01-03 10:19:53 UTC (rev 11698)
@@ -63,6 +63,8 @@
   LIST(APPEND ORXONOX_MAIN_FILES ${CMAKE_SOURCE_DIR}/contrib/winresource.rc)
 ENDIF()
 
+SET(ORXONOX_EXECUTABLE_NAME "orxonox" CACHE INTERNAL "")
+
 ORXONOX_ADD_EXECUTABLE(orxonox-main
   # When defined as WIN32 this removes the console window on Windows
   ${ORXONOX_WIN32}
@@ -70,24 +72,13 @@
     orxonox
   SOURCE_FILES
     ${ORXONOX_MAIN_FILES}
-  OUTPUT_NAME orxonox
+  OUTPUT_NAME
+    ${ORXONOX_EXECUTABLE_NAME}
 )
 # Main executable should depend on all modules (but not on plugins)
 ADD_DEPENDENCIES(orxonox-main ${ORXONOX_MODULES})
 
-# Get name to configure the run scripts
-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(_exec_loc orxonox-main LOCATION)
-GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME)
-SET(ORXONOX_EXECUTABLE_NAME ${_exec_name} CACHE INTERNAL "")
-IF (POLICY CMP0026)
-  CMAKE_POLICY(POP) # set policy back to original settings
-ENDIF()
 
-
 # Apple Mac OS X specific build settings
 IF(APPLE)
   # On Apple we need to link to AppKit and Foundation frameworks



More information about the Orxonox-commit mailing list