summaryrefslogtreecommitdiffstats
path: root/cmake/QtFeature.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtFeature.cmake')
-rw-r--r--cmake/QtFeature.cmake34
1 files changed, 18 insertions, 16 deletions
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
index 4a8449405e..13d0203612 100644
--- a/cmake/QtFeature.cmake
+++ b/cmake/QtFeature.cmake
@@ -1,9 +1,9 @@
function(qt_feature_module_begin)
qt_parse_all_arguments(arg "qt_feature_module_begin"
- "" "LIBRARY;PRIVATE_FILE;PUBLIC_FILE" "PUBLIC_DEPENDENCIES;PRIVATE_DEPENDENCIES" ${ARGN})
+ "NO_MODULE" "LIBRARY;PRIVATE_FILE;PUBLIC_FILE" "PUBLIC_DEPENDENCIES;PRIVATE_DEPENDENCIES" ${ARGN})
- if ("${arg_LIBRARY}" STREQUAL "")
- message(FATAL_ERROR "qt_feature_begin_module needs a LIBRARY name!")
+ if ("${arg_LIBRARY}" STREQUAL "" AND (NOT ${arg_NO_MODULE}))
+ message(FATAL_ERROR "qt_feature_begin_module needs a LIBRARY name! (or specify NO_MODULE)")
endif()
if ("${arg_PUBLIC_FILE}" STREQUAL "")
message(FATAL_ERROR "qt_feature_begin_module needs a PUBLIC_FILE name!")
@@ -357,21 +357,23 @@ function(qt_feature_module_end target)
)
qt_generate_forwarding_headers("${__QtFeature_library}" SOURCE "${__QtFeature_public_file}")
- get_target_property(targetType "${target}" TYPE)
- if("${targetType}" STREQUAL "INTERFACE_LIBRARY")
- set(propertyPrefix "INTERFACE_")
- else()
- set(propertyPrefix "")
- set_target_properties("${target}" PROPERTIES EXPORT_PROPERTIES "QT_ENABLED_PUBLIC_FEATURES;QT_DISABLED_PUBLIC_FEATURES;QT_ENABLED_PRIVATE_FEATURES;QT_DISABLED_PRIVATE_FEATURES")
- endif()
- foreach(visibility public private)
- string(TOUPPER "${visibility}" capitalVisibility)
- foreach(state enabled disabled)
- string(TOUPPER "${state}" capitalState)
+ if (NOT ("${target}" STREQUAL "NO_MODULE"))
+ get_target_property(targetType "${target}" TYPE)
+ if("${targetType}" STREQUAL "INTERFACE_LIBRARY")
+ set(propertyPrefix "INTERFACE_")
+ else()
+ set(propertyPrefix "")
+ set_target_properties("${target}" PROPERTIES EXPORT_PROPERTIES "QT_ENABLED_PUBLIC_FEATURES;QT_DISABLED_PUBLIC_FEATURES;QT_ENABLED_PRIVATE_FEATURES;QT_DISABLED_PRIVATE_FEATURES")
+ endif()
+ foreach(visibility public private)
+ string(TOUPPER "${visibility}" capitalVisibility)
+ foreach(state enabled disabled)
+ string(TOUPPER "${state}" capitalState)
- set_property(TARGET "${target}" PROPERTY ${propertyPrefix}QT_${capitalState}_${capitalVisibility}_FEATURES "${${state}_${visibility}_features}")
+ set_property(TARGET "${target}" PROPERTY ${propertyPrefix}QT_${capitalState}_${capitalVisibility}_FEATURES "${${state}_${visibility}_features}")
+ endforeach()
endforeach()
- endforeach()
+ endif()
unset(__QtFeature_library PARENT_SCOPE)
unset(__QtFeature_private_features PARENT_SCOPE)