Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105777024
D13636.id37046.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D13636.id37046.diff
View Options
Index: Mk/Uses/cmake.mk
===================================================================
--- Mk/Uses/cmake.mk
+++ Mk/Uses/cmake.mk
@@ -25,6 +25,8 @@
# Default: not set, unless BATCH or PACKAGE_BUILDING is defined
#
# Variables for ports:
+# CMAKE_ON Appends <var>:bool=TRUE to the CMAKE_ARGS.
+# CMAKE_OFF Appends <var>:bool=FALSE to the CMAKE_ARGS
# CMAKE_ARGS - Arguments passed to cmake
# Default: see below
# CMAKE_BUILD_TYPE - Type of build (cmake predefined build types).
@@ -88,6 +90,13 @@
-DTHREADS_HAVE_PTHREAD_ARG:BOOL=YES \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=YES \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
+
+# Handle the option-like CMAKE_ON and CMAKE_OFF lists.
+.for bool_kind in ON OFF
+. if defined(CMAKE_${bool_kind})
+CMAKE_ARGS+= ${CMAKE_${bool_kind}:C/.*/-D&:BOOL=${bool_kind}/}
+. endif
+.endfor
CMAKE_INSTALL_PREFIX?= ${PREFIX}
Index: devel/cmake-doc/Makefile
===================================================================
--- devel/cmake-doc/Makefile
+++ devel/cmake-doc/Makefile
@@ -20,10 +20,9 @@
USES= cmake:outsource
USE_QT5= help_build
-CMAKE_ARGS= -DSPHINX_MAN:BOOL=OFF \
- -DSPHINX_HTML:BOOL=ON \
- -DSPHINX_QTHELP:BOOL=ON \
- -DCMAKE_DOC_DIR:STRING="${DOCSDIR_REL}" \
+CMAKE_OFF= SPHINX_MAN
+CMAKE_ON= SPHINX_HTML SPHINX_QTHELP
+CMAKE_ARGS= -DCMAKE_DOC_DIR:STRING="${DOCSDIR_REL}" \
-DQCOLLECTIONGENERATOR_EXECUTABLE=${QT_BINDIR}/qcollectiongenerator
CMAKE_SOURCE_PATH= ${WRKSRC}/Utilities/Sphinx
Index: devel/cmake-gui/Makefile
===================================================================
--- devel/cmake-gui/Makefile
+++ devel/cmake-gui/Makefile
@@ -22,13 +22,13 @@
USE_QT5= core gui widgets buildtools_build qmake_build
USES= cmake:run desktop-file-utils libarchive \
shared-mime-info
-CMAKE_ARGS= -DBUILD_QtDialog:bool=on \
- -DBUILD_CursesDialog:BOOL=OFF \
- -DSPHINX_MAN:BOOL=ON \
- -DCMAKE_USE_SYSTEM_LIBRARIES:BOOL=ON \
- -DCMAKE_DATA_DIR:STRING="/${DATADIR_REL}" \
+CMAKE_OFF= BUILD_CursesDialog \
+ CMake_SPHINX_DEPEND_ON_EXECUTABLES
+CMAKE_ON= BUILD_QtDialog \
+ SPHINX_MAN \
+ CMAKE_USE_SYSTEM_LIBRARIES
+CMAKE_ARGS= -DCMAKE_DATA_DIR:STRING="/${DATADIR_REL}" \
-DCMAKE_DOC_DIR:STRING="/${DOCSDIR_REL}" \
- -DCMake_SPHINX_DEPEND_ON_EXECUTABLES:BOOL=OFF
ALL_TARGET= cmake-gui documentation
INSTALL_WRKSRC= ${WRKSRC}/Source/QtDialog
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 1:17 PM (17 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15541700
Default Alt Text
D13636.id37046.diff (2 KB)
Attached To
Mode
D13636: RFC: Add CMAKE_ON and CMAKE_OFF to cmake.mk
Attached
Detach File
Event Timeline
Log In to Comment