[Midnightbsd-cvs] mports: mports/Mk: add bsd.cmake.mk for kde 4
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Oct 17 15:47:48 EDT 2008
Log Message:
-----------
add bsd.cmake.mk for kde 4
Modified Files:
--------------
mports/Mk:
bsd.mport.mk (r1.121 -> r1.122)
Added Files:
-----------
mports/Mk:
bsd.cmake.mk (r1.1)
-------------- next part --------------
Index: bsd.mport.mk
===================================================================
RCS file: /home/cvs/mports/Mk/bsd.mport.mk,v
retrieving revision 1.121
retrieving revision 1.122
diff -L Mk/bsd.mport.mk -L Mk/bsd.mport.mk -u -r1.121 -r1.122
--- Mk/bsd.mport.mk
+++ Mk/bsd.mport.mk
@@ -1421,6 +1421,10 @@
.include "${PORTSDIR}/Mk/bsd.kde4.mk"
.endif
+.if defined(USE_CMAKE)
+.include "${PORTSDIR}/Mk/bsd.cmake.mk"
+.endif
+
# These do some path checks if DESTDIR is set correctly.
# You can force skipping these test by defining IGNORE_PATH_CHECKS
.if !defined(IGNORE_PATH_CHECKS)
--- /dev/null
+++ Mk/bsd.cmake.mk
@@ -0,0 +1,88 @@
+# $MidnightBSD: mports/Mk/bsd.cmake.mk,v 1.1 2008/10/17 19:47:48 laffer1 Exp $
+#
+# USE_CMAKE - If set, this port uses cmake.
+#
+# CMAKE_ENV - Environment passed to cmake.
+# Default: ${CONFIGURE_ENV}
+# CMAKE_ARGS - Arguments passed to cmake
+# Default: see below
+# CMAKE_USE_PTHREAD - Instruct cmake to use pthreads when
+# compiling/linking
+# Default: not set
+# CMAKE_BUILD_TYPE - Type of build (release, debug)
+# Default: Release
+# CMAKE_VERBOSE - Verbose build
+# Default: not set
+# CMAKE_SOURCE_PATH - Path to sourcedir for cmake
+# Default: .
+# CMAKE_INSTALL_PREFIX - prefix for cmake to use for installation.
+# Default: ${PREFIX}
+
+CMAKE_MAINTAINER= ports at MidnightBSD.org
+
+#
+# CMAKE_BIN is the location where the cmake port installs the cmake
+# executable
+#
+# CMAKE_PORT is where the cmake port is located in the ports tree
+#
+CMAKE_BIN= ${LOCALBASE}/bin/cmake
+CMAKE_PORT= ${PORTSDIR}/devel/cmake
+
+#
+# Make sure we depend on cmake
+#
+BUILD_DEPENDS+= ${CMAKE_BIN}:${CMAKE_PORT}
+
+#
+# Default environment and arguments to cmake
+#
+CMAKE_ENV?= ${CONFIGURE_ENV}
+CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \
+ -DCMAKE_CXX_COMPILER:STRING="${CXX}" \
+ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
+ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
+ -DCMAKE_INSTALL_PREFIX:PATH="${CMAKE_INSTALL_PREFIX}" \
+ -DCMAKE_BUILD_TYPE:STRING="${CMAKE_BUILD_TYPE}"
+
+#
+# Default build type and sourcedir
+#
+CMAKE_BUILD_TYPE?= Release
+CMAKE_SOURCE_PATH?= .
+CMAKE_INSTALL_PREFIX?= ${PREFIX}
+
+#
+# Instruct cmake to compile/link with pthreads
+#
+.if defined(CMAKE_USE_PTHREAD)
+CFLAGS+= ${PTHREAD_CFLAGS}
+CXXFLAGS+= ${PTHREAD_CFLAGS}
+
+CMAKE_ARGS+= -DCMAKE_THREAD_LIBS:STRING="${PTHREAD_LIBS}" \
+ -DCMAKE_USE_PTHREADS:BOOL=ON \
+ -DCMAKE_EXE_LINKER_FLAGS:STRING="${PTHREAD_LIBS}"
+.endif
+
+#
+# Force DEBUG buildtype if needed
+#
+.if defined(CMAKE_DEBUG) || defined(WITH_DEBUG)
+CMAKE_BUILD_TYPE=DEBUG
+.endif
+
+#
+# Force makefile verbosity if needed
+#
+.if defined(CMAKE_VERBOSE) || defined(BATCH)
+CMAKE_ARGS+= -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
+.endif
+
+#
+# Redefine do-configure target
+#
+.if !target(do-configure)
+do-configure:
+ @cd ${WRKSRC}; ${SETENV} ${CMAKE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH}
+.endif
+
More information about the Midnightbsd-cvs
mailing list