mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 10:49:05 +08:00
8ead9c2674
* [many ports]switch to vcpkg-cmake / vckg-cmake-config part 3 * version * typo * version * typo * version * Fix params * version * deprecated vcpkg_extract_source_archive_ex * version * fix arguments * version * Rename argument * version * Deprecate vcpkg_extract_source_archive_ex * version --------- Co-authored-by: jyu49 <yu_jack@apple.com>
40 lines
1.2 KiB
CMake
40 lines
1.2 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO martinh/libconfuse
|
|
REF 67e1207c8de440525a3fdde1448a586791ebc052
|
|
SHA512 15d4eb0640fe74cc90910820715a70b2f944d2ed9753cca3be90f0ac6840beeda6a370b0624588d81ed2def2f8463e404473721351a685af711cf1d59efb870a
|
|
HEAD_REF master
|
|
)
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/config.h.in" DESTINATION "${SOURCE_PATH}")
|
|
|
|
vcpkg_find_acquire_program(FLEX)
|
|
get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY)
|
|
vcpkg_add_to_path("${FLEX_DIR}")
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
vcpkg_replace_string(
|
|
"${CURRENT_PACKAGES_DIR}/include/confuse.h"
|
|
"ifdef BUILDING_STATIC"
|
|
"if 1 // ifdef BUILDING_STATIC"
|
|
)
|
|
endif()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT})
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
# Handle copyright
|
|
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
|
|
|
|
vcpkg_fixup_pkgconfig()
|