diff options
author | Thomas Winget <tewinget@gmail.com> | 2015-03-22 05:26:30 -0400 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2015-03-22 06:25:53 -0400 |
commit | 51e3579a809a01b4cc73891e44bba44b986f4840 (patch) | |
tree | 5d58a5a8c287025ee9aca43ab6194ede7478ea97 | |
parent | Hopefully fixes build on Windows for real this time (diff) | |
download | monero-51e3579a809a01b4cc73891e44bba44b986f4840.tar.xz |
Fixed bug in static linking boost on MINGW
There was a workaround for linking to boost at all on MINGW, but
unfortunately this workaround would not correctly link to boost
statically. This workaround for that workaround works around the issue
that that workaround had.
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c1209e08..8af4ef69e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,12 +238,18 @@ if (BOOST_IGNORE_SYSTEM_PATHS) set(Boost_NO_SYSTEM_PATHS TRUE) endif() +set(OLD_LIB_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) if(STATIC) + if(MINGW) + set(CMAKE_FIND_LIBRARY_SUFFIXES .a) + endif() + set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_RUNTIME ON) endif() find_package(Boost 1.53 QUIET REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options) +set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES}) if(NOT Boost_FOUND) die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (1.53 or 1.55+) or the equivalent") endif() |