]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Remove leading . in CMAKE_EXECUTABLE_SUFFIX if it has one, but don't modify it
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 30 Jul 2017 02:11:00 +0000 (12:11 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 30 Jul 2017 02:11:00 +0000 (12:11 +1000)
CMakeLists.txt
tools/CMakeLists.txt

index 870cfef72e9091372f5764c38fae156073409f4e..0a242efc89615fe11bef945634dbd35a3df14bd9 100644 (file)
@@ -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
index 94cbbe5bd19c60071fc0b6c6187c3bcf5168e4b8..ad32a079e7a66bbd3aa0f74058771393c3e50553 100644 (file)
@@ -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 "$<TARGET_FILE_NAME:${name}>" "${PROJECT_BINARY_DIR}/${name}.${RADIANT_EXECUTABLE}"
                 VERBATIM