From f90c99ce641a8e092794a0f76b3125cb21fed571 Mon Sep 17 00:00:00 2001 From: CPunch Date: Sun, 1 May 2022 14:21:44 -0500 Subject: [PATCH] Bot: Strip symbols --- bot/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bot/CMakeLists.txt b/bot/CMakeLists.txt index 8cbd36f..883e3e0 100644 --- a/bot/CMakeLists.txt +++ b/bot/CMakeLists.txt @@ -28,4 +28,10 @@ target_link_libraries(LaikaBot PUBLIC LaikaLib ${BOTPLATFORMLIBS}) target_compile_definitions(LaikaBot PUBLIC "$<$:DEBUG>") # add include directory -target_include_directories(LaikaBot PUBLIC ${BOT_INCLUDEDIR}) \ No newline at end of file +target_include_directories(LaikaBot PUBLIC ${BOT_INCLUDEDIR}) + +# strip symbols for POSIX-like binaries +if((UNIX AND NOT APPLE) AND NOT RAWCMAKEBUILDTYPE STREQUAL "debug") + message(STATUS "Stripping LaikaBot symbols...") + target_link_options(LaikaBot PRIVATE -s) +endif () \ No newline at end of file