mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[civetweb] use newer scripts (#26250)
* [civetweb] use vcpkg-cmake * v db * add patch to fix build * v db
This commit is contained in:
parent
a2968fdd92
commit
52bd38fdf0
37
ports/civetweb/disable_warnings.patch
Normal file
37
ports/civetweb/disable_warnings.patch
Normal file
@ -0,0 +1,37 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1eb391f2c..2665fa73e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -360,6 +360,7 @@ if (CIVETWEB_ENABLE_CXX)
|
||||
else()
|
||||
add_cxx_compiler_flag(-std=${CIVETWEB_CXX_STANDARD})
|
||||
endif()
|
||||
+ if(0)
|
||||
add_cxx_compiler_flag(-Wall)
|
||||
add_cxx_compiler_flag(-Wextra)
|
||||
add_cxx_compiler_flag(-Wshadow)
|
||||
@@ -377,6 +378,7 @@ if (CIVETWEB_ENABLE_CXX)
|
||||
add_cxx_compiler_flag(-Werror)
|
||||
add_cxx_compiler_flag(/WX)
|
||||
endif()
|
||||
+ endif()
|
||||
add_cxx_compiler_flag(-pedantic-errors)
|
||||
add_cxx_compiler_flag(-fvisibility=hidden)
|
||||
add_cxx_compiler_flag(-fstack-protector-strong RELEASE)
|
||||
@@ -403,6 +405,7 @@ endif()
|
||||
|
||||
if (NOT ZEPHYR)
|
||||
#Warnings: enable everything
|
||||
+ if(0)
|
||||
add_c_compiler_flag(-Wall)
|
||||
add_c_compiler_flag(-Wextra)
|
||||
add_c_compiler_flag(-Wshadow)
|
||||
@@ -422,7 +425,7 @@ if (NOT ZEPHYR)
|
||||
add_c_compiler_flag(-Wno-format-nonliteral) # printf(myFormatStringVar, ...)
|
||||
add_c_compiler_flag(-Wno-cast-qual) # const cast
|
||||
add_c_compiler_flag(/Wd4820) # padding
|
||||
-
|
||||
+ endif()
|
||||
add_c_compiler_flag(-pedantic-errors)
|
||||
add_c_compiler_flag(-fvisibility=hidden)
|
||||
add_c_compiler_flag(-fstack-protector-strong RELEASE)
|
@ -6,6 +6,8 @@ vcpkg_from_github(
|
||||
REF eefb26f82b233268fc98577d265352720d477ba4 # v1.15
|
||||
SHA512 5ce962e31b3c07b7110cbc645458dba9c0e26e693fbe3b4a7ffe8a28563827049a22fc5596a911fbcea4d88a9adbef3f82000ff61027ff4387f40e4a4045c26d
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
disable_warnings.patch # cl will simply ignore the other invalid options.
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
@ -13,9 +15,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
ssl CIVETWEB_ENABLE_SSL
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
# PREFER_NINJA - See https://github.com/civetweb/civetweb/issues/1024
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DCIVETWEB_BUILD_TESTING=OFF
|
||||
-DCIVETWEB_ENABLE_DEBUG_TOOLS=OFF
|
||||
@ -25,17 +26,18 @@ vcpkg_configure_cmake(
|
||||
-DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF
|
||||
-DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF
|
||||
-DCIVETWEB_ENABLE_WEBSOCKETS=ON
|
||||
-DCIVETWEB_ALLOW_WARNINGS=ON
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/civetweb)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/civetweb)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
@ -1,10 +1,20 @@
|
||||
{
|
||||
"name": "civetweb",
|
||||
"version": "1.15",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "Easy to use, powerful, C/C++ embeddable web server.",
|
||||
"homepage": "https://github.com/civetweb/civetweb",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"ssl": {
|
||||
"description": "Enable SSL support",
|
||||
|
@ -1402,7 +1402,7 @@
|
||||
},
|
||||
"civetweb": {
|
||||
"baseline": "1.15",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"cjson": {
|
||||
"baseline": "1.7.15",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "f5c4ed510288187d465737a301891b1101d6c373",
|
||||
"version": "1.15",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "0e09fcaf964728e71394be1fc43d018fcde2e355",
|
||||
"version": "1.15",
|
||||
|
Loading…
x
Reference in New Issue
Block a user