aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 17 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 98ac1b600..0b0ce5a4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -497,8 +497,18 @@ else()
endif()
# Since gcc 4.9 the LTO format is non-standard (slim), so we need the gcc-specific ar and ranlib binaries
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.0) AND NOT OPENBSD)
- set(CMAKE_AR "gcc-ar")
- set(CMAKE_RANLIB "gcc-ranlib")
+ # When invoking cmake on distributions on which gcc's binaries are prefix
+ # with an arch-specific triplet, the user has to either specify
+ # -DCHOST=... or -DCMAKE_AR=... and -DCMAKE_RANLIB=...
+ if (DEFINED CHOST)
+ set(CHOST_PREFIX "${CHOST}-")
+ endif()
+ if (NOT DEFINED CMAKE_AR)
+ set(CMAKE_AR "${CHOST_PREFIX}gcc-ar")
+ endif()
+ if (NOT DEFINED CMAKE_RANLIB)
+ set(CMAKE_RANLIB "${CHOST_PREFIX}gcc-ranlib")
+ endif()
endif()
endif()
@@ -603,7 +613,11 @@ if(BUILD_DOCUMENTATION)
endif()
endif()
-# when ON - will install libunbound and libwallet_merged into "lib"
+# when ON - will install libwallet_merged into "lib"
option(BUILD_GUI_DEPS "Build GUI dependencies." OFF)
+# This is not nice, distribution packagers should not enable this, but depend
+# on libunbound shipped with their distribution instead
+option(INSTALL_VENDORED_LIBUNBOUND "Install libunbound binary built from source vendored with this repo." OFF)
+