Index: bsd.cmake.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.cmake.mk,v retrieving revision 1.6 diff -u -r1.6 bsd.cmake.mk --- bsd.cmake.mk 1 Sep 2009 22:19:25 -0000 1.6 +++ bsd.cmake.mk 2 Mar 2010 12:46:17 -0000 @@ -15,8 +15,10 @@ # Default: none (which respects CFLAGS) # CMAKE_VERBOSE - Verbose build # Default: not set +# CMAKE_OFFSOURCE - Instruct to perform an off-source build +# Default: not set # CMAKE_SOURCE_PATH - Path to sourcedir for cmake -# Default: . +# Default: ${WRKSRC} # CMAKE_INSTALL_PREFIX - prefix for cmake to use for installation. # Default: ${PREFIX} # @@ -54,7 +56,12 @@ # # Default build type and sourcedir # -CMAKE_SOURCE_PATH?= . +CMAKE_SOURCE_PATH?= ${WRKSRC} +.if defined(CMAKE_OFFSOURCE) +CONFIGURE_WRKSRC= ${WRKDIR}/.build +BUILD_WRKSRC= ${CONFIGURE_WRKSRC} +INSTALL_WRKSRC= ${CONFIGURE_WRKSRC} +.endif CMAKE_INSTALL_PREFIX?= ${PREFIX} CMAKE_BUILD_TYPE?= #none @@ -89,6 +96,6 @@ # .if !target(do-configure) do-configure: + ${MKDIR} ${CONFIGURE_WRKSRC} @cd ${CONFIGURE_WRKSRC}; ${SETENV} ${CMAKE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} .endif -