Skip to content

Commit

Permalink
cmake: use GNUInstallDirs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Dec 18, 2023
1 parent bbad41b commit 42e0c96
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
19 changes: 10 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,17 @@ if (PORTABLE_INSTALL)
set(DATA_INSTALL_PATH "${INSTALL_PATH}/Data")
set(INSTALL_DESKTOP_FILE OFF)
else()
set(RMG_INSTALL_PATH "bin")
set(SYSTEM_LIB_INSTALL_PATH "lib")
set(LIB_INSTALL_PATH "lib/RMG")
set(CORE_INSTALL_PATH "lib/RMG/Core")
set(PLUGIN_INSTALL_PATH "lib/RMG/Plugin")
set(DATA_INSTALL_PATH "share/RMG")
include(GNUInstallDirs)
set(RMG_INSTALL_PATH "${CMAKE_INSTALL_BINDIR}")
set(SYSTEM_LIB_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}")
set(LIB_INSTALL_PATH "${SYSTEM_LIB_INSTALL_PATH}/RMG")
set(CORE_INSTALL_PATH "${SYSTEM_LIB_INSTALL_PATH}/RMG/Core")
set(PLUGIN_INSTALL_PATH "${SYSTEM_LIB_INSTALL_PATH}/RMG/Plugin")
set(DATA_INSTALL_PATH "${CMAKE_INSTALL_DATADIR}/RMG")
set(INSTALL_DESKTOP_FILE ON)
set(APPDATA_INSTALL_PATH "share/metainfo/")
set(DESKTOP_INSTALL_PATH "share/applications")
set(ICON_INSTALL_PATH "share/icons/hicolor/scalable/apps/")
set(APPDATA_INSTALL_PATH "${CMAKE_INSTALL_DATADIR}/metainfo/")
set(DESKTOP_INSTALL_PATH "${CMAKE_INSTALL_DATADIR}/applications")
set(ICON_INSTALL_PATH "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/")
endif()

add_subdirectory(Source/3rdParty)
Expand Down
4 changes: 4 additions & 0 deletions Source/RMG-Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if (WIN32)
pkg_check_modules(ICONV REQUIRED iconv)
endif(WIN32)

if (NOT PORTABLE_INSTALL)
include(GNUInstallDirs)
endif(NOT PORTABLE_INSTALL)

configure_file(Config.hpp.in Config.hpp)

set(RMG_CORE_SOURCES
Expand Down

0 comments on commit 42e0c96

Please sign in to comment.