aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-25 15:15:30 +0100
committerStephen Kelly <steveire@gmail.com>2013-01-25 15:21:56 +0100
commite45a33c055f81d2e886605e0fbc87410f29ce298 (patch)
tree5c2ac916b84ad8d3f9a9ed6d42e8ec065d5db326
parent424300c2f66acb3e3a4af72c0a76ed9070448208 (diff)
downloadextra-cmake-modules-e45a33c055f81d2e886605e0fbc87410f29ce298.tar.gz
extra-cmake-modules-e45a33c055f81d2e886605e0fbc87410f29ce298.tar.bz2
Populate INTERFACE properties of Qt targets here until upstream does it.
-rw-r--r--find-modules/FindQt5Transitional.cmake57
1 files changed, 36 insertions, 21 deletions
diff --git a/find-modules/FindQt5Transitional.cmake b/find-modules/FindQt5Transitional.cmake
index 511291b2..8b0f700e 100644
--- a/find-modules/FindQt5Transitional.cmake
+++ b/find-modules/FindQt5Transitional.cmake
@@ -3,31 +3,34 @@ find_package(Qt5Core QUIET)
if (Qt5Core_FOUND)
if (NOT Qt5Transitional_FIND_COMPONENTS)
- foreach(_component
- Core
- Gui
- DBus
- Designer
- Declarative
- Script
- ScriptTools
- Network
- Test
- Xml
- Svg
- Sql
- Widgets
- PrintSupport
- Concurrent
- UiTools
- WebKit
- WebKitWidgets
- OpenGL
- )
+ set(_components
+ Core
+ Gui
+ DBus
+ Designer
+ Declarative
+ Script
+ ScriptTools
+ Network
+ Test
+ Xml
+ Svg
+ Sql
+ Widgets
+ PrintSupport
+ Concurrent
+ UiTools
+ WebKit
+ WebKitWidgets
+ OpenGL
+ )
+ foreach(_component ${_components})
find_package(Qt5${_component})
+
list(APPEND QT_LIBRARIES ${Qt5${_component}_LIBRARIES})
endforeach()
else()
+ set(_components ${Qt5Transitional_FIND_COMPONENTS})
foreach(_component ${Qt5Transitional_FIND_COMPONENTS})
find_package(Qt5${_component} REQUIRED)
if ("${_component}" STREQUAL "WebKit")
@@ -52,6 +55,18 @@ if (Qt5Core_FOUND)
set(Qt5Transitional_FOUND TRUE)
set(QT5_BUILD TRUE)
+ # Temporary until upstream does this:
+ foreach(_component ${_components})
+ if (TARGET Qt5::${_component})
+ set_property(TARGET Qt5::${_component}
+ APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES ${Qt5${_component}_INCLUDE_DIRS})
+ set_property(TARGET Qt5::${_component}
+ APPEND PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS ${Qt5${_component}_COMPILE_DEFINITIONS})
+ endif()
+ endforeach()
+
get_filename_component(_modules_dir "${CMAKE_CURRENT_LIST_DIR}/../modules" ABSOLUTE)
include("${_modules_dir}/ECMQt4To5Porting.cmake") # TODO: Port away from this.
include_directories(${QT_INCLUDES}) # TODO: Port away from this.