2023-09-26 09:06:09 +02:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
ARCHIVE
|
|
|
|
URLS https://github.com/svaarala/duktape/releases/download/v2.7.0/duktape-2.7.0.tar.xz
|
|
|
|
FILENAME duktape-2.7.0.tar.xz
|
|
|
|
SHA512 8ff5465c9c335ea08ebb0d4a06569c991b9dc4661b63e10da6b123b882e7375e82291d6b883c2644902d68071a29ccc880dae8229447cebe710c910b54496c1d
|
|
|
|
)
|
2019-05-02 22:57:43 -07:00
|
|
|
|
2023-09-26 09:06:09 +02:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
|
|
|
ARCHIVE "${ARCHIVE}"
|
2017-07-14 19:37:25 +01:00
|
|
|
)
|
2019-05-02 22:57:43 -07:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2024-03-30 01:24:58 +01:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
2024-06-20 07:07:05 +10:00
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/src/duk_config.h" "#undef DUK_F_DLL_BUILD" "#define DUK_F_DLL_BUILD")
|
2019-10-07 19:35:13 +02:00
|
|
|
else()
|
2024-06-20 07:07:05 +10:00
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/src/duk_config.h" "#define DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD" IGNORE_UNCHANGED)
|
2019-10-07 19:35:13 +02:00
|
|
|
endif()
|
2017-07-14 19:37:25 +01:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2024-03-30 01:24:58 +01:00
|
|
|
OPTIONS
|
2024-06-20 07:07:05 +10:00
|
|
|
"-DVERSION=${VERSION}"
|
2017-07-14 21:36:48 +01:00
|
|
|
)
|
2017-07-14 19:37:25 +01:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-02-05 03:32:03 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2024-03-30 01:24:58 +01:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-duktape)
|
2017-07-14 19:37:25 +01:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-07-14 19:37:25 +01:00
|
|
|
|
2024-03-30 01:24:58 +01:00
|
|
|
# Legacy package based on find commands, not on exported config.
|
|
|
|
file(COPY "${CURRENT_PORT_DIR}/duktapeConfig.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2019-10-07 19:35:13 +02:00
|
|
|
|
2024-03-30 01:24:58 +01:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|