From d3b83a2ea9bb5b575f5a955387302b2975b56349 Mon Sep 17 00:00:00 2001 From: Niclas Rosenvik <youremailsarecrap@gmail.com> Date: Sun, 27 Oct 2019 14:27:11 +0000 Subject: [PATCH 3/4] Fix installation on linux-like systems Use GNUInstallDirs to set correct installation directories on linux-like systems. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c74c5c..921d9e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,8 +217,9 @@ set(PREFIX_PKGDATA ".") endif() if(UNIX AND NOT APPLE) # This is not exactly a good idea on linux - the code should be changed so that the executable would go to /usr/local/bin and the data to /usr/local/share/XyGrib -set(PREFIX_BIN ${PROJECT_NAME}) -set(PREFIX_PKGDATA ${PROJECT_NAME}) +include(GNUInstallDirs) +set(PREFIX_BIN ${CMAKE_INSTALL_FULL_BINDIR}) +set(PREFIX_PKGDATA ${CMAKE_INSTALL_FULL_DATAROOTDIR}/${PROJECT_NAME}) endif() add_subdirectory(src) -- 2.37.1