From 5417e6c820133aa9d46324a69340e7a5022cae9e Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Thu, 24 Oct 2024 09:53:30 +0300 Subject: [PATCH] Fix Debug builds with old ninja versions (#478) --- cl_dll/CMakeLists.txt | 6 ++++-- dlls/CMakeLists.txt | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index 46d22efc..c28315fb 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -233,6 +233,8 @@ install( TARGETS ${CLDLL_LIBRARY} GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) -add_custom_command(TARGET ${CLDLL_LIBRARY} +if(CMAKE_BUILD_TYPE MATCHES "Release") + add_custom_command(TARGET ${CLDLL_LIBRARY} POST_BUILD DEPENDS ${CLDLL_LIBRARY} - COMMAND $<$:${CMAKE_STRIP}> -s $) + COMMAND ${CMAKE_STRIP} -s $) +endif() diff --git a/dlls/CMakeLists.txt b/dlls/CMakeLists.txt index cdfe02bd..e4f63e78 100644 --- a/dlls/CMakeLists.txt +++ b/dlls/CMakeLists.txt @@ -194,6 +194,8 @@ install( TARGETS ${SVDLL_LIBRARY} GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -add_custom_command(TARGET ${SVDLL_LIBRARY} +if(CMAKE_BUILD_TYPE MATCHES "Release") + add_custom_command(TARGET ${SVDLL_LIBRARY} POST_BUILD DEPENDS ${SVDLL_LIBRARY} - COMMAND $<$:${CMAKE_STRIP}> -s $) + COMMAND ${CMAKE_STRIP} -s $) +endif()