InstallDirs.cmake 1.2 KB

123456789101112131415161718192021222324252627
  1. # Where `make install` (and the packages made with CPack) put each part of V-Gears.
  2. #
  3. # Linux and other Unix systems use the usual layout of the prefix:
  4. # <prefix>/bin/v-gears, <prefix>/bin/v-gears-installer
  5. # <prefix>/share/v-gears/ The data template: plugins.cfg, resources.cfg, data/...
  6. # <prefix>/share/doc/v-gears/ Documentation and license
  7. # <prefix>/share/applications/ Desktop files, and the icons in share/icons and share/pixmaps
  8. #
  9. # Windows and macOS use a single portable folder:
  10. # <prefix>/v-gears(.exe), <prefix>/v-gears-installer(.exe)
  11. # <prefix>/data/ The data template
  12. # <prefix>/ Documentation and license
  13. #
  14. # The game finds the template in both layouts (see src/common/DataDirectory.h), and copies it to the data directory
  15. # of the user the first time it runs.
  16. include(GNUInstallDirs)
  17. if(WIN32 OR APPLE)
  18. set(VGEARS_INSTALL_BINDIR ".")
  19. set(VGEARS_INSTALL_TEMPLATEDIR "data")
  20. set(VGEARS_INSTALL_DOCDIR ".")
  21. else()
  22. set(VGEARS_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}")
  23. set(VGEARS_INSTALL_TEMPLATEDIR "${CMAKE_INSTALL_DATADIR}/v-gears")
  24. set(VGEARS_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/v-gears")
  25. endif()