diff options
author | Jean-Michaël Celerier <jean-michael.celerier@kdab.com> | 2019-02-11 12:12:07 +0100 |
---|---|---|
committer | Jean-Michaël Celerier <jean-michael.celerier@kdab.com> | 2019-05-02 11:41:55 +0000 |
commit | 1b36fe53c621a4f37322c1bca755989d76b7d3cf (patch) | |
tree | b5a8c1a8ca61be00cc8a53a1c6c6e0fdebd3b688 /src | |
parent | 94c9d15355e07113da693f067c1ac15e5f7dc8d7 (diff) |
cmake: export locally-built dependencies in static build
Change-Id: Ifbcedd32cef3b9c8b4b8c9ca0d229850f696f406
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/harfbuzz/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/corelib/CMakeLists.txt | 7 |
3 files changed, 16 insertions, 2 deletions
diff --git a/src/3rdparty/harfbuzz/CMakeLists.txt b/src/3rdparty/harfbuzz/CMakeLists.txt index 25a3b75d2f..3eaddbb2db 100644 --- a/src/3rdparty/harfbuzz/CMakeLists.txt +++ b/src/3rdparty/harfbuzz/CMakeLists.txt @@ -8,4 +8,7 @@ add_library(QtHarfBuzz STATIC src/harfbuzz-open.c src/harfbuzz-stream.c ) -target_include_directories(QtHarfBuzz PUBLIC src) +target_include_directories(QtHarfBuzz PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>) + +qt_install_3rdparty_library(QtHarfBuzz) diff --git a/src/3rdparty/tinycbor/CMakeLists.txt b/src/3rdparty/tinycbor/CMakeLists.txt index 3a1a760af9..d0c90165bf 100644 --- a/src/3rdparty/tinycbor/CMakeLists.txt +++ b/src/3rdparty/tinycbor/CMakeLists.txt @@ -1,2 +1,6 @@ add_library(tinycbor INTERFACE) -target_include_directories(tinycbor INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/src") +target_include_directories(tinycbor + INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>) + +qt_install_3rdparty_library(tinycbor) diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 5aee60e7e1..ba75c4cdb4 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -268,6 +268,13 @@ target_include_directories(Core_qobject PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/ker target_link_libraries(Core_qobject PRIVATE Qt::Platform Qt::GlobalConfig) target_link_libraries(Core PRIVATE Core_qobject) +if(NOT BUILD_SHARED_LIBS) + install( + TARGETS Core_qobject + EXPORT "${INSTALL_CMAKE_NAMESPACE}Targets" + ) +endif() + set_property(TARGET Core APPEND PROPERTY PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig.h") set_property(TARGET Core APPEND PROPERTY |