cmake-utils.eclass: Declare CMAKE_GENTOO_BUILD
authorMichał Górny <mgorny@gentoo.org>
Sun, 27 Nov 2016 12:39:08 +0000 (13:39 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 30 Nov 2016 09:42:09 +0000 (10:42 +0100)
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.

eclass/cmake-utils.eclass

index bf78cc30a880a67353422d04ff31056baf2d8814..fbd60c24ab276b1ae0b22eb7d80f05208634adec 100644 (file)
@@ -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_