vcpkg/ports/wt/0006-GraphicsMagick.patch

32 lines
1.4 KiB
Diff
Raw Normal View History

2020-08-22 01:39:52 +08:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7fe932fb7..ae122f03a 100644
2020-08-22 01:39:52 +08:00
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -342,9 +342,9 @@ SET(WT_WRASTERIMAGE_IMPLEMENTATION ${WT_WRASTERIMAGE_DEFAULT_IMPLEMENTATION} CAC
SET_PROPERTY(CACHE WT_WRASTERIMAGE_IMPLEMENTATION PROPERTY STRINGS GraphicsMagick Direct2D none)
2020-08-22 01:39:52 +08:00
IF (${WT_WRASTERIMAGE_IMPLEMENTATION} STREQUAL "GraphicsMagick")
- IF (NOT GM_FOUND)
+ IF (0)
MESSAGE(FATAL_ERROR "WT_WRASTERIMAGE_IMPLEMENTATION set to GraphicsMagick but GM is not found. Indicate the location of your graphicsmagick library using -DGM_PREFIX=...")
- ENDIF (NOT GM_FOUND)
+ ENDIF ()
2020-08-22 01:39:52 +08:00
SET(WT_HAS_WRASTERIMAGE true)
ELSEIF (${WT_WRASTERIMAGE_IMPLEMENTATION} STREQUAL "Direct2D")
IF (WIN32)
2020-08-22 01:39:52 +08:00
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fb398ff0d..16b5f76b3 100644
2020-08-22 01:39:52 +08:00
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -632,8 +632,8 @@ ELSE(HAVE_HARU)
2020-08-22 01:39:52 +08:00
ENDIF(HAVE_HARU)
IF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "GraphicsMagick")
- TARGET_LINK_LIBRARIES(wt PRIVATE ${GM_LIBRARIES})
- INCLUDE_DIRECTORIES(${GM_INCLUDE_DIRS})
+ find_package(unofficial-graphicsmagick REQUIRED)
+ TARGET_LINK_LIBRARIES(wt PRIVATE unofficial::graphicsmagick::graphicsmagick)
ADD_DEFINITIONS(-DHAVE_GRAPHICSMAGICK)
ELSEIF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "Direct2D")
TARGET_LINK_LIBRARIES(wt PRIVATE d2d1 dwrite windowscodecs shlwapi)