vcpkg/ports/lexbor/portfile.cmake
Leonid Pospelov a618637937
[lexbor] Add new port (#31415)
* [lexbor] Add new port

* .

* addver

* addver

* ver

* Update ports/lexbor/portfile.cmake

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>

* Update ports/lexbor/portfile.cmake

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>

* Update lexbor.json

---------

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
2023-05-16 10:47:59 -07:00

26 lines
846 B
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO lexbor/lexbor
REF v${VERSION}
SHA512 26bbca3b41a417cbc59ba8cf736e1611966fc2202de85aabf621b840565d835e7e5ffc1b0294defc16ec883f9fb94e802bd19ed704be35fa79b41566acc05cbc
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DLEXBOR_BUILD_SHARED=${BUILD_SHARED}
-DLEXBOR_BUILD_STATIC=${BUILD_STATIC}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/include/lexbor/html/tree/insertion_mode"
"${CURRENT_PACKAGES_DIR}/debug/include/lexbor/html/tree/insertion_mode"
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")