]> git.lyx.org Git - features.git/commitdiff
Cmake build: Add combo-values to the list of displayed lyx options
authorKornel Benko <kornel@lyx.org>
Sat, 7 Jun 2014 19:00:46 +0000 (21:00 +0200)
committerKornel Benko <kornel@lyx.org>
Sat, 7 Jun 2014 19:00:46 +0000 (21:00 +0200)
CMakeLists.txt
development/cmake/modules/LyXMacros.cmake

index 8f1047951aa650b204da32559db6ee333fe25c93..9fdc28955fa47ff24ae0f91a3229aa5f0838a435 100644 (file)
@@ -840,7 +840,7 @@ if(LYX_ENABLE_URLTESTS)
 endif()
 
 message(STATUS)
-message(STATUS "Build options, switch LYX_* variables by -DLYX_*=ON or OFF:")
+message(STATUS "Build params, switch LYX_* options by -DLYX_*=ON or OFF, LYX_* combos by -DLYX_*=value:")
 message(STATUS)
 
 LYX_OPTION_LIST_ALL(used)
index 2bddaaf079645d37fe499bf24b2af57d8bc9e8cf..4332830c251357430e3d648fe62ebcf0c8ed5367 100644 (file)
@@ -237,6 +237,8 @@ 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})
+  set(LYX_${_name}_show_message ON)
+  set(LYX_${_name}_description ${_description})
 endmacro()
 
 macro(LYX_OPTION_LIST_ALL)
@@ -255,7 +257,10 @@ macro(LYX_OPTION_LIST_ALL)
        foreach(_option ${LYX_OPTIONS})
                if(${_option}_show_message OR ${ARGV0} STREQUAL "help")
                        string(SUBSTRING "${_option}                            " 0 25 _var)
-                       if(${_option})
+                        get_property(_prop CACHE ${_option} PROPERTY STRINGS)
+                        if(_prop)
+                          set(_isset ${${_option}})
+                       elseif(${_option})
                                set(_isset ON)
                        else()
                                set(_isset OFF)