diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-12-31 09:06:11 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-12-31 09:06:11 +0200 |
commit | 2c82eb71e7296823447b61069c8e917e468fbd8a (patch) | |
tree | 257dec9f54f1d1f47c4655f6b108bae7a897352d | |
parent | Merge pull request #582 (diff) | |
download | monero-2c82eb71e7296823447b61069c8e917e468fbd8a.tar.xz |
fix miniupnpc cmakelist
-rw-r--r-- | external/miniupnpc/CMakeLists.txt | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/external/miniupnpc/CMakeLists.txt b/external/miniupnpc/CMakeLists.txt index f6cf592af..33fa8d663 100644 --- a/external/miniupnpc/CMakeLists.txt +++ b/external/miniupnpc/CMakeLists.txt @@ -4,6 +4,7 @@ project (miniupnpc C) set (MINIUPNPC_VERSION 1.9) set (MINIUPNPC_API_VERSION 15) +#[[ - we comment out this block as we don't support these other build types if (NOT CMAKE_BUILD_TYPE) if (WIN32) set (DEFAULT_BUILD_TYPE MinSizeRel) @@ -14,6 +15,7 @@ if (NOT CMAKE_BUILD_TYPE) "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) endif() +]] option (UPNPC_BUILD_STATIC "Build static library" TRUE) option (UPNPC_BUILD_SHARED "Build shared library" TRUE) @@ -39,6 +41,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") add_definitions (-D_DARWIN_C_SOURCE) endif () +#[[ - we comment out this block as we already set flags # Set compiler specific build flags if (CMAKE_COMPILER_IS_GNUC) # Set our own default flags at first run. @@ -61,6 +64,7 @@ if (CMAKE_COMPILER_IS_GNUC) endif (NOT CONFIGURED) endif () +]] configure_file (miniupnpcstrings.h.cmake ${CMAKE_BINARY_DIR}/miniupnpcstrings.h) include_directories (${CMAKE_BINARY_DIR}) @@ -93,8 +97,11 @@ if (WIN32) endif (WIN32) if (WIN32) - find_library (WINSOCK2_LIBRARY NAMES ws2_32 WS2_32 Ws2_32) - find_library (IPHLPAPI_LIBRARY NAMES iphlpapi) + # We use set instead of find_library because otherwise static compilation on Windows breaks. Don't ask me why, just roll with it. + # find_library (WINSOCK2_LIBRARY NAMES ws2_32 WS2_32 Ws2_32) + # find_library (IPHLPAPI_LIBRARY NAMES iphlpapi) + set (WINSOCK2_LIBRARY ws2_32) + set (IPHLPAPI_LIBRARY iphlpapi) set (LDLIBS ${WINSOCK2_LIBRARY} ${IPHLPAPI_LIBRARY} ${LDLIBS}) #elseif (CMAKE_SYSTEM_NAME STREQUAL "Solaris") # find_library (SOCKET_LIBRARY NAMES socket) @@ -173,6 +180,7 @@ install (FILES DESTINATION include/miniupnpc ) -set (CONFIGURED YES CACHE INTERNAL "") +# commented out by Ben Boeckel, who I presume knows what he's doing;) +# set (CONFIGURED YES CACHE INTERNAL "") # vim: ts=2:sw=2 |