mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:23:02 +08:00
[ECM] fix FindCanberra for static builds (#20213)
* [ECM] fix FindCanberra for static builds Also remove dangling do-not-override-custom-clang-format-files.patch * [ECM] use current spec * [ECM] wrap paths in quotes * [ECM] update versions
This commit is contained in:
parent
66dc12b3fa
commit
57ab68daf6
@ -1,33 +0,0 @@
|
|||||||
From 0d5ed9bb9117f6526691b3572bf85090efbeed4a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alexander Lohnau <alexander.lohnau@gmx.de>
|
|
||||||
Date: Sat, 30 Jan 2021 13:44:07 +0100
|
|
||||||
Subject: [PATCH] KDEClangFormat: Do not override custom clang-format files
|
|
||||||
|
|
||||||
---
|
|
||||||
kde-modules/KDEClangFormat.cmake | 13 ++++++++++++-
|
|
||||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/kde-modules/KDEClangFormat.cmake b/kde-modules/KDEClangFormat.cmake
|
|
||||||
index 6cdbd2b5..995f03ad 100644
|
|
||||||
--- a/kde-modules/KDEClangFormat.cmake
|
|
||||||
+++ b/kde-modules/KDEClangFormat.cmake
|
|
||||||
@@ -35,7 +35,18 @@ find_program(KDE_CLANG_FORMAT_EXECUTABLE clang-format)
|
|
||||||
|
|
||||||
# instantiate our clang-format file, must be in source directory for tooling if we have the tool
|
|
||||||
if(KDE_CLANG_FORMAT_EXECUTABLE)
|
|
||||||
- configure_file(${CMAKE_CURRENT_LIST_DIR}/clang-format.cmake ${CMAKE_CURRENT_SOURCE_DIR}/.clang-format @ONLY)
|
|
||||||
+ set(CLANG_FORMAT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/.clang-format)
|
|
||||||
+ if (EXISTS ${CLANG_FORMAT_FILE})
|
|
||||||
+ file(READ ${CLANG_FORMAT_FILE} CLANG_FORMAT_CONTENTS LIMIT 128)
|
|
||||||
+ string(FIND "${CLANG_FORMAT_CONTENTS}" "SPDX-FileCopyrightText: 2019 Christoph Cullmann" matchres)
|
|
||||||
+ if(${matchres} EQUAL -1)
|
|
||||||
+ message(WARNING "The .clang-format file already exists. Please remove it in order to use the file provided by ECM")
|
|
||||||
+ else()
|
|
||||||
+ configure_file(${CMAKE_CURRENT_LIST_DIR}/clang-format.cmake ${CLANG_FORMAT_FILE} @ONLY)
|
|
||||||
+ endif()
|
|
||||||
+ else()
|
|
||||||
+ configure_file(${CMAKE_CURRENT_LIST_DIR}/clang-format.cmake ${CLANG_FORMAT_FILE} @ONLY)
|
|
||||||
+ endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# formatting target
|
|
39
ports/ecm/fix_canberra.patch
Normal file
39
ports/ecm/fix_canberra.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 203c65c562453385e3ffc4485844b15e80b93107 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com>
|
||||||
|
Date: Fri, 17 Sep 2021 00:07:08 +0200
|
||||||
|
Subject: [PATCH] FindCanberra: link against target provided by pkgconfig
|
||||||
|
|
||||||
|
target_link_libraries() against the target generated by
|
||||||
|
pkg_check_modules() so that the additional linker options are not
|
||||||
|
lost, such as the additional libraries to link against when
|
||||||
|
building statically.
|
||||||
|
|
||||||
|
BUG: 442555
|
||||||
|
---
|
||||||
|
find-modules/FindCanberra.cmake | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/find-modules/FindCanberra.cmake b/find-modules/FindCanberra.cmake
|
||||||
|
index c54adf99..f9561118 100644
|
||||||
|
--- a/find-modules/FindCanberra.cmake
|
||||||
|
+++ b/find-modules/FindCanberra.cmake
|
||||||
|
@@ -34,7 +34,7 @@ Since 5.56.0.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
-pkg_check_modules(PC_Canberra libcanberra QUIET)
|
||||||
|
+pkg_check_modules(PC_Canberra REQUIRED IMPORTED_TARGET libcanberra QUIET)
|
||||||
|
|
||||||
|
find_library(Canberra_LIBRARIES
|
||||||
|
NAMES canberra
|
||||||
|
@@ -66,6 +66,7 @@ if(Canberra_FOUND AND NOT TARGET Canberra::Canberra)
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PC_Canberra_CFLAGS}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${Canberra_INCLUDE_DIRS}"
|
||||||
|
)
|
||||||
|
+ target_link_libraries(Canberra::Canberra INTERFACE PkgConfig::PC_Canberra)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(Canberra_LIBRARIES Canberra_INCLUDE_DIRS Canberra_VERSION)
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@ -4,11 +4,12 @@ vcpkg_from_github(
|
|||||||
REF v5.84.0
|
REF v5.84.0
|
||||||
SHA512 d49397bcf0d49a95c86c9d9a4e653015ee8b3ef1261b2842439bba7ff3363ac06351fa2df4035c2cb36397d2fc64375a14966ada29f231df51ba26d8e196d6ef
|
SHA512 d49397bcf0d49a95c86c9d9a4e653015ee8b3ef1261b2842439bba7ff3363ac06351fa2df4035c2cb36397d2fc64375a14966ada29f231df51ba26d8e196d6ef
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
|
PATCHES
|
||||||
|
fix_canberra.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_cmake_configure(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
PREFER_NINJA
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-DBUILD_HTML_DOCS=OFF
|
-DBUILD_HTML_DOCS=OFF
|
||||||
-DBUILD_MAN_DOCS=OFF
|
-DBUILD_MAN_DOCS=OFF
|
||||||
@ -16,14 +17,14 @@ vcpkg_configure_cmake(
|
|||||||
-DBUILD_TESTING=OFF
|
-DBUILD_TESTING=OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_cmake_install()
|
||||||
|
|
||||||
# Remove debug files
|
# Remove debug files
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
|
||||||
|
|
||||||
file(COPY ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||||
# Handle copyright
|
# Handle copyright
|
||||||
file(INSTALL ${SOURCE_PATH}/COPYING-CMAKE-SCRIPTS DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
file(INSTALL "${SOURCE_PATH}/COPYING-CMAKE-SCRIPTS" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||||
|
|
||||||
# Allow empty include directory
|
# Allow empty include directory
|
||||||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
||||||
|
@ -1,6 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "ecm",
|
"name": "ecm",
|
||||||
"version": "5.84.0",
|
"version": "5.84.0",
|
||||||
|
"port-version": 1,
|
||||||
"description": "Extra CMake Modules (ECM), extra modules and scripts for CMake",
|
"description": "Extra CMake Modules (ECM), extra modules and scripts for CMake",
|
||||||
"homepage": "https://github.com/KDE/extra-cmake-modules"
|
"homepage": "https://github.com/KDE/extra-cmake-modules",
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake",
|
||||||
|
"host": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake-config",
|
||||||
|
"host": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -1910,7 +1910,7 @@
|
|||||||
},
|
},
|
||||||
"ecm": {
|
"ecm": {
|
||||||
"baseline": "5.84.0",
|
"baseline": "5.84.0",
|
||||||
"port-version": 0
|
"port-version": 1
|
||||||
},
|
},
|
||||||
"ecos": {
|
"ecos": {
|
||||||
"baseline": "2.0.8",
|
"baseline": "2.0.8",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "5832b19b778f60eb0fb24654e0c8b665f0f8fb20",
|
||||||
|
"version": "5.84.0",
|
||||||
|
"port-version": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "9cd1bc0ab97889acb8839e22ec43d13bc7c97ed0",
|
"git-tree": "9cd1bc0ab97889acb8839e22ec43d13bc7c97ed0",
|
||||||
"version": "5.84.0",
|
"version": "5.84.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user