aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.options.mk
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2016-06-25 22:23:37 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2016-06-25 22:23:37 +0000
commit5c332ae6cbbed01c4458dcba3fa609e3f0875a6c (patch)
tree0a5a29224abc1c4694b963b5f6873288983315d2 /Mk/bsd.options.mk
parent6e3401c2ab021eb9deb5fd010b6150a4a1c54fb5 (diff)
downloadports-5c332ae6cbbed01c4458dcba3fa609e3f0875a6c.tar.gz
ports-5c332ae6cbbed01c4458dcba3fa609e3f0875a6c.zip
Add an opt_CMAKE_BOOL options helper.
SOMEOPT_CMAKE_BOOL= WITH_FOO BAR expands to: -DWITH_FOO:BOOL=true -DBAR:BOOL=true or -DWITH_FOO:BOOL=false -DBAR:BOOL=false PR: 210576 Approved by: portmgr (mat)
Notes
Notes: svn path=/head/; revision=417497
Diffstat (limited to 'Mk/bsd.options.mk')
-rw-r--r--Mk/bsd.options.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index 7f353c1518f0..aa4ad2a953e7 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -98,6 +98,10 @@
# ${opt}_CMAKE_OFF When option is disabled, it will add its content to
# the CMAKE_ARGS.
#
+# ${opt}_CMAKE_BOOL Will add to CMAKE_ARGS:
+# Option enabled -D${content}:BOOL=true
+# Option disabled -D${content}:BOOL=false
+#
# ${opt}_QMAKE_ON When option is enabled, it will add its content to
# the QMAKE_ARGS.
# ${opt}_QMAKE_OFF When option is disabled, it will add its content to
@@ -515,6 +519,9 @@ CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ENABLE:S/^/--enable-/}
. if defined(${opt}_CONFIGURE_WITH)
CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:S/^/--with-/}
. endif
+. if defined(${opt}_CMAKE_BOOL)
+CMAKE_ARGS+= ${${opt}_CMAKE_BOOL:C/.*/-D&:BOOL=true/}
+. endif
. for configure in CONFIGURE CMAKE QMAKE
. if defined(${opt}_${configure}_ON)
${configure}_ARGS+= ${${opt}_${configure}_ON}
@@ -559,6 +566,9 @@ CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ENABLE:S/^/--disable-/:C/=.*//}
. if defined(${opt}_CONFIGURE_WITH)
CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:S/^/--without-/:C/=.*//}
. endif
+. if defined(${opt}_CMAKE_BOOL)
+CMAKE_ARGS+= ${${opt}_CMAKE_BOOL:C/.*/-D&:BOOL=false/}
+. endif
. for configure in CONFIGURE CMAKE QMAKE
. if defined(${opt}_${configure}_OFF)
${configure}_ARGS+= ${${opt}_${configure}_OFF}