From a52bfa59ecaa359a583750b49bea93955e709f24 Mon Sep 17 00:00:00 2001 From: lw Date: Thu, 23 Apr 2020 23:39:01 +0200 Subject: [PATCH] Properly add static linking this time --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af59275..50f3c3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,10 @@ if (UNIX) target_link_libraries(maniac ${XTEST_LIBRARIES}) endif() +target_link_libraries(maniac PUBLIC + -static -lwinpthread +) + target_include_directories(maniac PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src @@ -50,7 +54,6 @@ target_compile_options(maniac PRIVATE -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-frame-address -static - -l:libwinpthread ) if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")