Ankur Verma 85f2afaa49
[ankurvdev-embedresource] adding new port (#34401)
* Rename Port to ankurvdev-embedresource

* Add sha

---------

Co-authored-by: Ankur Verma <ankurv@microsoft.com>
2023-10-19 10:51:59 -07:00

30 lines
935 B
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ankurvdev/embedresource
REF "v${VERSION}"
SHA512 96d2208fd5d654dad5662968296fa363cea0a935fec8474b780717c9303d2dd763833370bcdf02d6d63e264368b0955fa1f13c6e55685280df5fdaf9e72b8c9f
HEAD_REF main)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
vcpkg_copy_tools(TOOL_NAMES embedresource AUTO_CLEAN)
file(READ "${CURRENT_PACKAGES_DIR}/share/embedresource/EmbedResourceConfig.cmake" config_contents)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/embedresource/EmbedResourceConfig.cmake"
"find_program(
EMBEDRESOURCE_EXECUTABLE embedresource
PATHS
\"\${CMAKE_CURRENT_LIST_DIR}/../../../${HOST_TRIPLET}/tools/${PORT}\"
NO_DEFAULT_PATH
REQUIRED)
${config_contents}"
)