Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/Uses/cmake.mk
Show All 13 Lines | |||||
# User defined variables: | # User defined variables: | ||||
# CMAKE_VERBOSE - Enable verbose build output | # CMAKE_VERBOSE - Enable verbose build output | ||||
# Default: not set, unless BATCH or PACKAGE_BUILDING is defined | # Default: not set, unless BATCH or PACKAGE_BUILDING is defined | ||||
# CMAKE_NOCOLOR - Disable colour build output | # CMAKE_NOCOLOR - Disable colour build output | ||||
# Default: not set, unless BATCH or PACKAGE_BUILDING is defined | # Default: not set, unless BATCH or PACKAGE_BUILDING is defined | ||||
# CMAKE_NINJA - Use ninja instead of make(1) | # CMAKE_NINJA - Use ninja instead of make(1) | ||||
# | # | ||||
# Variables for ports: | # Variables for ports: | ||||
# CMAKE_ENV - Environment passed to cmake. | |||||
# Default: ${CONFIGURE_ENV} | |||||
# CMAKE_ARGS - Arguments passed to cmake | # CMAKE_ARGS - Arguments passed to cmake | ||||
# Default: see below | # Default: see below | ||||
# CMAKE_BUILD_TYPE - Type of build (cmake predefined build types). | # CMAKE_BUILD_TYPE - Type of build (cmake predefined build types). | ||||
# Projects may have their own build profiles. | # Projects may have their own build profiles. | ||||
# CMake supports the following types: Debug, | # CMake supports the following types: Debug, | ||||
# Release, RelWithDebInfo and MinSizeRel. | # Release, RelWithDebInfo and MinSizeRel. | ||||
# Debug and Release profiles respect system | # Debug and Release profiles respect system | ||||
# CFLAGS, RelWithDebInfo and MinSizeRel will set | # CFLAGS, RelWithDebInfo and MinSizeRel will set | ||||
Show All 31 Lines | |||||
.endif #defined(WITH_DEBUG) | .endif #defined(WITH_DEBUG) | ||||
PLIST_SUB+= CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:tl}" | PLIST_SUB+= CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:tl}" | ||||
.if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) | .if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) | ||||
INSTALL_TARGET?= install/strip | INSTALL_TARGET?= install/strip | ||||
.endif | .endif | ||||
CMAKE_ENV?= ${CONFIGURE_ENV} | |||||
CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \ | CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \ | ||||
-DCMAKE_CXX_COMPILER:STRING="${CXX}" \ | -DCMAKE_CXX_COMPILER:STRING="${CXX}" \ | ||||
-DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ | -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ | ||||
-DCMAKE_C_FLAGS_DEBUG:STRING="${CFLAGS}" \ | -DCMAKE_C_FLAGS_DEBUG:STRING="${CFLAGS}" \ | ||||
-DCMAKE_C_FLAGS_RELEASE:STRING="${CFLAGS}" \ | -DCMAKE_C_FLAGS_RELEASE:STRING="${CFLAGS}" \ | ||||
-DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ | -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ | ||||
-DCMAKE_CXX_FLAGS_DEBUG:STRING="${CXXFLAGS}" \ | -DCMAKE_CXX_FLAGS_DEBUG:STRING="${CXXFLAGS}" \ | ||||
-DCMAKE_CXX_FLAGS_RELEASE:STRING="${CXXFLAGS}" \ | -DCMAKE_CXX_FLAGS_RELEASE:STRING="${CXXFLAGS}" \ | ||||
Show All 32 Lines | |||||
BUILD_WRKSRC= ${CONFIGURE_WRKSRC} | BUILD_WRKSRC= ${CONFIGURE_WRKSRC} | ||||
INSTALL_WRKSRC= ${CONFIGURE_WRKSRC} | INSTALL_WRKSRC= ${CONFIGURE_WRKSRC} | ||||
.endif | .endif | ||||
.if !target(do-configure) | .if !target(do-configure) | ||||
do-configure: | do-configure: | ||||
@${ECHO_MSG} ${_CMAKE_MSG} | @${ECHO_MSG} ${_CMAKE_MSG} | ||||
${MKDIR} ${CONFIGURE_WRKSRC} | ${MKDIR} ${CONFIGURE_WRKSRC} | ||||
@cd ${CONFIGURE_WRKSRC}; ${SETENV} ${CMAKE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} | @cd ${CONFIGURE_WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} | ||||
.endif | .endif | ||||
.endif #!defined(_INCLUDE_USES_CMAKE_MK) | .endif #!defined(_INCLUDE_USES_CMAKE_MK) |