|
@@ -16,18 +16,7 @@ MACRO(ctkMacroAddCtkLibraryOptions lib)
|
|
|
INCLUDE(${filepath})
|
|
|
|
|
|
FOREACH(option ${ctk_library_options})
|
|
|
-
|
|
|
- # Make sure option is correctly formated
|
|
|
- IF(NOT "${option}" MATCHES "^[A-Za-z0-9]+:(ON|OFF)")
|
|
|
- MESSAGE(FATAL_ERROR "In ${filepath}, option ${option} is incorrect. Options should be specified using the following format OPT1:[ON|OFF]. For example OPT1:OFF or OPT2:ON")
|
|
|
- ENDIF()
|
|
|
-
|
|
|
- # Extract option name and option default value
|
|
|
- STRING(REPLACE ":" "\\;" option ${option})
|
|
|
- SET(optionlist ${option})
|
|
|
- LIST(GET optionlist 0 option_name)
|
|
|
- LIST(GET optionlist 1 option_value)
|
|
|
-
|
|
|
+ ctkMacroExtractOptionNameAndValue(${option} option_name option_value)
|
|
|
OPTION(CTK_LIB_${lib}_${option_name} "Enable ${lib} Library ${option_name} option." ${option_value})
|
|
|
ENDFOREACH()
|
|
|
|