summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2020-03-18 20:10:08 +0000
committerFrediano Ziglio <freddy77@gmail.com>2020-04-28 18:17:47 +0100
commitf2ef1094f2d8a11eb08d81588de2d1c3e75ad4f4 (patch)
tree2e12935ae7cf70396f8947657fea53a664951650
parent721cd5a1ef60e1045a3822a5cbe384f3113866f2 (diff)
cmake: Force static libraries
Add some settings to both MingW and MSVC to more strongly force static libraries linking. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
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)