vcpkg/ports/wt/0006-GraphicsMagick.patch
MonicaLiu 5c12a3bd77
[wt] Update to 4.10.4 (#38063)
Update `wt` to 4.10.4. 

* Remove outdated `0002-link-glew.patch` and replace outdated PR #33369.

* Fix the following errors:
```
1> [CMake] CMake Error at F:/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package): 
1> [CMake] Could not find a package configuration file provided by "wt" with any of 
1> [CMake] the following names: 
1> [CMake] 
1> [CMake] wtConfig.cmake 
1> [CMake] wt-config.cmake 
1> [CMake] 
1> [CMake] Add the installation prefix of "wt" to CMAKE_PREFIX_PATH or set "wt_DIR" to 
1> [CMake] a directory containing one of the above files. If "wt" provides a separate 
1> [CMake] development package or SDK, be sure it has been installed. 
1> [CMake] Call Stack (most recent call first): 
1> [CMake] CMakeUsage/CMakeLists.txt:17 (find_package)
```

- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [ ] ~The "supports" clause reflects platforms that may be fixed by
this new version.~
- [ ] ~Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.~
- [x] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.

All features are tested successfully in the following triplet:
```
x86-windows
x64-windows
x64-windows-static
```
The usage test passed on `x64-windows` (header files found):
```
wt provides CMake targets:

  # this is heuristically generated, and may not be correct
  find_package(wt CONFIG REQUIRED)
  target_link_libraries(main PRIVATE Wt::Wt Wt::HTTP Wt::Test Wt::Isapi)
```

---------

Co-authored-by: Monica <v-liumonica@microsoft.com>
2024-04-11 09:58:38 -04:00

32 lines
1.4 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 96eff0a..c31fd49 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -352,9 +356,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 4bc0e5d..eb52234 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -637,8 +637,8 @@ else()
endif()
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)