+macro(LYX_STRING _name _description _default)
+ set(_lyx_name "LYX_${_name}")
+ list(APPEND LYX_OPTIONS ${_lyx_name})
+ set(${_lyx_name}_show_message ON)
+ set(${_lyx_name}_description "${_description}")
+ list(APPEND LYX_OPTION_STRINGS ${_lyx_name})
+ # Now check the value
+ # Should not contain ' '
+ set(tmp_lyx_name ${${_lyx_name}})
+ if (NOT "${${_lyx_name}}" STREQUAL "")
+ if (NOT "${tmp_lyx_name}" MATCHES "^\\..*$")
+ set(tmp_lyx_name ".${tmp_lyx_name}")
+ endif()
+ if (NOT "${tmp_lyx_name}" MATCHES "^\\.[a-zA-Z_\\.]+$")
+ message(FATAL_ERROR "Invalid string for lyx suffix (${tmp_lyx_name})")
+ endif()
+ endif()
+ set(${_lyx_name} "${tmp_lyx_name}" CACHE STRING "${_description}" FORCE)
+endmacro()
+