Remove debug symbols on release builds

This commit is contained in:
Raphael Coeffic
2021-09-13 11:13:08 +02:00
parent b0d2853ed1
commit 3ed1e20b9e
+7
View File
@@ -44,6 +44,13 @@ if(Qt5Widgets_FOUND)
add_dependencies(${SIMULATOR_TARGET} ${RADIO_DEPENDENCIES})
target_compile_definitions(${SIMULATOR_TARGET} PUBLIC ${APP_COMMON_DEFINES}) # set in top-level CMakeLists
target_link_libraries(${SIMULATOR_TARGET} ${SDL_LIBRARY} Qt5::Core)
# Remove debug symbols on release builds
if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
add_custom_command(TARGET ${SIMULATOR_TARGET} POST_BUILD
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${SIMULATOR_TARGET}>)
endif()
# Introduced at 2.5 - TODO replace with a code change
# When compiled shared simulators using libopenui and Companion have classes named MainWindow
# When the simulator is launched from Companion the runtime dynamic linking can result in Companion overiding the simulator