mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 05:30:26 +08:00
bd94d1e254
* [libwebp] update to v1.0.2, greatly simplify port, remove unnecessary custom find_package script in favour of original Config files for cmake * [libwebp] enable building of all tools * [libwebp] install cmake config file in expected path * [libwebp] add compatibility layer inside CMake Config file * [libwebp] fix libwebpmux library name * [OpenEXR] Update to v2.3.0, enable tools, improve cmake module while still maintaining backwards compatibility (there's an official one distributed with the package but it is completely different, for now it is avoided) * [OpenEXR] remove unused patches * [OpenEXR] remove forced definition, could hide problems downstream * [freeimage] add compatibility with latest OpenEXR * [freeimage] bump control * [OpenEXR] restore ilmbase as an empty package to permit clean update * [OpenVDB] update to v6.0 * [OpenEXR] disable building on UWP platform * [openexr] Fix tools suffixes * [openexr] Fix Linux build paths
60 lines
2.5 KiB
CMake
60 lines
2.5 KiB
CMake
include(${CMAKE_TRIPLET_FILE})
|
|
include(vcpkg_common_functions)
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FreeImage)
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "http://downloads.sourceforge.net/freeimage/FreeImage3180.zip"
|
|
FILENAME "FreeImage3180.zip"
|
|
SHA512 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818
|
|
)
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-static.h DESTINATION ${SOURCE_PATH})
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-dynamic.h DESTINATION ${SOURCE_PATH})
|
|
|
|
# This is not strictly necessary, but to make sure
|
|
# that no "internal" libraries are used we remove them
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJPEG)
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibPNG)
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibTIFF4)
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/Source/ZLib)
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibOpenJPEG)
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJXR)
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibWebP)
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibRawLite)
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/Source/OpenEXR)
|
|
|
|
vcpkg_apply_patches(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable-plugins-depending-on-internal-third-party-libraries.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/use-external-jpeg.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/use-external-jxrlib.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/use-external-libtiff.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/use-external-openjpeg.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/use-external-png-zlib.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/use-external-rawlib.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/use-external-webp.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/use-external-openexr.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/use-freeimage-config-include.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/fix-function-overload.patch"
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DVCPKG_ROOT_DIR=${VCPKG_ROOT_DIR}
|
|
-DTARGET_TRIPLET=${TARGET_TRIPLET}
|
|
OPTIONS_DEBUG
|
|
-DINSTALL_HEADERS=OFF
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
# Handle copyright
|
|
file(COPY ${SOURCE_PATH}/license-fi.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/freeimage)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/freeimage/license-fi.txt ${CURRENT_PACKAGES_DIR}/share/freeimage/copyright)
|
|
|
|
vcpkg_copy_pdbs()
|