Skip to content

Commit

Permalink
Fix c-ares compilation under Linux with dynamic linkage (#19126)
Browse files Browse the repository at this point in the history
* Fix c-ares compilation under Linux with shared linkage

* Update version

* Update version file

Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
  • Loading branch information
ahojnnes and vicroms committed Aug 2, 2021
1 parent 7793524 commit 9db6c29
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ports/c-ares/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/ares.h
"#ifdef CARES_STATICLIB" "#if 1"
)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL static OR NOT VCPKG_TARGET_IS_WINDOWS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") # Empty folders
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")

# Handle copyright
Expand Down
2 changes: 1 addition & 1 deletion ports/c-ares/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "c-ares",
"version": "1.17.1",
"port-version": 1,
"port-version": 2,
"description": "A C library for asynchronous DNS requests",
"homepage": "https://github.com/c-ares/c-ares",
"supports": "!uwp"
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@
},
"c-ares": {
"baseline": "1.17.1",
"port-version": 1
"port-version": 2
},
"c4core": {
"baseline": "2021-07-18",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/c-ares.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5d48aae0b9e4a0e201eab417117bab9491665193",
"version": "1.17.1",
"port-version": 2
},
{
"git-tree": "1e8d84e28abdb8437a2665651b4359da40a3333f",
"version": "1.17.1",
Expand Down

0 comments on commit 9db6c29

Please sign in to comment.