2018-07-01 12:05:51 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO LibRaw/LibRaw
|
2023-02-17 05:35:47 +08:00
|
|
|
REF "${VERSION}"
|
|
|
|
SHA512 6cea6d859961d713382a9017107c730c7a8777be85d454bd05f1417a69fda902aa9591151eac5f4bd231ce2a86fc39da56e3a024104101f24d6069197fcabbc7
|
2018-07-01 12:05:51 +08:00
|
|
|
HEAD_REF master
|
2016-11-02 02:37:29 +08:00
|
|
|
)
|
2018-07-01 12:05:51 +08:00
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH LIBRAW_CMAKE_SOURCE_PATH
|
|
|
|
REPO LibRaw/LibRaw-cmake
|
2023-02-17 05:35:47 +08:00
|
|
|
REF 6e26c9e73677dc04f9eb236a97c6a4dc225ba7e8
|
|
|
|
SHA512 8ce13d37c2ace2fbc57f571052a5a5a847b707b3de1b3b9e0c1a46afaca86cabd42ee275600eeadc3127bc2a0d0a4f224caed0b07feffdafea32ad0f42e50379
|
2019-10-08 01:35:13 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2023-02-17 05:35:47 +08:00
|
|
|
dependencies.patch
|
2023-08-08 00:20:06 +08:00
|
|
|
install-interface.patch
|
2021-10-19 05:22:23 +08:00
|
|
|
# Move the non-thread-safe library to manual-link. This is unfortunately needed
|
|
|
|
# because otherwise libraries that build on top of libraw have to choose.
|
|
|
|
fix-install.patch
|
2016-11-02 02:37:29 +08:00
|
|
|
)
|
|
|
|
|
2021-10-19 05:22:23 +08:00
|
|
|
file(COPY "${LIBRAW_CMAKE_SOURCE_PATH}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
|
|
|
file(COPY "${LIBRAW_CMAKE_SOURCE_PATH}/cmake" DESTINATION "${SOURCE_PATH}")
|
2016-11-02 02:37:29 +08:00
|
|
|
|
2022-01-06 10:22:05 +08:00
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2023-02-17 05:35:47 +08:00
|
|
|
openmp ENABLE_OPENMP
|
|
|
|
openmp CMAKE_REQUIRE_FIND_PACKAGE_OpenMP
|
|
|
|
dng-lossy CMAKE_REQUIRE_FIND_PACKAGE_JPEG
|
2022-01-06 10:22:05 +08:00
|
|
|
)
|
|
|
|
|
2021-10-19 05:22:23 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2016-11-03 04:16:34 +08:00
|
|
|
OPTIONS
|
2022-01-06 10:22:05 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2021-10-19 05:22:23 +08:00
|
|
|
-DENABLE_EXAMPLES=OFF
|
2023-02-17 05:35:47 +08:00
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_Jasper=1
|
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_ZLIB=1
|
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
CMAKE_REQUIRE_FIND_PACKAGE_OpenMP
|
2016-11-02 02:37:29 +08:00
|
|
|
)
|
|
|
|
|
2021-10-19 05:22:23 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
2023-02-17 05:35:47 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake")
|
2021-10-19 05:22:23 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2016-11-30 09:48:32 +08:00
|
|
|
|
2019-03-11 15:03:47 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2021-10-19 05:22:23 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h"
|
|
|
|
"#ifdef LIBRAW_NODLL" "#if 1"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h"
|
|
|
|
"#ifdef LIBRAW_NODLL" "#if 0"
|
|
|
|
)
|
2019-03-11 15:03:47 +08:00
|
|
|
endif()
|
|
|
|
|
2023-02-17 05:35:47 +08:00
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/share/cmake/libraw/FindLibRaw.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/cmake"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/doc"
|
|
|
|
)
|
2020-01-07 05:15:20 +08:00
|
|
|
|
2021-10-19 05:22:23 +08:00
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-02-17 05:35:47 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST
|
|
|
|
"${SOURCE_PATH}/COPYRIGHT"
|
|
|
|
"${SOURCE_PATH}/LICENSE.LGPL"
|
|
|
|
"${SOURCE_PATH}/LICENSE.CDDL"
|
|
|
|
)
|