mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 03:43:58 +08:00
48 lines
2.1 KiB
Diff
48 lines
2.1 KiB
Diff
diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt
|
|
index 3d4791c..1864b7a 100644
|
|
--- a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt
|
|
+++ b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt
|
|
@@ -23,7 +23,15 @@ target_compile_features(io2d_cairo PUBLIC cxx_std_17)
|
|
|
|
target_link_libraries(io2d_cairo PUBLIC io2d_core)
|
|
|
|
-if(MSVC)
|
|
+if(DEFINED VCPKG_TARGET_TRIPLET)
|
|
+ find_package(unofficial-cairo CONFIG REQUIRED)
|
|
+ set(CAIRO_INCLUDE_DIR)
|
|
+ set(CAIRO_LIB_DEBUG "CAIRO_LIB_DEBUG-NOTFOUND")
|
|
+ set(CAIRO_LIB_RELEASE unofficial::cairo::cairo)
|
|
+ find_package(unofficial-graphicsmagick CONFIG REQUIRED)
|
|
+ set(GRAPHICSMAGICK_INCLUDE_DIR)
|
|
+ set(GRAPHICSMAGICK_LIB unofficial::graphicsmagick::graphicsmagick)
|
|
+elseif(MSVC)
|
|
find_path(CAIRO_INCLUDE_DIR cairo.h)
|
|
find_path(GRAPHICSMAGICK_INCLUDE_DIR magick/api.h)
|
|
find_library(CAIRO_LIB_DEBUG cairod)
|
|
diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt
|
|
index abb1501..b7a6e71 100644
|
|
--- a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt
|
|
+++ b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt
|
|
@@ -24,20 +24,7 @@ target_compile_features(io2d_cairo_win32 PUBLIC cxx_std_17)
|
|
target_link_libraries(io2d_cairo_win32 PUBLIC io2d_cairo)
|
|
|
|
if(MSVC)
|
|
- target_compile_definitions(io2d_cairo_win32 PUBLIC -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS)
|
|
-
|
|
- find_library(PIXMAN_LIB pixman-1)
|
|
- find_library(FREETYPE_LIB freetype)
|
|
- find_library(FONTCONFIG_LIB fontconfig)
|
|
- find_library(BZ_LIB bz2)
|
|
- find_library(JPEG_LIB jpeg)
|
|
- find_library(TIFF_LIB tiff)
|
|
- find_library(EXPAT_LIB expat)
|
|
- find_library(LZMA_LIB lzma)
|
|
- find_library(ICONV_LIB libiconv)
|
|
- find_library(CHARSET_LIB libcharset)
|
|
-
|
|
- target_link_libraries(io2d_cairo_win32 PUBLIC ${PIXMAN_LIB} ${FREETYPE_LIB} ${FONTCONFIG_LIB} ${BZ_LIB} ${JPEG_LIB} ${TIFF_LIB} ${EXPAT_LIB} ${LZMA_LIB} ${ICONV_LIB} ${CHARSET_LIB})
|
|
+ target_compile_definitions(io2d_cairo_win32 PRIVATE -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS)
|
|
endif()
|
|
|
|
install(
|