Skip to content

Commit 5417e6c

Browse files
authored
Fix Debug builds with old ninja versions (#478)
1 parent aba5188 commit 5417e6c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

cl_dll/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ install( TARGETS ${CLDLL_LIBRARY}
233233
GROUP_READ GROUP_EXECUTE
234234
WORLD_READ WORLD_EXECUTE )
235235

236-
add_custom_command(TARGET ${CLDLL_LIBRARY}
236+
if(CMAKE_BUILD_TYPE MATCHES "Release")
237+
add_custom_command(TARGET ${CLDLL_LIBRARY}
237238
POST_BUILD DEPENDS ${CLDLL_LIBRARY}
238-
COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}> -s $<TARGET_FILE:${CLDLL_LIBRARY}>)
239+
COMMAND ${CMAKE_STRIP} -s $<TARGET_FILE:${CLDLL_LIBRARY}>)
240+
endif()

dlls/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ install( TARGETS ${SVDLL_LIBRARY}
194194
GROUP_READ GROUP_EXECUTE
195195
WORLD_READ WORLD_EXECUTE)
196196

197-
add_custom_command(TARGET ${SVDLL_LIBRARY}
197+
if(CMAKE_BUILD_TYPE MATCHES "Release")
198+
add_custom_command(TARGET ${SVDLL_LIBRARY}
198199
POST_BUILD DEPENDS ${SVDLL_LIBRARY}
199-
COMMAND $<$<CONFIG:release>:${CMAKE_STRIP}> -s $<TARGET_FILE:${SVDLL_LIBRARY}>)
200+
COMMAND ${CMAKE_STRIP} -s $<TARGET_FILE:${SVDLL_LIBRARY}>)
201+
endif()

0 commit comments

Comments
 (0)