From: Matthew Fernandez Date: Thu, 7 Apr 2022 01:38:10 +0000 (-0700) Subject: CMake: fix: use a relative 'DATA_INSTALL_DIR' on non-Linux X-Git-Tag: 4.0.0~112^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0eb6d18c84a356be94e44c7043d4a9ae02033e4c;p=graphviz CMake: fix: use a relative 'DATA_INSTALL_DIR' on non-Linux 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 28e8283a0..671a5d297 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)