Commit ab404c5f authored by Ralf Habacker's avatar Ralf Habacker Committed by Simon McVittie
Browse files

cmake: rename tristateoption() to add_auto_option() and make signature compatible to option()

parent 3f3368b4
...@@ -204,11 +204,11 @@ endmacro() ...@@ -204,11 +204,11 @@ endmacro()
# #
# provide option with three states AUTO, ON, OFF # provide option with three states AUTO, ON, OFF
# #
macro(tristateoption _name _default _text) macro(add_auto_option _name _text _default)
if(NOT DEFINED ${_name}) if(NOT DEFINED ${_name})
set(${_name} ${_default} CACHE STRING "${_text}" FORCE) set(${_name} ${_default} CACHE STRING "${_text}" FORCE)
else() else()
set(${_name} ${_default} CACHE STRING "${_text}") set(${_name} ${_default} CACHE STRING "${_text}")
endif() endif()
set_property(CACHE ${_name} PROPERTY STRINGS AUTO ON OFF) set_property(CACHE ${_name} PROPERTY STRINGS AUTO ON OFF)
endmacro(tristateoption) endmacro()
...@@ -8,7 +8,7 @@ add_custom_target(doc ALL) ...@@ -8,7 +8,7 @@ add_custom_target(doc ALL)
if(DOXYGEN_EXECUTABLE) if(DOXYGEN_EXECUTABLE)
option(DBUS_ENABLE_DOXYGEN_DOCS "build DOXYGEN documentation (requires Doxygen)" ON) option(DBUS_ENABLE_DOXYGEN_DOCS "build DOXYGEN documentation (requires Doxygen)" ON)
tristateoption(ENABLE_QT_HELP AUTO "build qt help documentation (requires qhelpgenerator(-qt5)); set INSTALL_QCH_DIR for custom qch installation path") add_auto_option(ENABLE_QT_HELP "build qt help documentation (requires qhelpgenerator(-qt5)); set INSTALL_QCH_DIR for custom qch installation path" AUTO)
endif() endif()
if(DBUS_ENABLE_DOXYGEN_DOCS) if(DBUS_ENABLE_DOXYGEN_DOCS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment