diff options
author | fluffypony <ric@spagni.net> | 2014-09-11 08:22:49 +0200 |
---|---|---|
committer | fluffypony <ric@spagni.net> | 2014-09-11 08:22:49 +0200 |
commit | 36c7ea9f778f8cd6a5f2b58d5e3f9d49430eb0fa (patch) | |
tree | 60908bf3119ec3c129b733c8a1c6dd182df952a6 /CMakeLists.txt | |
parent | more dynamic miniupnp fixes (diff) | |
download | monero-36c7ea9f778f8cd6a5f2b58d5e3f9d49430eb0fa.tar.xz |
more CMake tweaks to allow detection on OS X
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b07a96eb..2353a6c08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,14 +43,6 @@ if (UNIX AND NOT APPLE) find_package(Threads) endif() -if(MINIUPNP_FOUND AND MINIUPNPC_VERSION_1_7_OR_HIGHER) - add_definitions("-DUPNP_DYNAMIC") - set(UPNP_LIBRARIES "miniupnpc") -else() - add_definitions("-DUPNP_STATIC") - set(UPNP_LIBRARIES "upnpc-static") -endif() - 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") @@ -165,5 +157,14 @@ else() endif() add_subdirectory(external) + +# Final setup for miniupnpc +if(UPNP_STATIC) + add_definitions("-DUPNP_STATIC") +else() + add_definitions("-DUPNP_DYNAMIC") + include_directories(${UPNP_INCLUDE}) +endif() + add_subdirectory(src) add_subdirectory(tests) |