2018-05-03 14:31:21 +09:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO commonmark/cmark
|
2023-10-03 11:53:42 +08:00
|
|
|
REF "${VERSION}"
|
2024-09-26 07:44:12 -07:00
|
|
|
SHA512 3b4f8b47d8ea270078ab986aa22fc32b227786459bd33c7225aac578d8dd014e3d8788a6add60ea10571fdb4c7dc6a1ece960815a02f04f153b1775c73ccff8f
|
2018-05-03 14:31:21 +09:00
|
|
|
HEAD_REF master
|
2018-06-30 21:05:51 -07:00
|
|
|
PATCHES
|
2021-09-16 05:12:57 +08:00
|
|
|
add-feature-tools.patch
|
2018-05-03 14:31:21 +09:00
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CMARK_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CMARK_SHARED)
|
|
|
|
|
2021-09-16 05:12:57 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
tools BUILD_TOOLS
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
2018-05-03 14:31:21 +09:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
2021-09-16 05:12:57 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2024-09-26 07:44:12 -07:00
|
|
|
-DBUILD_TESTING=OFF
|
2018-05-03 14:31:21 +09:00
|
|
|
-DCMARK_SHARED=${CMARK_SHARED}
|
|
|
|
-DCMARK_STATIC=${CMARK_STATIC}
|
|
|
|
)
|
|
|
|
|
2021-09-16 05:12:57 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-05-03 14:31:21 +09:00
|
|
|
|
2021-09-16 05:12:57 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cmark)
|
2018-05-03 14:31:21 +09:00
|
|
|
|
2021-09-16 05:12:57 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-05-03 14:31:21 +09:00
|
|
|
|
2021-09-16 05:12:57 +08:00
|
|
|
if ("tools" IN_LIST FEATURES)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES cmark SEARCH_DIR "${CURRENT_PACKAGES_DIR}/tools/cmark" AUTO_CLEAN)
|
2018-06-30 21:05:51 -07:00
|
|
|
endif()
|
|
|
|
|
2021-09-16 05:12:57 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2018-05-03 14:31:21 +09:00
|
|
|
endif()
|
2021-09-16 05:12:57 +08:00
|
|
|
|
2024-09-26 07:44:12 -07:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|