diff options
author | wiz <wiz@pkgsrc.org> | 2014-08-23 19:26:07 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2014-08-23 19:26:07 +0000 |
commit | d5d0d1b99a617848cc7483b30fd6b6d6a7f891ae (patch) | |
tree | 0a8822c9ea2cc0273148bbf5493c39f08be9f736 /mk/configure | |
parent | 1a8c3a8e4925f2566eb9ede059f274cf0058453a (diff) | |
download | pkgsrc-d5d0d1b99a617848cc7483b30fd6b6d6a7f891ae.tar.gz |
Add CMAKE_PREFIX_PATH variable that can be used by packages that install
their files in non-standard locations (e.g., qt5).
From Niclas Rosenvik.
Diffstat (limited to 'mk/configure')
-rw-r--r-- | mk/configure/cmake.mk | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mk/configure/cmake.mk b/mk/configure/cmake.mk index 2ab68251df7..65f0b5b91d5 100644 --- a/mk/configure/cmake.mk +++ b/mk/configure/cmake.mk @@ -1,4 +1,4 @@ -# $NetBSD: cmake.mk,v 1.10 2013/10/08 12:03:53 obache Exp $ +# $NetBSD: cmake.mk,v 1.11 2014/08/23 19:26:07 wiz Exp $ # # This file handles packages that use CMake as their primary build # system. For more information about CMake, see http://www.cmake.org/. @@ -15,6 +15,14 @@ # variable is adjusted to include the path from the pkgsrc wrappers. # The file ${WRKSRC}/CMakeLists.txt is always appended to this list. # +# CMAKE_PREFIX_PATH +# A list of directories to add the CMAKE_PREFIX_PATH cmake variable. +# If a package installs it's contents in ${PREFIX}/package instead of +# ${PREFIX} and it installs cmake modules there +# "CMAKE_PREFIX_PATH += ${PREFIX}/package" should be in it's +# buildlink3.mk so that packages that depend on it can find it's +# cmake modules if they use cmake to build. +# _CMAKE_DIR= ${BUILDLINK_DIR}/cmake-Modules @@ -37,6 +45,10 @@ CMAKE_ARGS+= -DCMAKE_INSTALL_INFODIR:PATH=${PKGINFODIR} CMAKE_ARGS+= -DCMAKE_INSTALL_LOCALEDIR:PATH=${PKGLOCALEDIR}/locale .endif +.if defined(CMAKE_PREFIX_PATH) +CMAKE_ARGS+=-DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH:ts;:Q} +.endif + CMAKE_MODULE_PATH_OVERRIDE+= CMakeLists.txt ### configure-cmake-override modifies the cmake CMakeLists.txt file in |