[libsigcpp] Bump to 3.8.0 & Fix static linkage on windows (#50868)

This commit is contained in:
Weihang Ding 2026-03-31 14:26:38 +08:00 committed by GitHub
parent 56383da6ba
commit 6a99397dd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 52 additions and 21 deletions

View File

@ -1,14 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,9 +16,9 @@
cmake_minimum_required (VERSION 3.2)
set (SIGCXX_MAJOR_VERSION 3)
-set (SIGCXX_MINOR_VERSION 4)
+set (SIGCXX_MINOR_VERSION 6)
set (SIGCXX_MICRO_VERSION 0)
set (SIGCXX_API_VERSION 3.0)
set (PACKAGE_VERSION ${SIGCXX_MAJOR_VERSION}.${SIGCXX_MINOR_VERSION}.${SIGCXX_MICRO_VERSION})

View File

@ -2,13 +2,12 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO libsigcplusplus/libsigcplusplus REPO libsigcplusplus/libsigcplusplus
REF "${VERSION}" REF "${VERSION}"
SHA512 0d22275995a1629ae73b0cc2b2f2598b18aa0ed6d35bd3f1735a50f54d356fb248dedc8d9b5f2794830866b04e0f58ce641048e2df7215ec2e6eac744de58a27 SHA512 8fc90594fe161a4fd82b88fe4b0cb5b667d61712dae47982ba569775b4a855e03d4b30d3ba232f96e6a98f87473f7c9d4948b7a17a3f9ca2da547f95b6f91a40
HEAD_REF master HEAD_REF master
PATCHES PATCHES
disable_tests_enable_static_build.patch disable_tests_enable_static_build.patch
fix-shared-windows-build.patch fix-shared-windows-build.patch
fix_include_path.patch fix_include_path.patch
fix_version.patch
) )
vcpkg_cmake_configure( vcpkg_cmake_configure(
@ -20,7 +19,9 @@ vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(PACKAGE_NAME sigc++-3 CONFIG_PATH lib/cmake/sigc++-3) vcpkg_cmake_config_fixup(PACKAGE_NAME sigc++-3 CONFIG_PATH lib/cmake/sigc++-3)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sigc++config.h" "ifdef BUILD_SHARED" "if 1" IGNORE_UNCHANGED) vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sigc++config.h" "#ifdef SIGC_DLL" "#if 1")
else()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sigc++config.h" "#ifdef SIGC_DLL" "#if 0")
endif() endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

View File

@ -1,7 +1,6 @@
{ {
"name": "libsigcpp", "name": "libsigcpp",
"version": "3.6.0", "version": "3.8.0",
"port-version": 2,
"description": "Typesafe callback framework for C++", "description": "Typesafe callback framework for C++",
"homepage": "https://libsigcplusplus.github.io/libsigcplusplus/", "homepage": "https://libsigcplusplus.github.io/libsigcplusplus/",
"license": "LGPL-3.0-or-later", "license": "LGPL-3.0-or-later",

View File

@ -0,0 +1,4 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
vcpkg_cmake_configure(SOURCE_PATH "${CURRENT_PORT_DIR}/project")
vcpkg_cmake_build()

View File

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.10)
project(vcpkg_ci_libsigcpp)
set(CMAKE_CXX_STANDARD 17)
find_package(sigc++-3 CONFIG REQUIRED)
add_executable(vcpkg_ci_libsigcpp main.cpp)
target_link_libraries(vcpkg_ci_libsigcpp PRIVATE sigc-3.0)

View File

@ -0,0 +1,14 @@
#include <sigc++/sigc++.h>
#include <iostream>
#include <string>
void on_print(const std::string &str) {
std::cout << str;
}
int main() {
sigc::signal<void(const std::string &)> signal_print;
signal_print.connect(sigc::ptr_fun(&on_print));
signal_print.emit("hello world\n");
return 0;
}

View File

@ -0,0 +1,13 @@
{
"name": "vcpkg-ci-libsigcpp",
"version-date": "2026-03-31",
"description": "Validates libsigcpp",
"license": null,
"dependencies": [
"libsigcpp",
{
"name": "vcpkg-cmake",
"host": true
}
]
}

View File

@ -5549,8 +5549,8 @@
"port-version": 0 "port-version": 0
}, },
"libsigcpp": { "libsigcpp": {
"baseline": "3.6.0", "baseline": "3.8.0",
"port-version": 2 "port-version": 0
}, },
"libslirp": { "libslirp": {
"baseline": "4.9.1", "baseline": "4.9.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "ba1c1f9f00c4a0051889a9584c442251c2134dd0",
"version": "3.8.0",
"port-version": 0
},
{ {
"git-tree": "5b48fe434789aee633527a307273c41f0b8be925", "git-tree": "5b48fe434789aee633527a307273c41f0b8be925",
"version": "3.6.0", "version": "3.6.0",