aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-05-27 16:09:09 +0200
committerEike Ziller <eike.ziller@qt.io>2019-05-27 14:24:04 +0000
commit2874611ec05ecede92d85fb4f3fde0476da1ebb7 (patch)
treea5a2d68ace03376756ee48461cd0b8926f8cabc1 /src/CMakeLists.txt
parente0b0a08e50cef4c91808e30c2d3d33ee1b0cd0b8 (diff)
CMake: Save a list of known Qt Creator specific targets
This list can be used to decide whether a target should be known. Change-Id: I09f1d693c38974fff04c514abe52cac740e53c46 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7380fdde07..f70eb8dc18 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,6 +6,17 @@ list(APPEND DEFAULT_DEFINES
QT_USE_FAST_CONCATENATION
)
+set(__QTC_PLUGINS "" CACHE INTERNAL "*** Internal ***" FORCE)
+set(__QTC_LIBRARIES "" CACHE INTERNAL "*** Internal ***" FORCE)
+set(__QTC_EXECUTABLES "" CACHE INTERNAL "*** Internal ***" FORCE)
+set(__QTC_TESTS "" CACHE INTERNAL "*** Internal ***" FORCE)
+
+function(update_cached_list name value)
+ set(_tmp_list "${${name}}")
+ list(APPEND _tmp_list "${value}")
+ set("${name}" "${_tmp_list}" CACHE INTERNAL "*** Internal ***" FORCE)
+endfunction()
+
function(compare_sources_with_existing_disk_files target_name sources)
if(NOT WITH_DEBUG_CMAKE)
return()
@@ -96,6 +107,8 @@ function(add_qtc_library name)
message(FATAL_ERROR "add_qtc_library had unparsed arguments")
endif()
+ update_cached_list(__QTC_LIBRARIES "${name}")
+
compare_sources_with_existing_disk_files(${name} "${_arg_SOURCES}")
set(library_type SHARED)
@@ -196,6 +209,8 @@ function(add_qtc_plugin target_name)
message(FATAL_ERROR "add_qtc_plugin had unparsed arguments")
endif()
+ update_cached_list(__QTC_PLUGINS "${target_name}")
+
set(name ${target_name})
if (_arg_PLUGIN_NAME)
set(name ${_arg_PLUGIN_NAME})
@@ -393,6 +408,8 @@ function(add_qtc_executable name)
message(FATAL_ERROR "add_qtc_executable had unparsed arguments!")
endif()
+ update_cached_list(__QTC_EXECUTABLES "${name}")
+
set(_DESTINATION "${IDE_LIBEXEC_PATH}")
if (_arg_DESTINATION)
set(_DESTINATION "${_arg_DESTINATION}")
@@ -434,6 +451,8 @@ function(add_qtc_test name)
message(FATAL_ERROR "add_qtc_test had unparsed arguments!")
endif()
+ update_cached_list(__QTC_TESTS "${name}")
+
set(TEST_DEFINES SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
file(RELATIVE_PATH _RPATH "/${IDE_BIN_PATH}" "/${IDE_LIBRARY_PATH}")