CMake: Do not include libraries in "all" target

This makes sure creator will not build libraries that are not
needed by the plugins that are enabled.

Change-Id: Ia568d56be24d47d895d70cc78f6601dd611f1aaa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Tobias Hunger
2019-05-29 16:29:43 +02:00
parent ce59cf6a50
commit 1ce6c4abc3

View File

@@ -126,7 +126,8 @@ function(add_qtc_library name)
set(library_type OBJECT) set(library_type OBJECT)
endif() endif()
add_library(${name} ${library_type} ${_arg_SOURCES}) # Do not just build libraries...
add_library(${name} ${library_type} EXCLUDE_FROM_ALL ${_arg_SOURCES})
if (${name} MATCHES "^[^0-9]+") if (${name} MATCHES "^[^0-9]+")
string(TOUPPER "${name}_LIBRARY" EXPORT_SYMBOL) string(TOUPPER "${name}_LIBRARY" EXPORT_SYMBOL)