diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-12-30 23:55:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-01-10 14:44:50 (GMT) |
commit | c8ee07d0adade6b838c0ee8e7c2549285a3b6b85 (patch) | |
tree | 8be40446b76270cd9213d5105b227d5c7bed052b /Tests/Qt4Targets | |
parent | c2cde7f1047b2f11e7d4a466000a20d8c42394be (diff) | |
download | CMake-c8ee07d0adade6b838c0ee8e7c2549285a3b6b85.zip CMake-c8ee07d0adade6b838c0ee8e7c2549285a3b6b85.tar.gz CMake-c8ee07d0adade6b838c0ee8e7c2549285a3b6b85.tar.bz2 |
FindQt4: Add INTERFACE includes and defines to Qt4 targets
Diffstat (limited to 'Tests/Qt4Targets')
-rw-r--r-- | Tests/Qt4Targets/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/Qt4Targets/main.cpp | 8 |
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); |