mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-15 16:49:06 +08:00
48 lines
2.0 KiB
CMake
48 lines
2.0 KiB
CMake
set(GM_VERSION 1.3.36)
|
|
|
|
vcpkg_from_sourceforge(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO graphicsmagick/graphicsmagick
|
|
REF ${GM_VERSION}
|
|
FILENAME "GraphicsMagick-${GM_VERSION}-windows-source.7z"
|
|
SHA512 4976816acb9d348b83cc33c1ad2b0a3f9c4174c8983b3a3f867bcd6369984bea34b203a4e168f52f556c94288b9340db1357f614e8ff3a8802bef859378bdd31
|
|
PATCHES
|
|
# GM always requires a dynamic BZIP2. This patch makes this dependent if _DLL is defined
|
|
dynamic_bzip2.patch
|
|
|
|
# Bake GM's own modules into the .dll itself. This fixes a bug whereby
|
|
# 'vcpkg install graphicsmagick' did not lead to a copy of GM that could
|
|
# load either PNG or JPEG files (due to missing GM Modules, with names
|
|
# matching "IM_*.DLL").
|
|
disable_graphicsmagick_modules.patch
|
|
)
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/magick_types.h DESTINATION ${SOURCE_PATH}/magick)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS_DEBUG
|
|
-DINSTALL_HEADERS=OFF
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-graphicsmagick TARGET_PATH share/unofficial-graphicsmagick)
|
|
|
|
# copy license
|
|
file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
|
|
|
# copy config
|
|
file(COPY ${SOURCE_PATH}/config/colors.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/config)
|
|
file(COPY ${SOURCE_PATH}/config/log.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/config)
|
|
file(COPY ${SOURCE_PATH}/config/modules.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/config)
|
|
|
|
file(READ ${SOURCE_PATH}/config/type-windows.mgk.in TYPE_MGK)
|
|
string(REPLACE "@windows_font_dir@" "$ENV{SYSTEMROOT}/Fonts/" TYPE_MGK "${TYPE_MGK}")
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/config/type.mgk "${TYPE_MGK}")
|
|
|
|
configure_file(${SOURCE_PATH}/config/delegates.mgk.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/config/delegates.mgk @ONLY)
|
|
vcpkg_copy_pdbs()
|