2021-03-30 01:11:07 +08:00
|
|
|
if (EXISTS ${CURRENT_INSTALLED_DIR}/share/lodepng-c/copyright)
|
|
|
|
message(FATAL_ERROR "${PORT} conflict with lodepng-c, please remove lodepng-c before install ${PORT}.")
|
|
|
|
endif()
|
2017-09-03 22:32:34 +08:00
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2017-09-03 22:32:34 +08:00
|
|
|
vcpkg_from_github(
|
2021-12-07 13:51:01 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO lvandeve/lodepng
|
|
|
|
REF 8c6a9e30576f07bf470ad6f09458a2dcd7a6a84a
|
|
|
|
SHA512 2e0abc063be45dc04a070656260e9a2b9fa1172433cdd7d4988f0afc11751ad28aa802350598ef0e2b27c2c011fd9d9f7ab7f267b0bfcdf28f9f708b888c4411
|
|
|
|
HEAD_REF master
|
2017-09-03 22:32:34 +08:00
|
|
|
)
|
|
|
|
|
2021-12-07 13:51:01 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
|
|
|
configure_file("${SOURCE_PATH}/lodepng.cpp" "${SOURCE_PATH}/lodepng.c" COPYONLY)
|
2017-09-03 22:32:34 +08:00
|
|
|
|
2021-12-07 13:51:01 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-09-03 22:32:34 +08:00
|
|
|
OPTIONS_DEBUG
|
2021-12-07 13:51:01 +08:00
|
|
|
-DDISABLE_INSTALL_HEADERS=ON
|
2017-09-03 22:32:34 +08:00
|
|
|
)
|
|
|
|
|
2021-12-07 13:51:01 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-09-03 22:32:34 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-12-07 13:51:01 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME lodepng-c)
|
2017-09-03 22:32:34 +08:00
|
|
|
|
2021-12-07 13:51:01 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|