vcpkg/ports/kf5coreaddons/fix_cmake_config.patch
Dawid Wróbel aa65c404c6
[kf5coreaddons] fix Windows static builds & CMake Config (#19439)
* [kf5coreaddons] fix Windows static builds

https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/122

Also:
- replace deprecated functions
- embrace paths in quotes
- actually remove the folders that need to be removed

* [kf5coreaddons] update versions

* [kf5coreaddons] delete redundant REMOVE

* [kf5coreaddons] update versions

* [kf5coreaddons] save data files to default /share location

* [kf5coreaddons] update versions

* [kf5coreaddons] fix CMake Config for static builds

* [kf5coreaddons] update versions

* [kf5coreaddons] update versions

* [kf5coreaddons] fix vcpkg_cmake_config_fixup() usage

* [kf5coreaddons] update versions

* [kf5coreaddons] workaround Linux Inotify issue

* [kf5coreaddons] update versions

* [kf5coreaddons] rename patch file

* [kf5coreaddons] update versions
2021-09-01 11:29:13 -07:00

39 lines
1.1 KiB
Diff

From 4588b0052c11189aa6872e3c3c13f05dbae0c26e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com>
Date: Fri, 27 Aug 2021 02:02:08 +0200
Subject: [PATCH] Add support for static builds
---
KF5CoreAddonsConfig.cmake.in | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/KF5CoreAddonsConfig.cmake.in b/KF5CoreAddonsConfig.cmake.in
index f86b69ff..f9e0d31f 100644
--- a/KF5CoreAddonsConfig.cmake.in
+++ b/KF5CoreAddonsConfig.cmake.in
@@ -18,6 +18,21 @@ else()
set_target_properties(KF5::desktoptojson PROPERTIES IMPORTED_LOCATION ${DESKTOPTOJSON_EXECUTABLE})
endif()
endif()
+
+if(NOT @BUILD_SHARED_LIBS@)
+ if(NOT WIN32)
+ find_dependency(Threads)
+ endif()
+
+ if(@Inotify_FOUND@)
+ find_package(Inotify) # https://bugs.kde.org/show_bug.cgi?id=441604
+ endif()
+
+ if(@Procstat_FOUND@)
+ find_dependency(Procstat)
+ endif()
+endif()
+
include("${CMAKE_CURRENT_LIST_DIR}/KF5CoreAddonsTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/KF5CoreAddonsMacros.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@
--
GitLab