diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b0e5f135..5a446a27a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ endif() option(DEVENDOR_LIBRARIES "Use local versions of dependencies instead of the ones provided by submodules" OFF) if (NOT DEVENDOR_LIBRARIES) - add_subdirectory(extern/fmt) + add_subdirectory(extern/fmt EXCLUDE_FROM_ALL) endif() if (NOT DEVENDOR_LIBRARIES) @@ -25,8 +25,8 @@ if (NOT DEVENDOR_LIBRARIES) set(BUILD_EXAMPLES OFF CACHE BOOL "a" FORCE) set(ENABLE_EXTERNAL_LIBS OFF CACHE BOOL "come on" FORCE) set(ENABLE_MPEG OFF CACHE BOOL "come on" FORCE) - add_subdirectory(extern/libsndfile) - add_subdirectory(extern/zlib) + add_subdirectory(extern/libsndfile EXCLUDE_FROM_ALL) + add_subdirectory(extern/zlib EXCLUDE_FROM_ALL) include_directories(extern/zlib ${CMAKE_CURRENT_BINARY_DIR}/extern/zlib) endif() @@ -40,14 +40,14 @@ else() if (WIN32) set(SDL_SHARED OFF) set(SDL_STATIC ON) - add_subdirectory(extern/SDL) + add_subdirectory(extern/SDL EXCLUDE_FROM_ALL) set(HAVE_SDL2 SDL2-static) set(HAVE_Z zlibstatic) include_directories(extern/SDL/include extern/imgui extern/IconFontCppHeaders extern/imgui/backends extern/igfd extern/fmt/include) else() if (BUILD_GUI) set(SDL_SHARED ON) - add_subdirectory(extern/SDL) + add_subdirectory(extern/SDL EXCLUDE_FROM_ALL) include_directories(extern/SDL/include extern/imgui extern/IconFontCppHeaders extern/imgui/backends extern/igfd extern/fmt/include) set(HAVE_SDL2 SDL2-static) else() @@ -184,6 +184,16 @@ endif() install(TARGETS furnace RUNTIME DESTINATION bin) +if (NOT WIN32 AND NOT APPLE) + include(GNUInstallDirs) + install(FILES res/furnace.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) + install(FILES res/furnace.appdata.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo) + install(DIRECTORY papers DESTINATION ${CMAKE_INSTALL_DOCDIR}) + install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DATADIR}/licenses) + install(DIRECTORY demos DESTINATION ${CMAKE_INSTALL_DATADIR}/furnace) + install(FILES res/logo.png RENAME furnace.png DESTINATION ${CMAKE_INSTALL_DATADIR}/pixmaps) +endif() + set(CPACK_PACKAGE_NAME "Furnace") set(CPACK_PACKAGE_VENDOR "tildearrow") set(CPACK_PACKAGE_DESCRIPTION "free and open-source chiptune tracker")