diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fe932fb7..ae122f03a 100644 --- 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) 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 () SET(WT_HAS_WRASTERIMAGE true) ELSEIF (${WT_WRASTERIMAGE_IMPLEMENTATION} STREQUAL "Direct2D") IF (WIN32) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fb398ff0d..16b5f76b3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -632,8 +632,8 @@ ELSE(HAVE_HARU) 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)