Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11698


Ignore:
Timestamp:
Jan 3, 2018, 11:19:53 AM (6 years ago)
Author:
landauf
Message:

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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/CMakeLists.txt

    r11697 r11698  
    6464ENDIF()
    6565
     66SET(ORXONOX_EXECUTABLE_NAME "orxonox" CACHE INTERNAL "")
     67
    6668ORXONOX_ADD_EXECUTABLE(orxonox-main
    6769  # When defined as WIN32 this removes the console window on Windows
     
    7173  SOURCE_FILES
    7274    ${ORXONOX_MAIN_FILES}
    73   OUTPUT_NAME orxonox
     75  OUTPUT_NAME
     76    ${ORXONOX_EXECUTABLE_NAME}
    7477)
    7578# Main executable should depend on all modules (but not on plugins)
    7679ADD_DEPENDENCIES(orxonox-main ${ORXONOX_MODULES})
    77 
    78 # Get name to configure the run scripts
    79 IF (POLICY CMP0026)
    80   CMAKE_POLICY(PUSH)
    81   CMAKE_POLICY(SET CMP0026 OLD) # we only use the file's name, not its actual location, so the old policy is fine
    82 ENDIF()
    83 GET_TARGET_PROPERTY(_exec_loc orxonox-main LOCATION)
    84 GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME)
    85 SET(ORXONOX_EXECUTABLE_NAME ${_exec_name} CACHE INTERNAL "")
    86 IF (POLICY CMP0026)
    87   CMAKE_POLICY(POP) # set policy back to original settings
    88 ENDIF()
    8980
    9081
Note: See TracChangeset for help on using the changeset viewer.