2018-10-18 02:52:23 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO docopt/docopt.cpp
|
2018-12-18 08:44:08 +08:00
|
|
|
REF 7476f8e56b4650aaeafb4e1cda2e5d8f01fddd97
|
|
|
|
SHA512 6765e8a3a834ad75bd87effee5ac7e174482039d26015346b95d7d64e4e0097cc3f1f2e6fd9e3e5970bf4c5719095c0a3e5edfac18217913dc88fbe569d37ae8
|
2018-10-18 02:52:23 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
001-fix-unresolved-symbol.patch
|
|
|
|
002-fix-install-path.patch
|
|
|
|
install-one-flavor.patch
|
|
|
|
)
|
|
|
|
|
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)
|
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)
|
2018-10-18 02:52:23 +08:00
|
|
|
string(REPLACE "#ifdef DOCOPT_DLL" "#if 1" _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
|
|
|
|
file(INSTALL
|
2023-03-07 07:44:04 +08:00
|
|
|
"${SOURCE_PATH}/LICENSE-MIT"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/docopt" RENAME copyright)
|
2018-10-18 02:52:23 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|