From 28810df46f689f933824a978a66e7c881e77593a Mon Sep 17 00:00:00 2001 From: kamil Date: Fri, 21 Oct 2016 11:13:35 +0000 Subject: 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 and . --- mk/configure/cmake.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'mk/configure') 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 -- cgit v1.2.3