[baresip-libre] use c11 standard (#32235)

* use c11 standard

* fix patch

* fix usage
This commit is contained in:
Mengna Li 2023-06-30 05:33:07 +08:00 committed by GitHub
parent 20e22191dc
commit 82f37d39c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 2 deletions

View File

@ -10,6 +10,7 @@ vcpkg_from_github(
HEAD_REF main HEAD_REF main
PATCHES PATCHES
wip.patch wip.patch
use-c11.patch
) )
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBRE_BUILD_SHARED) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBRE_BUILD_SHARED)
@ -26,7 +27,7 @@ vcpkg_cmake_configure(
) )
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_fixup_pkgconfig() vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libre) vcpkg_cmake_config_fixup(PACKAGE_NAME libre CONFIG_PATH lib/cmake/libre)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

View File

@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b364219..fd662d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,10 @@ else()
set(PROJECT_VERSION_FULL ${PROJECT_VERSION})
endif()
+if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std:c11" )
+endif()
+
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
##############################################################################

View File

@ -1,6 +1,7 @@
{ {
"name": "baresip-libre", "name": "baresip-libre",
"version": "3.2.0", "version": "3.2.0",
"port-version": 1,
"description": "Generic library for real-time communications with async IO support", "description": "Generic library for real-time communications with async IO support",
"homepage": "https://github.com/baresip/re", "homepage": "https://github.com/baresip/re",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "c32aafef7c464cd6b860327ea35759e708f96a77",
"version": "3.2.0",
"port-version": 1
},
{ {
"git-tree": "64ff48f8f4f42472f614ddece58f1249217d252c", "git-tree": "64ff48f8f4f42472f614ddece58f1249217d252c",
"version": "3.2.0", "version": "3.2.0",

View File

@ -486,7 +486,7 @@
}, },
"baresip-libre": { "baresip-libre": {
"baseline": "3.2.0", "baseline": "3.2.0",
"port-version": 0 "port-version": 1
}, },
"basisu": { "basisu": {
"baseline": "1.11", "baseline": "1.11",