From: Matthew Fernandez Date: Sat, 5 Nov 2022 21:00:22 +0000 (-0700) Subject: CMake: stop trying to install Expat and Getopt on MinGW X-Git-Tag: 7.0.1~1^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0cfb684b7b5fa876c0226d5beed14da39a7ce75;p=graphviz CMake: stop trying to install Expat and Getopt on MinGW MinGW does not need these third-party libraries installed; they are already available in its ecosystem. This was uncovered through using `--warn-uninitialized -Werror=dev` with CMake: CMake Error (dev) at cmd/tools/CMakeLists.txt:460 (install): uninitialized variable 'GETOPT_RUNTIME_LIBRARIES' Gitlab: #2291 --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 38040bdf1..f8d5324f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 introduced in Graphviz 4.0.0. #2232 - The CMake build system uses corrected paths to DevIL and FreeType headers and libraries when discovered. +- The CMake build system under MinGW no longer attempts to install third party + Expat and Getopt libraries. ## [7.0.0] – 2022-10-22 diff --git a/cmd/tools/CMakeLists.txt b/cmd/tools/CMakeLists.txt index 7f5f45aca..f015a402b 100644 --- a/cmd/tools/CMakeLists.txt +++ b/cmd/tools/CMakeLists.txt @@ -449,14 +449,14 @@ tool_defaults(sccmap) # ===================== Install third party DLLs on Windows ==================== -if(WIN32 AND install_win_dependency_dlls AND EXPAT_FOUND) +if(WIN32 AND NOT MINGW AND install_win_dependency_dlls AND EXPAT_FOUND) install( FILES ${EXPAT_RUNTIME_LIBRARIES} DESTINATION ${BINARY_INSTALL_DIR} ) endif() -if(WIN32 AND install_win_dependency_dlls) +if(WIN32 AND NOT MINGW AND install_win_dependency_dlls) install( FILES ${GETOPT_RUNTIME_LIBRARIES} DESTINATION ${BINARY_INSTALL_DIR}