From e5596bd4b659ef6c09c759adac410211848ce813 Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Fri, 18 Oct 2019 17:21:32 -0500 Subject: [PATCH] Merge commit 'refs/pull/874/head' of https://github.com/coelckers/gzdoom into newmaster Install soundfonts and WOPL/WOPN banks The INSTALL_SOUNDFONT_PATH cache entry is used to configure the installation directory. This version should resolve the issue brought up in https://forum.zdoom.org/viewtopic.php?f=7&t=65035. --- src/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 182eced71..9535f6cd2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1293,6 +1293,15 @@ add_custom_command(TARGET zdoom POST_BUILD ${CMAKE_SOURCE_DIR}/fm_banks/gs-by-papiezak-and-sneakernets.wopn $/fm_banks/gs-by-papiezak-and-sneakernets.wopn ) +if( WIN32 ) + set( INSTALL_SOUNDFONT_PATH . CACHE STRING "Directory where soundfonts and WOPL/WOPN banks will be placed during install." ) +else() + set( INSTALL_SOUNDFONT_PATH share/games/doom CACHE STRING "Directory where soundfonts and WOPL/WOPN banks will be placed during install." ) +endif() +install(DIRECTORY "${PROJECT_BINARY_DIR}/soundfonts" "${PROJECT_BINARY_DIR}/fm_banks" + DESTINATION ${INSTALL_SOUNDFONT_PATH} + COMPONENT "Soundfont resources") + if( CMAKE_COMPILER_IS_GNUCXX ) # GCC misoptimizes this file set_source_files_properties( oplsynth/fmopl.cpp PROPERTIES COMPILE_FLAGS "-fno-tree-dominator-opts -fno-tree-fre" )