aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2014-10-06 18:46:18 +0200
committerRiccardo Spagni <ric@spagni.net>2014-10-06 18:46:18 +0200
commit6b7ac4b37f6a3ed752e1db1e1be1a98b6ad6f19f (patch)
treee66264496f25e4320c6191614300085f1c51827c
parentMerge branch 'master' of http://github.com/fluffypony/bitmonero (diff)
downloadmonero-6b7ac4b37f6a3ed752e1db1e1be1a98b6ad6f19f.tar.xz
enforce static libraries when building statically
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b9bcc411c..54565464c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,6 +87,14 @@ else()
endif()
set(STATIC ${DEFAULT_STATIC} CACHE BOOL "Link libraries statically")
+IF(STATIC)
+ IF(MSVC)
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll.a .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ ELSE()
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ ENDIF()
+ENDIF()
+
if (UNIX AND NOT APPLE)
# Note that at the time of this writing the -Wstrict-prototypes flag added below will make this fail
find_package(Threads)