From: TimePath Date: Sun, 30 Jul 2017 02:11:00 +0000 (+1000) Subject: Remove leading . in CMAKE_EXECUTABLE_SUFFIX if it has one, but don't modify it X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e74838a675f4d1c93e754fe229173dba9a3ca292;p=xonotic%2Fnetradiant.git Remove leading . in CMAKE_EXECUTABLE_SUFFIX if it has one, but don't modify it --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 870cfef7..0a242efc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,8 +143,7 @@ if (BUILD_RADIANT) endif () if (CMAKE_EXECUTABLE_SUFFIX) - string(REGEX REPLACE "^[.]" "" CMAKE_EXECUTABLE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX}) - set(RADIANT_EXECUTABLE ${CMAKE_EXECUTABLE_SUFFIX}) + string(REGEX REPLACE "^[.]" "" RADIANT_EXECUTABLE ${CMAKE_EXECUTABLE_SUFFIX}) else () execute_process( COMMAND uname -m diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 94cbbe5b..ad32a079 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -2,7 +2,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") macro(radiant_tool name) add_executable(${name} ${ARGN}) - if (NOT (CMAKE_EXECUTABLE_SUFFIX STREQUAL RADIANT_EXECUTABLE)) + if (NOT (CMAKE_EXECUTABLE_SUFFIX STREQUAL ".${RADIANT_EXECUTABLE}")) add_custom_command(TARGET ${name} POST_BUILD COMMAND ln -f -s "$" "${PROJECT_BINARY_DIR}/${name}.${RADIANT_EXECUTABLE}" VERBATIM