mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Cmake build: Added convenience macro LYX_COMBO
Will be used later to allow selection between multiple alternatives.
This commit is contained in:
parent
6b4c3036aa
commit
8c0e1b5c70
@ -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)
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user