diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e403abc27..8f1047951a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,11 @@ include(LyXMacros) # 3. parameter: default value, ON or OFF # 4. parameter: system on which option is used: ALL, GCC, MSVC, ... +# Usage LYX_COMBO +# 1. parameter: name without prefix 'LYX_' +# 2. parameter: description +# 3. parameter: default value +# 4-n parameter: possible other string values LYX_OPTION_INIT() @@ -135,6 +140,7 @@ LYX_OPTION(DEPENDENCIES_DOWNLOAD "Download dependencies for MSVC 10" OFF MSVC) # APPLE specific LYX_OPTION(DMG "Build as Mac bundle, needed for .dmg (experimental) " OFF MAC) LYX_OPTION(COCOA "Use Cocoa on Mac" OFF MAC) +LYX_COMBO(USE_QT "Use Qt version as frontend (QT4 QT5)" QT4 QT5) if(help OR HELP) @@ -836,6 +842,7 @@ endif() message(STATUS) message(STATUS "Build options, switch LYX_* variables by -DLYX_*=ON or OFF:") message(STATUS) + LYX_OPTION_LIST_ALL(used) diff --git a/development/cmake/modules/LyXMacros.cmake b/development/cmake/modules/LyXMacros.cmake index 2ef578900b..2bddaaf079 100644 --- a/development/cmake/modules/LyXMacros.cmake +++ b/development/cmake/modules/LyXMacros.cmake @@ -174,7 +174,7 @@ macro(lyx_const_touched_files _allinone_name _list) else() lyx_add_info_files(MergedFiles ${${_list}}) endif() - + set(${_file_list} ${_file_const} ${_file_touched} ${lyx_${groupname}_info_files}) foreach (_current_FILE ${${_list}}) @@ -233,6 +233,11 @@ macro(LYX_OPTION _name _description _default _sys) set(LYX_${_name}_show_message ${_msg}) endmacro() +macro(LYX_COMBO _name _description _default) + set(LYX_${_name} ${_default} CACHE STRING "${_description}") + set_property(CACHE LYX_${_name} PROPERTY STRINGS ${_default} ${ARGN}) + list(APPEND LYX_OPTIONS LYX_${_name}) +endmacro() macro(LYX_OPTION_LIST_ALL) if(UNIX)