2019-07-22 14:25:18 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO martinh/libconfuse
|
|
|
|
REF 67e1207c8de440525a3fdde1448a586791ebc052
|
|
|
|
SHA512 15d4eb0640fe74cc90910820715a70b2f944d2ed9753cca3be90f0ac6840beeda6a370b0624588d81ed2def2f8463e404473721351a685af711cf1d59efb870a
|
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/config.h.in" DESTINATION "${SOURCE_PATH}")
|
2019-07-22 14:25:18 +08:00
|
|
|
|
|
|
|
vcpkg_find_acquire_program(FLEX)
|
2023-03-08 06:14:52 +08:00
|
|
|
get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY)
|
|
|
|
vcpkg_add_to_path("${FLEX_DIR}")
|
2019-07-22 14:25:18 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-07-22 14:25:18 +08:00
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-07-22 14:25:18 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
vcpkg_replace_string(
|
2023-03-08 06:14:52 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/confuse.h"
|
2019-07-22 14:25:18 +08:00
|
|
|
"ifdef BUILDING_STATIC"
|
|
|
|
"if 1 // ifdef BUILDING_STATIC"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT})
|
2019-07-22 14:25:18 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-07-22 14:25:18 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2023-03-08 06:14:52 +08:00
|
|
|
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
|
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|