[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1458-g6e8d3f0
Stephen Kelly
steveire at gmail.com
Mon Jan 7 16:49:46 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 6e8d3f0bc6678e22361ab2b7a0e06b7d72ef0f19 (commit)
via fb86730a095d2f2d5bc69b4feac562d918e33734 (commit)
from d98f561003af82e31ccae2fa324441c18b5b5c33 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e8d3f0bc6678e22361ab2b7a0e06b7d72ef0f19
commit 6e8d3f0bc6678e22361ab2b7a0e06b7d72ef0f19
Merge: d98f561 fb86730
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 7 16:49:44 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 7 16:49:44 2013 -0500
Merge topic 'qt4-target-depends' into next
fb86730 Add INTERFACE includes and defines to the Qt 4 targets.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb86730a095d2f2d5bc69b4feac562d918e33734
commit fb86730a095d2f2d5bc69b4feac562d918e33734
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 31 00:55:38 2012 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 7 22:48:45 2013 +0100
Add INTERFACE includes and defines to the Qt 4 targets.
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 381141c..73431f8 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -418,6 +418,15 @@ macro (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" )
endif()
endif ()
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "${QT_HEADERS_DIR}/${_camelCaseBasename}"
+ )
+ string(REGEX REPLACE "^QT" "" _stemname ${basename})
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS
+ "QT_${_stemname}_LIB"
+ )
endif()
# If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these
@@ -952,6 +961,14 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
${_PROPERTY}
"Qt4::Qt${_DEPEND}"
)
+ set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "$<TARGET_PROPERTY:Qt4::Qt${_DEPEND},INTERFACE_INCLUDE_DIRECTORIES>"
+ )
+ set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS
+ "$<TARGET_PROPERTY:Qt4::Qt${_DEPEND},INTERFACE_COMPILE_DEFINITIONS>"
+ )
endforeach()
endif()
endmacro()
@@ -968,6 +985,11 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
# Set QT_xyz_LIBRARY variable and add
# library include path to QT_INCLUDES
_QT4_ADJUST_LIB_VARS(QtCore)
+ set_property(TARGET Qt4::QtCore APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "${QT_MKSPECS_DIR}/default"
+ "${QT_HEADERS_DIR}"
+ )
foreach(QT_MODULE ${QT_MODULES})
_QT4_ADJUST_LIB_VARS(${QT_MODULE})
@@ -992,6 +1014,10 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
# headers.
# Everything depends on QtCore, but that is covered above already
_qt4_add_target_depends(Qt3Support Sql Gui Network)
+ if (TARGET Qt4::Qt3Support)
+ # An additional define is required for QT3_SUPPORT
+ set_property(TARGET Qt4::Qt3Support APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT3_SUPPORT)
+ endif()
_qt4_add_target_depends(QtDeclarative Script Gui)
_qt4_add_target_depends(QtDesigner Gui)
_qt4_add_target_depends(QtHelp Gui)
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);
-----------------------------------------------------------------------
Summary of changes:
Modules/FindQt4.cmake | 26 ++++++++++++++++++++++++++
Tests/Qt4Targets/CMakeLists.txt | 11 +++++++++--
Tests/Qt4Targets/main.cpp | 8 ++++++++
3 files changed, 43 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list