From 9e232d188cb579df403ee638c2b163a8a139287f Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Thu, 5 Aug 2021 09:36:20 +0200 Subject: [PATCH] CMake: fix expat runtime library not found by cpack on msys2 Fixes these errors with MinGW: CMake Error at C:/Users/magja/graphviz/build/lib/gvc/cmake_install.cmake:75 (file): file INSTALL cannot find "C:/Users/magja/graphviz/lib/gvc/EXPAT_RUNTIME_LIBRARIES-NOTFOUND": No error. Call Stack (most recent call first): C:/Users/magja/graphviz/build/lib/cmake_install.cmake:70 (include) C:/Users/magja/graphviz/build/cmake_install.cmake:58 (include) CMake Error at C:/Users/magja/graphviz/build/cmd/tools/cmake_install.cmake:269 (file): file INSTALL cannot find "C:/Users/magja/graphviz/cmd/tools/EXPAT_RUNTIME_LIBRARIES-NOTFOUND": No error. Call Stack (most recent call first): C:/Users/magja/graphviz/build/cmd/cmake_install.cmake:44 (include) C:/Users/magja/graphviz/build/cmake_install.cmake:60 (include) CPack Error: Error when generating package: Graphviz --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37f0d27fa..34959b746 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ if (WIN32) # Find Windows specific dependencies # Find DLLs on Windows - find_program(EXPAT_RUNTIME_LIBRARIES NAMES libexpat.dll expat.dll) + find_program(EXPAT_RUNTIME_LIBRARIES NAMES libexpat.dll expat.dll msys-expat-1.dll) if (CMAKE_CL_64) find_program(MSYS_RUNTIME_LIBRARIES NAMES msys-2.0.dll) endif() -- 2.40.0