]> granicus.if.org Git - graphviz/commitdiff
CMake: stop trying to install Expat and Getopt on MinGW
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Nov 2022 21:00:22 +0000 (14:00 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 8 Nov 2022 04:52:51 +0000 (20:52 -0800)
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

CHANGELOG.md
cmd/tools/CMakeLists.txt

index 38040bdf132b672e2a216948eda6d728992b6e37..f8d5324f38dcbd85701341dd31e33b23116e26f2 100644 (file)
@@ -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
 
index 7f5f45aca3535e573ea9acb1da9062840efb1acb..f015a402b410e65ad731851f2038a3580f37aa57 100644 (file)
@@ -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}