[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] build: Enable using QWindowKit from the system.
From: |
Maxim Cournoyer |
Subject: |
[PATCH] build: Enable using QWindowKit from the system. |
Date: |
Thu, 28 Mar 2024 12:55:00 -0400 |
Distributions having their own QWindowKit package can have it used by
specifying the configure flag: -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS
* CMakeLists.txt <QWindowKit>: Fix target name so that find_package
finds it.
<CLIENT_INCLUDE_DIRS>: Remove ${QWindowKit_BINARY_DIR}/include.
Adding the imported target QWindowKit::Quick to
'target_link_libraries' automatically handles the headers.
* tests/CMakeLists.txt: Add ${CLIENT_LIBS} to the link libraries of
test_common_obj.
---
CMakeLists.txt | 4 ++--
tests/CMakeLists.txt | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e802357f..94ade2ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,13 +100,13 @@ endif()
# qwindowkit (frameless window)
add_fetch_content(
- TARGET qwindowkit
+ TARGET QWindowKit
URL https://github.com/stdware/qwindowkit.git
BRANCH 79b1f3110754f9c21af2d7dacbd07b1a9dbaf6ef
PATCHES ${QWINDOWKIT_PATCHES}
OPTIONS ${QWINDOWKIT_OPTIONS}
)
-list(APPEND CLIENT_INCLUDE_DIRS ${QWindowKit_BINARY_DIR}/include)
+
list(APPEND CLIENT_LIBS QWindowKit::Quick)
set(CMAKE_AUTOMOC ON)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index b2730b71..4960899e 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -48,7 +48,7 @@ target_include_directories(test_common_obj PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src)
target_link_directories(test_common_obj PRIVATE ${CLIENT_LINK_DIRS})
-target_link_libraries(test_common_obj ${QML_TEST_LIBS})
+target_link_libraries(test_common_obj ${QML_TEST_LIBS} ${CLIENT_LIBS})
target_compile_definitions(test_common_obj PRIVATE BUILD_TESTING="ON")
set(COMMON_TESTS_SOURCES
base-commit: b88627d125b7d217a46f76f62edf4852bcffa36b
--
2.41.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] build: Enable using QWindowKit from the system.,
Maxim Cournoyer <=