From: Magnus Jacobsson Date: Fri, 7 Jan 2022 19:17:49 +0000 (+0100) Subject: CMake: ensure Cairo is found on MinGW X-Git-Tag: 3.0.0~82^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d7f948a42b87f98ab2b8f18777a3855a0ddca81;p=graphviz CMake: ensure Cairo is found on MinGW --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 025052bc8..52a0281aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,6 +94,9 @@ if(WIN32) list(APPEND CMAKE_PREFIX_PATH ${WINDOWS_DEPENDENCY_DIR}) list(APPEND CMAKE_PREFIX_PATH ${WINDOWS_DEPENDENCY_VCPKG_DIR}) endif() + if(MINGW) + list(APPEND CMAKE_PREFIX_PATH $ENV{MSYSTEM_PREFIX}) + endif() endif() find_package(ANN) diff --git a/cmake/FindCairo.cmake b/cmake/FindCairo.cmake index a44f8682f..b4cfd1022 100644 --- a/cmake/FindCairo.cmake +++ b/cmake/FindCairo.cmake @@ -5,10 +5,10 @@ if(WIN32) find_library(Cairo_LIBRARY NAMES cairo) - find_program(Cairo_RUNTIME_LIBRARY NAMES cairo.dll) - find_program(EXPAT_RUNTIME_LIBRARY NAMES expat.dll) - find_program(FONTCONFIG_RUNTIME_LIBRARY NAMES fontconfig.dll) - find_program(PIXMAN_RUNTIME_LIBRARY NAMES pixman-1.dll) + find_program(Cairo_RUNTIME_LIBRARY NAMES cairo.dll libcairo-2.dll) + find_program(EXPAT_RUNTIME_LIBRARY NAMES expat.dll libexpat-1.dll) + find_program(FONTCONFIG_RUNTIME_LIBRARY NAMES fontconfig.dll libfontconfig-1.dll) + find_program(PIXMAN_RUNTIME_LIBRARY NAMES pixman-1.dll libpixman-1-0.dll) find_package_handle_standard_args(Cairo DEFAULT_MSG Cairo_INCLUDE_DIR