aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmed Yarub Hani Al Nuaimi <ahmedyarub@yahoo.com>2021-09-22 17:35:59 -0300
committerGitHub <noreply@github.com>2021-09-22 13:35:59 -0700
commit9d892ff9270f2d2fe3b8e490471f0a7dfa78981e (patch)
tree6b94ed765f3521a052edc68d47676da67b5a6932
parent48aeaba25e319844a44b44a1d562ac0eeab8ce26 (diff)
downloadvcpkg-9d892ff9270f2d2fe3b8e490471f0a7dfa78981e.tar.gz
vcpkg-9d892ff9270f2d2fe3b8e490471f0a7dfa78981e.zip
[libwebsockets] Enable separate debug and release builds (#20251)
* Enable separate release and debug builds for libwebsockets * Update libwebsockets's port version * Refactoring * Refactoring Co-authored-by: Ahmed Yarub Hani Al Nuaimi <ahmed.alnuaimi@zwift.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
-rw-r--r--ports/libwebsockets/portfile.cmake14
-rw-r--r--ports/libwebsockets/vcpkg.json1
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/l-/libwebsockets.json5
4 files changed, 15 insertions, 7 deletions
diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake
index 4bbaefbb8..d99a2ed19 100644
--- a/ports/libwebsockets/portfile.cmake
+++ b/ports/libwebsockets/portfile.cmake
@@ -163,12 +163,14 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/libwebsockets-test-server")
file(READ "${CURRENT_PACKAGES_DIR}/share/libwebsockets/libwebsockets-config.cmake" LIBWEBSOCKETSCONFIG_CMAKE)
string(REPLACE "/../include" "/../../include" LIBWEBSOCKETSCONFIG_CMAKE "${LIBWEBSOCKETSCONFIG_CMAKE}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/libwebsockets/libwebsockets-config.cmake" "${LIBWEBSOCKETSCONFIG_CMAKE}")
-file(READ "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake" LIBWEBSOCKETSTARGETSDEBUG_CMAKE)
-string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSDEBUG_CMAKE "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}")
-file(WRITE "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake" "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}")
-file(READ "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake" LIBWEBSOCKETSTARGETSRELEASE_CMAKE)
-string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSRELEASE_CMAKE "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}")
-file(WRITE "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake" "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}")
+
+if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ vcpkg_replace_string( "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake" "websockets_static.lib" "websockets.lib")
+endif()
+
+if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
+ vcpkg_replace_string( "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake" "websockets_static.lib" "websockets.lib")
+endif()
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
if (VCPKG_TARGET_IS_WINDOWS)
diff --git a/ports/libwebsockets/vcpkg.json b/ports/libwebsockets/vcpkg.json
index e33c30a2e..677e02c2e 100644
--- a/ports/libwebsockets/vcpkg.json
+++ b/ports/libwebsockets/vcpkg.json
@@ -1,6 +1,7 @@
{
"name": "libwebsockets",
"version-semver": "4.2.2",
+ "port-version": 1,
"description": "Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server.",
"homepage": "https://github.com/warmcat/libwebsockets",
"supports": "!(arm | uwp)",
diff --git a/versions/baseline.json b/versions/baseline.json
index 6f5a2a5f9..c977d55ca 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -3898,7 +3898,7 @@
},
"libwebsockets": {
"baseline": "4.2.2",
- "port-version": 0
+ "port-version": 1
},
"libxdiff": {
"baseline": "0.23",
diff --git a/versions/l-/libwebsockets.json b/versions/l-/libwebsockets.json
index 50ea7bdaa..6ececa656 100644
--- a/versions/l-/libwebsockets.json
+++ b/versions/l-/libwebsockets.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "1f861f30fa2d88ebb0547f48940266517b015cc3",
+ "version-semver": "4.2.2",
+ "port-version": 1
+ },
+ {
"git-tree": "d3336ccb948156f48c50ee15980a5bb56374d3b3",
"version-semver": "4.2.2",
"port-version": 0