From f2ef1094f2d8a11eb08d81588de2d1c3e75ad4f4 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Wed, 18 Mar 2020 20:10:08 +0000 Subject: cmake: Force static libraries Add some settings to both MingW and MSVC to more strongly force static libraries linking. Signed-off-by: Frediano Ziglio --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a8b2b9..c8f441c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,8 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.15") endif() project(vdagent-win) +set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + # configure file(WRITE "${CMAKE_BINARY_DIR}/config.h.in" "/* Automatic generated by CMake */\n\n") @@ -181,5 +183,9 @@ if(MSVC) PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded") endif() endif() +set_property(TARGET vdagent vdservice imagetest + PROPERTY LINK_SEARCH_START_STATIC ON) +set_property(TARGET vdagent vdservice imagetest + PROPERTY LINK_SEARCH_END_STATIC ON) install(TARGETS vdagent vdservice) -- cgit v1.2.3