diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 1e3d0f7a6..481f1a426 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -295,10 +295,13 @@ if(${SDL2_FOUND}) RUNTIME DESTINATION . ) if ((${CMAKE_BUILD_TYPE} MATCHES Debug) OR (${CMAKE_BUILD_TYPE} MATCHES RelWithDebInfo)) - install(FILES $.debug - DESTINATION . - OPTIONAL - ) + set(SRB2_DEBUG_INSTALL OFF CACHE BOOL "Insert *.debug file into the install directory or package.") + if (${SRB2_DEBUG_INSTALL}) + install(FILES $.debug + DESTINATION . + OPTIONAL + ) + endif() endif() endif()