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)
This commit is contained in:
parent
6e3401c2ab
commit
5c332ae6cb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=417497
2 changed files with 22 additions and 0 deletions
12
CHANGES
12
CHANGES
|
@ -10,6 +10,18 @@ in the release notes and/or placed into UPDATING.
|
|||
|
||||
All ports committers are allowed to commit to this file.
|
||||
|
||||
20160625:
|
||||
AUTHOR: adamw@FreeBSD.org
|
||||
|
||||
A new ${opt}_CMAKE_BOOL OPTIONS helper has been added. Instead of:
|
||||
|
||||
FOO_CMAKE_ON= -DWITH_FOO:BOOL=YES -DWITH_BAR:BOOL=YES
|
||||
FOO_CMAKE_OFF= -DWITH_FOO:BOOL=NO -DWITH_BAR:BOOL=NO
|
||||
|
||||
you can use this shortcut:
|
||||
|
||||
SOMEOPT_CMAKE_BOOL= WITH_FOO WITH_BAR
|
||||
|
||||
20160525:
|
||||
AUTHOR: mat@FreeBSD.org
|
||||
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue