summaryrefslogtreecommitdiffstats
path: root/Tests/Qt4Targets
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Qt4Targets')
-rw-r--r--Tests/Qt4Targets/CMakeLists.txt11
-rw-r--r--Tests/Qt4Targets/main.cpp8
2 files changed, 17 insertions, 2 deletions
diff --git a/Tests/Qt4Targets/CMakeLists.txt b/Tests/Qt4Targets/CMakeLists.txt
index 3adff48..9bd7a64 100644
--- a/Tests/Qt4Targets/CMakeLists.txt
+++ b/Tests/Qt4Targets/CMakeLists.txt
@@ -4,11 +4,18 @@ project(Qt4Targets)
find_package(Qt4 REQUIRED)
-include_directories(${QT_INCLUDES})
-
add_executable(Qt4Targets WIN32 main.cpp)
target_link_libraries(Qt4Targets Qt4::QtGui)
if (WIN32)
target_link_libraries(Qt4Targets Qt4::qtmain)
endif()
+
+set_property(TARGET Qt4Targets APPEND PROPERTY
+ INCLUDE_DIRECTORIES
+ $<TARGET_PROPERTY:Qt4::QtGui,INTERFACE_INCLUDE_DIRECTORIES>
+)
+set_property(TARGET Qt4Targets APPEND PROPERTY
+ COMPILE_DEFINITIONS
+ $<TARGET_PROPERTY:Qt4::QtGui,INTERFACE_COMPILE_DEFINITIONS>
+)
diff --git a/Tests/Qt4Targets/main.cpp b/Tests/Qt4Targets/main.cpp
index f4890fa..3c98c99 100644
--- a/Tests/Qt4Targets/main.cpp
+++ b/Tests/Qt4Targets/main.cpp
@@ -4,6 +4,14 @@
#include <QString>
+#ifndef QT_CORE_LIB
+#error Expected QT_CORE_LIB
+#endif
+
+#ifndef QT_GUI_LIB
+#error Expected QT_GUI_LIB
+#endif
+
int main(int argc, char **argv)
{
QApplication app(argc, argv);