summaryrefslogtreecommitdiff
path: root/mk/configure
diff options
context:
space:
mode:
authorkamil <kamil@pkgsrc.org>2016-10-21 11:13:35 +0000
committerkamil <kamil@pkgsrc.org>2016-10-21 11:13:35 +0000
commit28810df46f689f933824a978a66e7c881e77593a (patch)
treecccf7a3a0bfcc3ae34126420e888038635ff706a /mk/configure
parent194792737da9c0bdfccf51c25b07bd9f11128a6c (diff)
downloadpkgsrc-28810df46f689f933824a978a66e7c881e77593a.tar.gz
Add support for overloading CMAKE_INSTALL_PREFIX
By default CMAKE_INSTALL_PREFIX points to PREFIX, but some software requres custom subprefix. At least blender and brlcad are in this category. To set new prefix it's sufficient to set CMAKE_INSTALL_PREFIX in a package, for example (in brlcad): CMAKE_INSTALL_PREFIX=${PREFIX}/brlcad Reviewed by <joerg> and <jperkin>.
Diffstat (limited to 'mk/configure')
-rw-r--r--mk/configure/cmake.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/mk/configure/cmake.mk b/mk/configure/cmake.mk
index e668bb3a3b6..994d65dbafb 100644
--- a/mk/configure/cmake.mk
+++ b/mk/configure/cmake.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cmake.mk,v 1.13 2016/02/24 15:24:56 jperkin Exp $
+# $NetBSD: cmake.mk,v 1.14 2016/10/21 11:13:35 kamil Exp $
#
# This file handles packages that use CMake as their primary build
# system. For more information about CMake, see http://www.cmake.org/.
@@ -27,12 +27,17 @@
# If set to yes, set GNU standard installation directories with pkgsrc
# configured settings. The default is yes.
#
+# CMAKE_INSTALL_PREFIX
+# Destination directory to install software. The default is ${PREFIX}.
+#
_CMAKE_DIR= ${BUILDLINK_DIR}/cmake-Modules
CMAKE_USE_GNU_INSTALL_DIRS?= yes
-CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX}
+CMAKE_INSTALL_PREFIX?= ${PREFIX}
+
+CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
CMAKE_ARGS+= -DCMAKE_MODULE_PATH:PATH=${_CMAKE_DIR}
.if ${OPSYS} != "Darwin"
CMAKE_ARGS+= -DCMAKE_SKIP_RPATH:BOOL=TRUE