pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/configure Add support for overloading CMAKE_INSTALL...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/88da1fb45310
branches:  trunk
changeset: 354176:88da1fb45310
user:      kamil <kamil%pkgsrc.org@localhost>
date:      Fri Oct 21 11:13:35 2016 +0000

description:
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:

 mk/configure/cmake.mk |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 4495fb718562 -r 88da1fb45310 mk/configure/cmake.mk
--- a/mk/configure/cmake.mk     Fri Oct 21 10:42:01 2016 +0000
+++ b/mk/configure/cmake.mk     Fri Oct 21 11:13:35 2016 +0000
@@ -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



Home | Main Index | Thread Index | Old Index