diff options
author | Thomas Winget <tewinget@gmail.com> | 2014-09-17 17:44:35 -0400 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-09-23 22:58:31 +0200 |
commit | 5bd343778fb5da91c81d086ca02580a0f0ea65b1 (patch) | |
tree | d73db35ac29eac01885fcf0cc8fb6a42d81e1582 /CMakeLists.txt | |
parent | change to allow (at least a bit) for multiple TXT records (diff) | |
download | monero-5bd343778fb5da91c81d086ca02580a0f0ea65b1.tar.xz |
Fixed CMake search for libunbound
As it turns out, some of CMake's built-in modules for detecting headers
and libraries don't work if you have certain compiler flags set, such as
-Werror=old-style-definition, as they do "int main()" rather than
"int main(void)". Having CMake search for libs before compiler flags
are set alleviates this issue, and I believe the underlying issue will
be fixed in future releases of CMake.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a2c66bc8..1f8222a35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,8 @@ if (UNIX AND NOT APPLE) find_package(Threads) endif() +find_package(Unbound REQUIRED) + if(MSVC) add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /FIinline_c.h /D__SSE4_1__") # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Dinline=__inline") @@ -197,11 +199,6 @@ else() add_custom_target(version ALL) endif() -# <expletive deleted> CMake bug making this not work. -#find_package(Unbound REQUIRED) -# Won't make sure this works, because that's broken. -set(CMAKE_UNBOUND_LIB "-lunbound") - add_subdirectory(external) # Final setup for miniupnpc |