summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-07-08 12:17:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-21 16:39:55 +0200
commitee50096830f7915db2078ad66d83283e3c97f5d9 (patch)
tree086d4958e4fa5b5abfa61a8c925ae6bb5f9f2ddf /tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt
parent4ef8144dd6a7a4e493c901c3d1d4bbb7735c161c (diff)
Populate INTERFACE_LINK_LIBRARIES property in the cmake files.
This is new in CMake 2.8.12 and replaces the old properties matching IMPORTED_INTERFACE_LINK_LIBRARIES_<CONFIG>. Change-Id: I5d4c454972f2535f6792e95718c73d80c56ac24c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt')
-rw-r--r--tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt b/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt
new file mode 100644
index 0000000000..d747a43c4a
--- /dev/null
+++ b/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt
@@ -0,0 +1,21 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(test_interface_link_libraries)
+
+find_package(Qt5Gui REQUIRED)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+cmake_policy(SET CMP0022 NEW)
+
+include(GenerateExportHeader)
+
+add_library(somelib SHARED somelib.cpp)
+generate_export_header(somelib)
+set_property(TARGET somelib PROPERTY LINK_LIBRARIES Qt5::Gui)
+set_property(TARGET somelib PROPERTY INTERFACE_LINK_LIBRARIES Qt5::Gui)
+
+add_executable(mainexe main.cpp)
+set_property(TARGET mainexe PROPERTY LINK_LIBRARIES somelib)