Skip to content

Commit

Permalink
[cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error…
Browse files Browse the repository at this point in the history
… in vcpkg-cmake-wrappers (#12196)

* fix drive-by error in vcpkg-cmake-wrappers

* rev port versions
  • Loading branch information
strega-nil authored Jul 2, 2020
1 parent 77617e3 commit ef91134
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion ports/cmocka/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: cmocka
Version: 1.1.5
Port-Version: 2
Port-Version: 3
Description: An elegant unit testing framework for C with support for mock objects
4 changes: 2 additions & 2 deletions ports/cmocka/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ _find_package(${ARGS})
get_filename_component(_cmocka_lib_name ${CMOCKA_LIBRARY} NAME)

set(CMOCKA_LIBRARY
debug ${CURRENT_INSTALLED_DIR}/debug/lib/${_cmocka_lib_name}
optimized ${CURRENT_INSTALLED_DIR}/lib/${_cmocka_lib_name}
debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/${_cmocka_lib_name}
optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/${_cmocka_lib_name}
)

set(CMOCKA_LIBRARIES ${CMOCKA_LIBRARY})
2 changes: 1 addition & 1 deletion ports/libarchive/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: libarchive
Version: 3.4.1
Port-Version: 4
Port-Version: 5
Homepage: https://github.com/libarchive/libarchive
Description: Library for reading and writing streaming archives
Build-Depends: zlib
Expand Down
10 changes: 5 additions & 5 deletions ports/libarchive/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
list(APPEND LibArchive_LIBRARIES BZip2::BZip2)
endif()
if(@ENABLE_LIBXML2@)
find_package(LibXml2 REQUIRED)
find_package(LibXml2 REQUIRED)
list(APPEND LibArchive_LIBRARIES LibXml2::LibXml2)
endif()
if(@ENABLE_LZ4@)
Expand All @@ -22,8 +22,8 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
list(APPEND LibArchive_LIBRARIES LibLZMA::LibLZMA)
endif()
if(@ENABLE_LZO@)
find_library(LZO_LIBRARY_DEBUG NAMES lzo2d lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}/debug" NO_DEFAULT_PATH)
find_library(LZO_LIBRARY_RELEASE NAMES lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}" NO_DEFAULT_PATH)
find_library(LZO_LIBRARY_DEBUG NAMES lzo2d lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
find_library(LZO_LIBRARY_RELEASE NAMES lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
if(LZO_LIBRARY_RELEASE)
list(APPEND LibArchive_LIBRARIES optimized ${LZO_LIBRARY_RELEASE})
endif()
Expand All @@ -32,8 +32,8 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
endif()
endif()
if(@ENABLE_ZSTD@)
find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd zstd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}/debug" NO_DEFAULT_PATH)
find_library(ZSTD_LIBRARY_RELEASE NAMES zstd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}" NO_DEFAULT_PATH)
find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd zstd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
find_library(ZSTD_LIBRARY_RELEASE NAMES zstd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
if(ZSTD_LIBRARY_RELEASE)
list(APPEND LibArchive_LIBRARIES optimized ${ZSTD_LIBRARY_RELEASE})
endif()
Expand Down
2 changes: 1 addition & 1 deletion ports/libiconv/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: libiconv
Version: 1.16
Port-Version: 4
Port-Version: 5
Homepage: https://www.gnu.org/software/libiconv/
Description: GNU Unicode text conversion
4 changes: 2 additions & 2 deletions ports/libiconv/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ include(SelectLibraryConfigurations)

_find_package(${ARGS})
if(Iconv_FOUND)
find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}/debug" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib)
select_library_configurations(CHARSET)
list(APPEND Iconv_LIBRARIES ${CHARSET_LIBRARIES})
Expand Down
3 changes: 2 additions & 1 deletion ports/libpq/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: libpq
Version: 12.2-3
Version: 12.2
Port-Version: 4
Build-Depends: libpq[bonjour] (osx)
Supports: !uwp
Homepage: https://www.postgresql.org/
Expand Down
2 changes: 1 addition & 1 deletion ports/libpq/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
find_library(PostgreSQL_LIBRARY_DEBUG
NAMES pq
PATHS
"${CURRENT_INSTALLED_DIR}/debug/lib"
"${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib"
NO_DEFAULT_PATH
)
_find_package(${ARGS})
Expand Down
2 changes: 1 addition & 1 deletion ports/libxml2/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: libxml2
Version: 2.9.9
Port-Version: 7
Port-Version: 8
Homepage: https://xmlsoft.org/
Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform)
Build-Depends: zlib, libiconv, liblzma
8 changes: 4 additions & 4 deletions ports/libxml2/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ if(LibXml2_FOUND)
find_package(LibLZMA)
find_package(ZLIB)
include(SelectLibraryConfigurations)
find_library(ICONV_LIBRARY_DEBUG NAMES iconvd libiconvd iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}/debug" NO_DEFAULT_PATH)
find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}" NO_DEFAULT_PATH)
find_library(ICONV_LIBRARY_DEBUG NAMES iconvd libiconvd iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH)
find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib)
find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}/debug" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib)
select_library_configurations(ICONV)
select_library_configurations(CHARSET)
Expand Down
3 changes: 2 additions & 1 deletion ports/plibsys/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: plibsys
Version: 0.0.4-3
Version: 0.0.4
Port-Version: 4
Homepage: https://github.com/saprykin/plibsys
Description: Highly portable C system library: threads and synchronization, sockets, IPC, data structures and more.
Supports: !uwp
4 changes: 2 additions & 2 deletions ports/plibsys/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include(FindPackageHandleStandardArgs)
include(SelectLibraryConfigurations)

find_path(PLIBSYS_INCLUDE_DIR NAMES plibsys.h HINTS ${CURRENT_INSTALLED_DIR} PATH_SUFFIXES plibsys)
find_path(PLIBSYS_INCLUDE_DIR NAMES plibsys.h HINTS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} PATH_SUFFIXES plibsys)

find_library(PLIBSYS_LIBRARY_DEBUG NAMES plibsys plibsysstatic libplibsys NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED)
find_library(PLIBSYS_LIBRARY_RELEASE NAMES plibsys plibsysstatic libplibsys NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED)

select_library_configurations(PLIBSYS)

set(PLIBSYS_INCLUDE_DIRS ${PLIBSYS_INCLUDE_DIR})
set(PLIBSYS_LIBRARIES ${PLIBSYS_LIBRARY})
set(PLIBSYS_LIBRARIES ${PLIBSYS_LIBRARY})

0 comments on commit ef91134

Please sign in to comment.