diff options
author | Anna “CyberTailor” <cyber@sysrq.in> | 2021-11-04 07:27:23 +0500 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-14 08:37:55 +0200 |
commit | 7de74d5ed0b1424defcbe41342f6c544f0a813a2 (patch) | |
tree | 25a1e0d33c8967b56f2e6cfeac4a2615e8939c9c | |
parent | dba89c9ca5a0ad49f8b24ac07ae1ad5a9409aa19 (diff) |
CMake: use GNUInstallDirs for *nix
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 55537a08..08b4c053 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -438,6 +438,7 @@ elseif (HAIKU) | |||
438 | install (FILES ${EMB_BIN} DESTINATION .) | 438 | install (FILES ${EMB_BIN} DESTINATION .) |
439 | endif () | 439 | endif () |
440 | elseif (UNIX AND NOT APPLE) | 440 | elseif (UNIX AND NOT APPLE) |
441 | include (GNUInstallDirs) | ||
441 | set_target_properties (app PROPERTIES | 442 | set_target_properties (app PROPERTIES |
442 | INSTALL_RPATH_USE_LINK_PATH YES | 443 | INSTALL_RPATH_USE_LINK_PATH YES |
443 | ) | 444 | ) |
@@ -453,20 +454,20 @@ StartupWMClass=lagrange | |||
453 | Icon=fi.skyjake.Lagrange | 454 | Icon=fi.skyjake.Lagrange |
454 | MimeType=x-scheme-handler/gemini;x-scheme-handler/gopher; | 455 | MimeType=x-scheme-handler/gemini;x-scheme-handler/gopher; |
455 | ") | 456 | ") |
456 | install (TARGETS app DESTINATION bin) | 457 | install (TARGETS app DESTINATION ${CMAKE_INSTALL_BINDIR}) |
457 | install (FILES ${desktop} DESTINATION share/applications) | 458 | install (FILES ${desktop} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) |
458 | install (FILES res/lagrange-256.png | 459 | install (FILES res/lagrange-256.png |
459 | DESTINATION share/icons/hicolor/256x256/apps | 460 | DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps |
460 | RENAME fi.skyjake.Lagrange.png | 461 | RENAME fi.skyjake.Lagrange.png |
461 | ) | 462 | ) |
462 | install (FILES res/fi.skyjake.Lagrange.appdata.xml | 463 | install (FILES res/fi.skyjake.Lagrange.appdata.xml |
463 | DESTINATION share/metainfo | 464 | DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo |
464 | ) | 465 | ) |
465 | if (NOT ENABLE_RESOURCE_EMBED) | 466 | if (NOT ENABLE_RESOURCE_EMBED) |
466 | if (NOT ENABLE_RELATIVE_EMBED) | 467 | if (NOT ENABLE_RELATIVE_EMBED) |
467 | target_compile_definitions (app PUBLIC | 468 | target_compile_definitions (app PUBLIC |
468 | LAGRANGE_EMB_BIN="${CMAKE_INSTALL_PREFIX}/share/lagrange/resources.lgr") | 469 | LAGRANGE_EMB_BIN="${CMAKE_INSTALL_FULL_DATADIR}/lagrange/resources.lgr") |
469 | endif () | 470 | endif () |
470 | install (FILES ${EMB_BIN} DESTINATION share/lagrange) | 471 | install (FILES ${EMB_BIN} DESTINATION ${CMAKE_INSTALL_DATADIR}/lagrange) |
471 | endif () | 472 | endif () |
472 | endif () | 473 | endif () |