summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-11-27 13:39:08 +0100
committerMichał Górny <mgorny@gentoo.org>2016-11-30 10:42:09 +0100
commitc9b53dc891212694296acb0a4d131a1d31fa1f21 (patch)
tree3b9af52e2db2001cea2e5afdc1e66d66dce36130 /eclass
parentdev-util/cmake: Support indicating Gentoo build via CMAKE_GENTOO_BUILD (diff)
downloadgentoo-c9b53dc891212694296acb0a4d131a1d31fa1f21.tar.gz
gentoo-c9b53dc891212694296acb0a4d131a1d31fa1f21.tar.bz2
gentoo-c9b53dc891212694296acb0a4d131a1d31fa1f21.zip
cmake-utils.eclass: Declare CMAKE_GENTOO_BUILD
Declare the CMAKE_GENTOO_BUILD cache variable to indicate that a Gentoo package build is being performed. This variable enables Gentoo code paths in CMake modules without the necessity of setting a custom CMAKE_BUILD_TYPE.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/cmake-utils.eclass1
1 files changed, 1 insertions, 0 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index bf78cc30a88..fbd60c24ab2 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -593,6 +593,7 @@ enable_cmake-utils_src_configure() {
local common_config=${BUILD_DIR}/gentoo_common_config.cmake
local libdir=$(get_libdir)
cat > "${common_config}" <<- _EOF_ || die
+ SET (CMAKE_GENTOO_BUILD ON CACHE BOOL "Indicate Gentoo package build")
SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries")
_EOF_