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++`.)
This commit is contained in:
Martchus 2023-06-10 18:29:18 +02:00
parent dd95310c73
commit 831c083e5f
1 changed files with 1 additions and 0 deletions

View File

@ -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 ()