From 831c083e5fa7b5a80c85906147208f014730d8eb Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 10 Jun 2023 18:29:18 +0200 Subject: [PATCH] Add flags for static linkage when building CLI wrapper as well Otherwise the wrapper might depend on `libgcc` or `libstdc++` on builds that link against these libraries otherwise statically. Not sure why this is only an issue on 32-bit builds. (The different exeption handling can only explain `libgcc` but not `libstdc++`.) --- cmake/modules/AppTarget.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/modules/AppTarget.cmake b/cmake/modules/AppTarget.cmake index 13f1490..0eaf34f 100644 --- a/cmake/modules/AppTarget.cmake +++ b/cmake/modules/AppTarget.cmake @@ -120,6 +120,7 @@ if (BUILD_CLI_WRAPPER) set(CLI_WRAPPER_TARGET_NAME "${META_TARGET_NAME}-cli") add_executable(${CLI_WRAPPER_TARGET_NAME} ${CLI_WRAPPER_RES_FILES} ${CLI_WRAPPER_SRC_FILE}) set_target_properties(${CLI_WRAPPER_TARGET_NAME} PROPERTIES CXX_STANDARD 17) + target_link_libraries(${CLI_WRAPPER_TARGET_NAME} PRIVATE ${STATIC_LINKAGE_LINKER_FLAGS}) target_compile_definitions(${CLI_WRAPPER_TARGET_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS=1) endif ()