]> granicus.if.org Git - graphviz/commitdiff
CMake: fix: use a relative 'DATA_INSTALL_DIR' on non-Linux
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 7 Apr 2022 01:38:10 +0000 (18:38 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 12 Apr 2022 01:53:34 +0000 (18:53 -0700)
Some installers like NSIS on Windows do not allow absolute paths in installation
destinations. This is already followed in e.g. `BINARY_INSTALL_DIR`, but
`DATA_INSTALL_DIR` was using an absolute path. This issue was not detected
because this is currently only used in Smyrna which is not enabled on Windows in
CI. But an upcoming commit enables general example installation, which exposes
this issue.

Gitlab: #1836

CMakeLists.txt

index 28e8283a0fe57beddf3ec053e57b4f7307720e80..671a5d2972c5fe18da6f5aa673cca690e0c903ec 100644 (file)
@@ -74,7 +74,7 @@ else()
   set(MAN_INSTALL_DIR     share/man)
   set(libdir              "${CMAKE_INSTALL_PREFIX}/${LIBRARY_INSTALL_DIR}")
   set(includedir          "${CMAKE_INSTALL_PREFIX}/include")
-  set(DATA_INSTALL_DIR    "${CMAKE_INSTALL_PREFIX}/share")
+  set(DATA_INSTALL_DIR    share)
 endif()
 
 set(PLUGIN_INSTALL_DIR      ${LIBRARY_INSTALL_DIR}/graphviz)