2018-10-18 02:52:23 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO docopt/docopt.cpp
|
2024-03-01 15:07:01 +08:00
|
|
|
REF 400e6dd8e59196c914dcc2c56caf7dae7efa5eb3
|
|
|
|
SHA512 a9ef466ba40127f636bc20beb7508c4da2dc32c0c37acb5729644f31d4910d9c0253f311457f39ed57605775e72f3370aff4e5ef88e60a49d190bc4760c40ea3
|
2018-10-18 02:52:23 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-10-18 02:52:23 +08:00
|
|
|
OPTIONS
|
|
|
|
-DWITH_EXAMPLE=OFF
|
|
|
|
-DWITH_TESTS=OFF
|
|
|
|
-DUSE_BOOST_REGEX=OFF
|
|
|
|
)
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-10-18 02:52:23 +08:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/docopt)
|
2024-03-01 15:07:01 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-10-18 02:52:23 +08:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2018-10-18 02:52:23 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
2023-03-07 07:44:04 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/include/docopt/docopt.h" _contents)
|
2024-04-29 21:40:50 +08:00
|
|
|
string(REPLACE "#ifdef DOCOPT_DLL" "#ifdef _WIN32" _contents "${_contents}")
|
2023-03-07 07:44:04 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/include/docopt/docopt.h" "${_contents}")
|
2018-10-18 02:52:23 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Header-only style when DOCOPT_HEADER_ONLY is defined
|
|
|
|
file(COPY
|
2023-03-07 07:44:04 +08:00
|
|
|
"${SOURCE_PATH}/docopt.cpp"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/include/docopt")
|
2018-10-18 02:52:23 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2024-03-01 15:07:01 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE-MIT" "${SOURCE_PATH}/LICENSE-Boost-1.0")
|
2018-10-18 02:52:23 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|