aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-05-28 12:03:24 +0200
committerEike Ziller <eike.ziller@qt.io>2019-05-28 11:15:22 +0000
commit9989406106e48e0405a43289112f5c70d8f2beed (patch)
treeb5ae639c2d9e2c5c559012e4ec8c7c21bf8c2e88 /src/CMakeLists.txt
parentcc877949cacf036f7c279087b3e3f47286be3566 (diff)
CMake build: Fix qtc_extend_plugin if plugin is disabled by CONDITION
It should be a no-op in that case, but still error if the plugin target name passed to qtc_extend_plugin is wrong. Change-Id: I97579e658d4b42108fbc2600aad550c6a7b7f11b Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f70eb8dc18..0a8825990a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -193,8 +193,14 @@ function(find_dependent_plugins varName)
endfunction()
function(qtc_plugin_enabled varName name)
- string(TOUPPER "BUILD_PLUGIN_${name}" _build_plugin_var)
- set(${varName} ${${_build_plugin_var}} PARENT_SCOPE)
+ if (NOT (name IN_LIST __QTC_PLUGINS))
+ message(FATAL_ERROR "extend_qtc_plugin: Unknown plugin target \"${name}\"")
+ endif()
+ if (TARGET ${name})
+ set(${varName} ON PARENT_SCOPE)
+ else()
+ set(${varName} OFF PARENT_SCOPE)
+ endif()
endfunction()
function(add_qtc_plugin target_name)