Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix static build #538

Merged
merged 4 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
qt_version: "6.3.*"
- name: ci-qtquick-qt6
qt_version: "6.3.*"
- name: ci-dev-static-qt6
qt_version: "6.3.*"

include:
- os: ubuntu-latest
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ option(KDDockWidgets_TESTS "Build the tests" OFF)
option(KDDockWidgets_WAYLAND_TESTS "Build the wayland tests" OFF)
option(KDDockWidgets_EXAMPLES "Build the examples" ON)
option(KDDockWidgets_DOCS "Build the API documentation" OFF)
option(KDDockWidgets_WERROR "Use -Werror (will be true for developer-mode unconditionally)" ${KDDockWidgets_DEVELOPER_MODE})
option(KDDockWidgets_WERROR "Use -Werror (will be true for developer-mode unconditionally)"
${KDDockWidgets_DEVELOPER_MODE}
)
option(KDDockWidgets_X11EXTRAS
"Link against QtX11Extras to detect if the compositor supports transparency. Not applicable on non-Linux or Qt6."
ON
Expand Down Expand Up @@ -512,6 +514,11 @@ endif()
# workaround for CMAKE_CURRENT_FUNCTION_LIST_DIR below CMake 3.17
set(KKDockWidgets_PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR})

find_package(KDBindings QUIET)
if(NOT TARGET KDAB::KDBindings)
include(src/kdbindings.cmake)
endif()

if(KDDockWidgets_TESTS)
enable_testing()
endif()
Expand Down
6 changes: 0 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,6 @@ else()
set(DOCKS_INCLUDES_INSTALL_PATH "include/")
endif()

find_package(KDBindings QUIET)

if(NOT TARGET KDAB::KDBindings)
include(kdbindings.cmake)
endif()

target_include_directories(
kddockwidgets
PUBLIC $<INSTALL_INTERFACE:${DOCKS_INCLUDES_INSTALL_PATH}>
Expand Down
6 changes: 3 additions & 3 deletions src/kdbindings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
# Use a separate target for our kdbindings/signal.h header as it doesn't compile
# with -Wweak-vtables

add_library(kdbindings INTERFACE)
add_library(KDAB::KDBindings ALIAS kdbindings)
target_include_directories(kdbindings SYSTEM INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/3rdparty>)
add_library(KDBindings INTERFACE IMPORTED)
add_library(KDAB::KDBindings ALIAS KDBindings)
target_include_directories(KDBindings SYSTEM INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/3rdparty>)
Loading