aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-01-18 18:14:03 -0500
committerRiccardo Spagni <ric@spagni.net>2018-01-18 18:14:03 -0500
commitca5383efa9ddaa85e5e731d00f6ab69646879ab2 (patch)
tree304022c3bc7bbb866501bfa36a0dc4b6722e018f
parentMerge pull request #3099 (diff)
parentminiupnpc: always build with -fPIC (diff)
downloadmonero-ca5383efa9ddaa85e5e731d00f6ab69646879ab2.tar.xz
Merge pull request #3103
f65711a2 miniupnpc: always build with -fPIC (moneromooo-monero)
-rw-r--r--external/miniupnpc/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/external/miniupnpc/CMakeLists.txt b/external/miniupnpc/CMakeLists.txt
index bc9685699..2df8d474b 100644
--- a/external/miniupnpc/CMakeLists.txt
+++ b/external/miniupnpc/CMakeLists.txt
@@ -73,6 +73,13 @@ if (CMAKE_COMPILER_IS_GNUC)
endif ()
endif()
+# always add -fPIC
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fPIC")
+set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fPIC")
+set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -fPIC")
+set (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -fPIC")
+
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/miniupnpcstrings.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h)
include_directories (${CMAKE_CURRENT_BINARY_DIR})