From 99dee840f76e1a469d8d5f180ab42d28736d0486 Mon Sep 17 00:00:00 2001 From: Martin Schweiger Date: Wed, 4 Aug 2021 20:06:45 +0100 Subject: [PATCH 01/13] Added CMake infrastructure in XRSound. Build XRSound.lib --- CMakeLists.txt | 16 ++++++++++++++ Sound/CMakeLists.txt | 5 +++++ Sound/XRSound/CMakeLists.txt | 1 + Sound/XRSound/XRSound/CMakeLists.txt | 1 + Sound/XRSound/XRSound/src/CMakeLists.txt | 1 + .../XRSound/src/XRSoundLib/CMakeLists.txt | 21 +++++++++++++++++++ 6 files changed, 45 insertions(+) create mode 100644 Sound/CMakeLists.txt create mode 100644 Sound/XRSound/CMakeLists.txt create mode 100644 Sound/XRSound/XRSound/CMakeLists.txt create mode 100644 Sound/XRSound/XRSound/src/CMakeLists.txt create mode 100644 Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index e8a15c0ee..bd79a0205 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,6 +228,12 @@ endif() # ON #) +option( + ORBITER_BUILD_XRSOUND + "Build XRSound module to enable sound in Orbiter" + ON +) + option(ORBITER_MAKE_DOC "Create documentation" ON @@ -238,6 +244,15 @@ option(ORBITER_MAKE_SDK_SAMPLES OFF ) +if(ORBITER_BUILD_XRSOUND) + set(IRRKLANG_DIR + irrKlang_NOTFOUND + CACHE + PATH + "Root folder of irrKlang installation." + ) +endif() + if (ORBITER_MAKE_DOC) find_program(ODT_TO_PDF_COMPILER @@ -386,6 +401,7 @@ add_subdirectory(Src) add_subdirectory(Utils) add_subdirectory(Orbitersdk) add_subdirectory(OVP) +add_subdirectory(Sound) if(ORBITER_MAKE_DOC) add_subdirectory(Doc) diff --git a/Sound/CMakeLists.txt b/Sound/CMakeLists.txt new file mode 100644 index 000000000..4c2339fd2 --- /dev/null +++ b/Sound/CMakeLists.txt @@ -0,0 +1,5 @@ +if(ORBITER_BUILD_XRSOUND) + + add_subdirectory(XRSound) + +endif() diff --git a/Sound/XRSound/CMakeLists.txt b/Sound/XRSound/CMakeLists.txt new file mode 100644 index 000000000..da92d21f0 --- /dev/null +++ b/Sound/XRSound/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(XRSound) diff --git a/Sound/XRSound/XRSound/CMakeLists.txt b/Sound/XRSound/XRSound/CMakeLists.txt new file mode 100644 index 000000000..febd4f0ab --- /dev/null +++ b/Sound/XRSound/XRSound/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(src) diff --git a/Sound/XRSound/XRSound/src/CMakeLists.txt b/Sound/XRSound/XRSound/src/CMakeLists.txt new file mode 100644 index 000000000..8ae04abb5 --- /dev/null +++ b/Sound/XRSound/XRSound/src/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(XRSoundLib) diff --git a/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt b/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt new file mode 100644 index 000000000..c730e99b5 --- /dev/null +++ b/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt @@ -0,0 +1,21 @@ +# The XRSoundLib library target +add_library(XRSound_lib STATIC + XRSound.cpp + XRSoundImpl.cpp +) + +set_target_properties(XRSound_lib + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY ${ORBITER_BINARY_SDK_DIR}/XRSound + OUTPUT_NAME XRSound +) + +target_include_directories(XRSound_lib PUBLIC + ${ORBITER_SOURCE_SDK_INCLUDE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../XRSoundDLL +) + +install(TARGETS XRSound_lib + ARCHIVE + DESTINATION ${ORBITER_INSTALL_SDK_DIR}/XRSound +) \ No newline at end of file From 887fe83dcf94bc6a134c419fcf0692598d1313db Mon Sep 17 00:00:00 2001 From: Martin Schweiger Date: Wed, 4 Aug 2021 23:22:05 +0100 Subject: [PATCH 02/13] Deploy all sound assets to their target directories in the build and install directories. XRsound now works in 32 and 64 bit. --- Sound/XRSound/CMakeLists.txt | 45 +++++++++++++++++++ Sound/XRSound/XRSound/src/CMakeLists.txt | 1 + .../XRSound/src/XRSoundDLL/CMakeLists.txt | 37 +++++++++++++++ Src/Orbiter/CMakeLists.txt | 5 ++- 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 Sound/XRSound/XRSound/src/XRSoundDLL/CMakeLists.txt diff --git a/Sound/XRSound/CMakeLists.txt b/Sound/XRSound/CMakeLists.txt index da92d21f0..cbed6e4db 100644 --- a/Sound/XRSound/CMakeLists.txt +++ b/Sound/XRSound/CMakeLists.txt @@ -1 +1,46 @@ +# The irrKlang library location +if (BUILD64) + set(IRRKLANG_LIB_DIR "${IRRKLANG_DIR}/lib/Winx64-visualStudio") + set(IRRKLANG_BIN_DIR "${IRRKLANG_DIR}/bin/Winx64-visualStudio") +else() + set(IRRKLANG_LIB_DIR "${IRRKLANG_DIR}/lib/Win32-visualStudio") + set(IRRKLANG_BIN_DIR "${IRRKLANG_DIR}/bin/Win32-visualStudio") +endif() +set(IRRKLANG_LIB "${IRRKLANG_LIB_DIR}/irrKlang.lib") + +set(ASSET_DIR ${CMAKE_CURRENT_SOURCE_DIR}/XRSound/assets) +set(SOLUTION_DIR ${CMAKE_CURRENT_SOURCE_DIR}/XRSound/src) +set(IRRKLANG_DLL_DIR ${IRRKLANG_DIR}) +# Deploy assets +file(GLOB config_files ${ASSET_DIR}/XRSound/*.cfg) + +add_custom_target(XRSound_assets ALL + COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_ROOT_DIR}/XRSound + COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_SDK_DIR}/XRSound/ + COMMAND ${CMAKE_COMMAND} -E copy ${config_files} ${ORBITER_BINARY_ROOT_DIR}/XRSound/ + COMMAND ${CMAKE_COMMAND} -E copy ${ASSET_DIR}/XRSound/ReadMe.txt ${ORBITER_BINARY_ROOT_DIR}/XRSound/ + COMMAND ${CMAKE_COMMAND} -E copy "${ASSET_DIR}/Doc/XRSound User Manual.pdf" ${ORBITER_BINARY_ROOT_DIR}/Doc/ + COMMAND ${CMAKE_COMMAND} -E copy ${SOLUTION_DIR}/XRSoundLib/XRSound.h ${ORBITER_BINARY_SDK_DIR}/XRSound/ + COMMAND ${CMAKE_COMMAND} -E copy ${IRRKLANG_BIN_DIR}/ikpMP3.dll ${ORBITER_BINARY_ROOT_DIR} + COMMAND ${CMAKE_COMMAND} -E copy ${IRRKLANG_BIN_DIR}/ikpFlac.dll ${ORBITER_BINARY_ROOT_DIR} + COMMAND ${CMAKE_COMMAND} -E copy ${IRRKLANG_BIN_DIR}/irrKlang.dll ${ORBITER_BINARY_ROOT_DIR} + COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSET_DIR}/XRSound/Default ${ORBITER_BINARY_ROOT_DIR}/XRSound/Default +) + +install(DIRECTORY ${ORBITER_BINARY_ROOT_DIR}/XRSound + DESTINATION ${ORBITER_INSTALL_ROOT_DIR} +) +install(DIRECTORY ${ORBITER_BINARY_SDK_DIR}/XRSound + DESTINATION ${ORBITER_INSTALL_SDK_DIR} +) +install(DIRECTORY ${ORBITER_BINARY_ROOT_DIR}/XRSound/Default + DESTINATION ${ORBITER_BINARY_ROOT_DIR}/XRSound +) +install(FILES "${ORBITER_BINARY_ROOT_DIR}/Doc/XRSound User Manual.pdf" + DESTINATION ${ORBITER_INSTALL_DOC_DIR}/ +) +install(FILES ${ORBITER_BINARY_ROOT_DIR}/ikpMP3.dll ${ORBITER_BINARY_ROOT_DIR}/ikpFlac.dll ${ORBITER_BINARY_ROOT_DIR}/irrKlang.dll + DESTINATION ${ORBITER_INSTALL_ROOT_DIR}/ +) + add_subdirectory(XRSound) diff --git a/Sound/XRSound/XRSound/src/CMakeLists.txt b/Sound/XRSound/XRSound/src/CMakeLists.txt index 8ae04abb5..0ec824fd5 100644 --- a/Sound/XRSound/XRSound/src/CMakeLists.txt +++ b/Sound/XRSound/XRSound/src/CMakeLists.txt @@ -1 +1,2 @@ add_subdirectory(XRSoundLib) +add_subdirectory(XRSoundDLL) diff --git a/Sound/XRSound/XRSound/src/XRSoundDLL/CMakeLists.txt b/Sound/XRSound/XRSound/src/XRSoundDLL/CMakeLists.txt new file mode 100644 index 000000000..44a484ec5 --- /dev/null +++ b/Sound/XRSound/XRSound/src/XRSoundDLL/CMakeLists.txt @@ -0,0 +1,37 @@ +add_library(XRSound_dll SHARED + DefaultSoundGroupPreSteps.cpp + ModuleXRSoundEngine.cpp + SoundPreSteps.cpp + VesselXRSoundEngine.cpp + XRSoundConfigFileParser.cpp + XRSoundDLL.cpp + XRSoundEngine.cpp + Resource.rc + ../Utils/ConfigFileParser.cpp + ../Utils/FileList.cpp +) + +set_target_properties(XRSound_dll + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${ORBITER_BINARY_PLUGIN_DIR} + OUTPUT_NAME XRSound + COMPILE_DEFINITIONS "XRSOUND_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;_USRDLL;XRSOUNDDLL_EXPORTS" +) + +target_include_directories(XRSound_dll PUBLIC + ${ORBITER_SOURCE_SDK_INCLUDE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../XRSoundLib + ${CMAKE_CURRENT_SOURCE_DIR}/../Utils + ${IRRKLANG_DIR}/include +) + +target_link_libraries(XRSound_dll + ${ORBITER_LIB} + ${ORBITER_SDK_LIB} + ${IRRKLANG_LIB} +) + +install(TARGETS XRSound_dll + RUNTIME + DESTINATION ${ORBITER_INSTALL_PLUGIN_DIR} +) diff --git a/Src/Orbiter/CMakeLists.txt b/Src/Orbiter/CMakeLists.txt index b8f53a2d1..5b00daa94 100644 --- a/Src/Orbiter/CMakeLists.txt +++ b/Src/Orbiter/CMakeLists.txt @@ -244,7 +244,6 @@ if(BUILD_ORBITER_SERVER) OUTPUT_NAME Orbiter VS_DEBUGGER_WORKING_DIRECTORY ${ORBITER_BINARY_ROOT_DIR} COMPILE_DEFINITIONS "NOGRAPHICS;DIRECTINPUT_VERSION=0x0800" - ENABLE_EXPORTS 1 FOLDER Core ) @@ -270,6 +269,10 @@ if(BUILD_ORBITER_SERVER) # If the standard Orbiter executable is not built, we have to use the NG version to export the API links if(NOT BUILD_ORBITER_DX7) + set_target_properties(Orbiter_server + PROPERTIES + ENABLE_EXPORTS 1 + ) install(FILES $ DESTINATION ${ORBITER_INSTALL_SDK_DIR}/lib ) From 68f6967e0afd17812d4366f7c5603fc3356da439 Mon Sep 17 00:00:00 2001 From: Martin Schweiger Date: Fri, 6 Aug 2021 22:14:51 +0100 Subject: [PATCH 03/13] added XRSoundD.lib target with debug flags set manually. --- Sound/XRSound/CMakeLists.txt | 1 + .../XRSound/src/XRSoundLib/CMakeLists.txt | 27 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Sound/XRSound/CMakeLists.txt b/Sound/XRSound/CMakeLists.txt index cbed6e4db..e381d0eb0 100644 --- a/Sound/XRSound/CMakeLists.txt +++ b/Sound/XRSound/CMakeLists.txt @@ -15,6 +15,7 @@ set(IRRKLANG_DLL_DIR ${IRRKLANG_DIR}) file(GLOB config_files ${ASSET_DIR}/XRSound/*.cfg) add_custom_target(XRSound_assets ALL + COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_ROOT_DIR}/Doc COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_ROOT_DIR}/XRSound COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_SDK_DIR}/XRSound/ COMMAND ${CMAKE_COMMAND} -E copy ${config_files} ${ORBITER_BINARY_ROOT_DIR}/XRSound/ diff --git a/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt b/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt index c730e99b5..c8d6d6cd5 100644 --- a/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt +++ b/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt @@ -15,7 +15,32 @@ target_include_directories(XRSound_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../XRSoundDLL ) -install(TARGETS XRSound_lib +# The debug version of XRSoundLib +add_library(XRSound_lib_DBG STATIC + XRSound.cpp + XRSoundImpl.cpp +) + +set_target_properties(XRSound_lib_DBG + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY ${ORBITER_BINARY_SDK_DIR}/XRSound + OUTPUT_NAME XRSoundD +) + +target_include_directories(XRSound_lib_DBG PUBLIC + ${ORBITER_SOURCE_SDK_INCLUDE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../XRSoundDLL +) + +set(DBG_COMPILE_FLAGS "/Zi /Ob0 /Od /RTC1") +set(DBG_LINKER_FLAGS "/debug") +set_target_properties(XRSound_lib_DBG + PROPERTIES + COMPILE_FLAGS ${DBG_COMPILE_FLAGS} + LINK_FLAGS ${DBG_LINKER_FLAGS} +) + +install(TARGETS XRSound_lib XRSound_lib_DBG ARCHIVE DESTINATION ${ORBITER_INSTALL_SDK_DIR}/XRSound ) \ No newline at end of file From 66f0de4bc5888edc48d20debed31995d4843071a Mon Sep 17 00:00:00 2001 From: Martin Schweiger Date: Sat, 7 Aug 2021 06:50:53 +0100 Subject: [PATCH 04/13] added /MDd compiler flag to XRSoundD.lib target --- Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt b/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt index c8d6d6cd5..ea9c2871d 100644 --- a/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt +++ b/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt @@ -32,7 +32,7 @@ target_include_directories(XRSound_lib_DBG PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../XRSoundDLL ) -set(DBG_COMPILE_FLAGS "/Zi /Ob0 /Od /RTC1") +set(DBG_COMPILE_FLAGS "/Zi /Ob0 /Od /MDd /RTC1") set(DBG_LINKER_FLAGS "/debug") set_target_properties(XRSound_lib_DBG PROPERTIES From 1e93a1d14bd32bb1680336276e00b23a4663e734 Mon Sep 17 00:00:00 2001 From: Martin Schweiger Date: Sun, 8 Aug 2021 13:57:12 +0100 Subject: [PATCH 05/13] build XRSoundD.lib as external project with CMAKE_BUILD_TYPE=Debug flag. --- CMakeLists.txt | 1 + Sound/XRSound/XRSound/src/CMakeLists.txt | 11 +++++ .../XRSound/src/XRSoundLib/CMakeLists.txt | 43 ++++++------------- 3 files changed, 26 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd79a0205..346f16621 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.19) include(ExternalProject) +include(CMakePrintHelpers) # Set the project name project (Orbiter VERSION 21.7.24) diff --git a/Sound/XRSound/XRSound/src/CMakeLists.txt b/Sound/XRSound/XRSound/src/CMakeLists.txt index 0ec824fd5..d371003a7 100644 --- a/Sound/XRSound/XRSound/src/CMakeLists.txt +++ b/Sound/XRSound/XRSound/src/CMakeLists.txt @@ -1,2 +1,13 @@ +set(FORCE_DEBUG FALSE) + add_subdirectory(XRSoundLib) add_subdirectory(XRSoundDLL) + +ExternalProject_Add(XRSoundD + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/XRSoundLib/tmp + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/XRSoundLib/tmp + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/XRSoundLib + INSTALL_DIR ${ORBITER_INSTALL_SDK_DIR}/XRSound + CMAKE_GENERATOR Ninja + CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -DFORCE_DEBUG=TRUE -DORBITER_SOURCE_SDK_INCLUDE_DIR:PATH=${ORBITER_SOURCE_SDK_INCLUDE_DIR} -DORBITER_BINARY_SDK_DIR:PATH=${ORBITER_BINARY_SDK_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/XRSoundLib +) diff --git a/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt b/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt index ea9c2871d..f5ecf7066 100644 --- a/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt +++ b/Sound/XRSound/XRSound/src/XRSoundLib/CMakeLists.txt @@ -6,41 +6,26 @@ add_library(XRSound_lib STATIC set_target_properties(XRSound_lib PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY ${ORBITER_BINARY_SDK_DIR}/XRSound - OUTPUT_NAME XRSound + ARCHIVE_OUTPUT_DIRECTORY ${ORBITER_BINARY_SDK_DIR}/$<1:XRSound> ) +if(FORCE_DEBUG) + set_target_properties(XRSound_lib + PROPERTIES + OUTPUT_NAME XRSoundD + ) +else() + set_target_properties(XRSound_lib + PROPERTIES + OUTPUT_NAME XRSound + ) +endif() target_include_directories(XRSound_lib PUBLIC ${ORBITER_SOURCE_SDK_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../XRSoundDLL ) -# The debug version of XRSoundLib -add_library(XRSound_lib_DBG STATIC - XRSound.cpp - XRSoundImpl.cpp -) - -set_target_properties(XRSound_lib_DBG - PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY ${ORBITER_BINARY_SDK_DIR}/XRSound - OUTPUT_NAME XRSoundD -) - -target_include_directories(XRSound_lib_DBG PUBLIC - ${ORBITER_SOURCE_SDK_INCLUDE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../XRSoundDLL -) - -set(DBG_COMPILE_FLAGS "/Zi /Ob0 /Od /MDd /RTC1") -set(DBG_LINKER_FLAGS "/debug") -set_target_properties(XRSound_lib_DBG - PROPERTIES - COMPILE_FLAGS ${DBG_COMPILE_FLAGS} - LINK_FLAGS ${DBG_LINKER_FLAGS} -) - -install(TARGETS XRSound_lib XRSound_lib_DBG +install(TARGETS XRSound_lib ARCHIVE DESTINATION ${ORBITER_INSTALL_SDK_DIR}/XRSound -) \ No newline at end of file +) From 9a53052ed22d01edd1a7bcab6dd1427cc26a909c Mon Sep 17 00:00:00 2001 From: Martin Schweiger Date: Sun, 8 Aug 2021 17:10:03 +0100 Subject: [PATCH 06/13] Added XRSound to About tab. Updated credits. --- Doc/Credit.doc | Bin 60928 -> 62464 bytes Src/Orbiter/Orbiter.rc | 26 ++++++++++++++------------ Src/Orbiter/TabAbout.cpp | 23 +++++++++++++---------- Src/Orbiter/resource.h | 30 +++++++++++++++++------------- 4 files changed, 44 insertions(+), 35 deletions(-) diff --git a/Doc/Credit.doc b/Doc/Credit.doc index 760df585f96f455a955ea646899ad7a87ae9d714..f12dbce6e077b32f131210e2d949d8ae42f63bdd 100644 GIT binary patch delta 6126 zcma*rdstLu9>DS68Bj-V4%Y_pf`kYPh@+(`Dk*qDBtj!oB7yN5Dk0v;$FcHpUDwKZ z-Ew7~C6fKVGm10*6+E9g=RN10_nh;4 zuX9$P^ILt@Z)2LVY}cT(hOtxyn;hnN5xLdg-tOFF8e&8)CRK?gw~y*G%hfTz`*-_W zO`UYg?CjI|yz$CR|7!D3SqI2whJgw2M;^MM3|+Ar0oZ^*Y(@}j5sZ2@vg_zj{mnsx zZIZ!OdKQ+=P;Ynb-DTz@FMjv*hEwX0HM06@Ms>j60FxADoAkv@>XpD4=b39Lt2YYIfF=J8n1is&LoBLfd(48}r#r_4e+TI5K)$g~s@ z>oC&eMOuiDTPi=rhX`*k$n6WgL{ko38q*c z2rYP`4-bT_IJOA5pBr=Vk%=;_#ozHgI>qxu_!1F)MP9}g3``Jt3qRxGenbj^iSz_) z!MCs^i5$l8{vz8@iyi|gAM4P7&dIbKI41J35*t!PE+B!nw*`&3iG>5XDFmd6l;Z=m zA$pL=BUlETO=K=M;=93gxgjEnxP*iUL}no2A(2Nh2fE#d_l{_fTpjMris)^qyofMm zj~o{k%U$b}`p>iPJP=uG3cqvAWbvFMlhbBxHVsb7+}x%9$lD2eP!M^E_Si-dW-)WX zUtZX#x4uWs&KW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13] added platform flag for external project for XRSoundD.lib --- CMakeLists.txt | 2 ++ Sound/XRSound/XRSound/src/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 346f16621..6cdd65fee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,9 +18,11 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64-bit build? set(BUILD64 1) set(ARCH "x64") + set(PLATFORM_STRING "x64") else() set(BUILD64 0) set(ARCH "x86") + set(PLATFORM_STRING "Win32") endif() # Define directories and file paths for some common binaries diff --git a/Sound/XRSound/XRSound/src/CMakeLists.txt b/Sound/XRSound/XRSound/src/CMakeLists.txt index d371003a7..f6adede01 100644 --- a/Sound/XRSound/XRSound/src/CMakeLists.txt +++ b/Sound/XRSound/XRSound/src/CMakeLists.txt @@ -9,5 +9,5 @@ ExternalProject_Add(XRSoundD SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/XRSoundLib INSTALL_DIR ${ORBITER_INSTALL_SDK_DIR}/XRSound CMAKE_GENERATOR Ninja - CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -DFORCE_DEBUG=TRUE -DORBITER_SOURCE_SDK_INCLUDE_DIR:PATH=${ORBITER_SOURCE_SDK_INCLUDE_DIR} -DORBITER_BINARY_SDK_DIR:PATH=${ORBITER_BINARY_SDK_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/XRSoundLib + CONFIGURE_COMMAND ${CMAKE_COMMAND} -A ${PLATFORM_STRING} -DCMAKE_BUILD_TYPE=Debug -DFORCE_DEBUG=TRUE -DORBITER_SOURCE_SDK_INCLUDE_DIR:PATH=${ORBITER_SOURCE_SDK_INCLUDE_DIR} -DORBITER_BINARY_SDK_DIR:PATH=${ORBITER_BINARY_SDK_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/XRSoundLib ) From f322aac7fe0cbc51f72cadbdd14455cd51bd90f9 Mon Sep 17 00:00:00 2001 From: Doug Beachy Date: Sun, 8 Aug 2021 20:17:05 -0400 Subject: [PATCH 08/13] Simple test DLL project to verify that the XRSound.lib and XRSoundD.lib build artifacts generated by the Orbiter CMake project are the correct build type and CPU architecture. Initial version --- .gitignore | 2 + Sound/XRSound/XRSound-lib-linktest/README.md | 25 ++ .../XRSound-lib-linktest.sln | 43 +++ .../XRSound-lib-linktest.vcxproj | 320 ++++++++++++++++++ .../XRSound-lib-linktest.vcxproj.filters | 27 ++ .../XRSound-lib-linktest/dllmain.cpp | 30 ++ .../XRSound-lib-linktest/framework.h | 5 + 7 files changed, 452 insertions(+) create mode 100644 Sound/XRSound/XRSound-lib-linktest/README.md create mode 100644 Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest.sln create mode 100644 Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj create mode 100644 Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj.filters create mode 100644 Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/dllmain.cpp create mode 100644 Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/framework.h diff --git a/.gitignore b/.gitignore index 5bb7df84f..be9b5e2d1 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ Sound/XRSound/**/Debug/ Sound/XRSound/**/Release/ Sound/XRSound/**/x64/ Sound/XRSound/**/dist/ +Sound/XRSound/**/Debug-with-OrbiterRelease/ +Sound/XRSound/**/Release-with-OrbiterRelease/ diff --git a/Sound/XRSound/XRSound-lib-linktest/README.md b/Sound/XRSound/XRSound-lib-linktest/README.md new file mode 100644 index 000000000..32b7739d8 --- /dev/null +++ b/Sound/XRSound/XRSound-lib-linktest/README.md @@ -0,0 +1,25 @@ +This simple DLL solution is only so we can easily test the XRSound.lib and XRSoundD.lib build artifacts generated by the Orbiter CMake project. The .h and .lib include paths are all relative, so this project should run with no additional configuration. + +Before attempting to compile this test app, first build all four Orbiter build configurations using CMake: +x86-Debug +x86-Release +x64-Debug +x64-Release + +Then open `XRSound-lib-linktest.sln`. You can test either one specific build target (see table below), or test all of them at once with Build -> Batch Build -> click Select All -> Click Rebuild. + +In each configuration, XRSound.lib should be a Release build and XRSoundD.lib should be a Debug build. This means there are a total of eight build combinations to test (this linktest project tests them all): + + + |XRSoundLib-linktest| Project Configuration |XRSoundLib-linktest Platform|...tests this generated XRSound lib file| + |-------------------|:---------------------:|----------------------------|----------------------------------------| + |Debug-with-OrbiterDebug|x86|orbiter\out\build\x86-Debug\Orbitersdk\XRSound\XRSoundD.lib| + |Release-with-OrbiterDebug|x86|orbiter\out\build\x86-Debug\Orbitersdk\XRSound\XRSound.lib| + |Debug-with-OrbiterRelease|x86|orbiter\out\build\x86-Release\Orbitersdk\XRSound\XRSoundD.lib| + |Release-with-OrbiterRelease|x86|orbiter\out\build\x86-Release\Orbitersdk\XRSound\XRSound.lib| + |Debug-with-OrbiterDebug|x64|orbiter\out\build\x64-Debug\Orbitersdk\XRSound\XRSoundD.lib| + |Release-with-OrbiterDebug|x64|orbiter\out\build\x64-Debug\Orbitersdk\XRSound\XRSound.lib| + |Debug-with-OrbiterRelease|x64|orbiter\out\build\x64-Release\Orbitersdk\XRSound\XRSoundD.lib| + |Release-with-OrbiterRelease|x64|orbiter\out\build\x64-Release\Orbitersdk\XRSound\XRSound.lib| + +Note: it is not strictly necessary for all eight combinations to link successfully, since only the `Release-with-OrbiterRelease` build artifacts will ever be used by end users. Therefore, only the Release-with-OrbiterRelease x86 and x86 build targets are what matter. diff --git a/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest.sln b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest.sln new file mode 100644 index 000000000..8b9a62d8e --- /dev/null +++ b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31515.178 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XRSound-lib-linktest", "XRSound-lib-linktest\XRSound-lib-linktest.vcxproj", "{F320C36A-20EE-4F7D-88BA-0E5F78B09263}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug-with-OrbiterDebug|x64 = Debug-with-OrbiterDebug|x64 + Debug-with-OrbiterDebug|x86 = Debug-with-OrbiterDebug|x86 + Debug-with-OrbiterRelease|x64 = Debug-with-OrbiterRelease|x64 + Debug-with-OrbiterRelease|x86 = Debug-with-OrbiterRelease|x86 + Release-with-OrbiterDebug|x64 = Release-with-OrbiterDebug|x64 + Release-with-OrbiterDebug|x86 = Release-with-OrbiterDebug|x86 + Release-with-OrbiterRelease|x64 = Release-with-OrbiterRelease|x64 + Release-with-OrbiterRelease|x86 = Release-with-OrbiterRelease|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Debug-with-OrbiterDebug|x64.ActiveCfg = Debug|x64 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Debug-with-OrbiterDebug|x64.Build.0 = Debug|x64 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Debug-with-OrbiterDebug|x86.ActiveCfg = Debug|Win32 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Debug-with-OrbiterDebug|x86.Build.0 = Debug|Win32 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Debug-with-OrbiterRelease|x64.ActiveCfg = Debug-with-OrbiterRelease|x64 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Debug-with-OrbiterRelease|x64.Build.0 = Debug-with-OrbiterRelease|x64 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Debug-with-OrbiterRelease|x86.ActiveCfg = Debug-with-OrbiterRelease|Win32 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Debug-with-OrbiterRelease|x86.Build.0 = Debug-with-OrbiterRelease|Win32 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Release-with-OrbiterDebug|x64.ActiveCfg = Release|x64 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Release-with-OrbiterDebug|x64.Build.0 = Release|x64 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Release-with-OrbiterDebug|x86.ActiveCfg = Release|Win32 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Release-with-OrbiterDebug|x86.Build.0 = Release|Win32 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Release-with-OrbiterRelease|x64.ActiveCfg = Release-with-OrbiterRelease|x64 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Release-with-OrbiterRelease|x64.Build.0 = Release-with-OrbiterRelease|x64 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Release-with-OrbiterRelease|x86.ActiveCfg = Release-with-OrbiterRelease|Win32 + {F320C36A-20EE-4F7D-88BA-0E5F78B09263}.Release-with-OrbiterRelease|x86.Build.0 = Release-with-OrbiterRelease|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {235177CC-EFE7-4266-B425-2B6FE33C2266} + EndGlobalSection +EndGlobal diff --git a/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj new file mode 100644 index 000000000..118680624 --- /dev/null +++ b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj @@ -0,0 +1,320 @@ + + + + + Debug-with-OrbiterRelease + Win32 + + + Debug-with-OrbiterRelease + x64 + + + Debug + Win32 + + + Release-with-OrbiterRelease + Win32 + + + Release-with-OrbiterRelease + x64 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {f320c36a-20ee-4f7d-88ba-0e5f78b09263} + XRSoundliblinktest + 10.0 + + + + DynamicLibrary + true + v142 + NotSet + + + DynamicLibrary + true + v142 + NotSet + + + DynamicLibrary + false + v142 + true + NotSet + + + DynamicLibrary + false + v142 + true + NotSet + + + DynamicLibrary + true + v142 + NotSet + + + DynamicLibrary + true + v142 + NotSet + + + DynamicLibrary + false + v142 + true + NotSet + + + DynamicLibrary + false + v142 + true + NotSet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + true + + + true + + + false + + + false + + + + Level3 + true + WIN32;_DEBUG;XRSOUNDLIBLINKTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + ..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + + + Windows + true + false + ..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + XRSoundD.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Level3 + true + WIN32;_DEBUG;XRSOUNDLIBLINKTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + ..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + + + Windows + true + false + ..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\XRSound + XRSoundD.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + WIN32;NDEBUG;XRSOUNDLIBLINKTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + ..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + + + Windows + true + true + true + false + XRSound.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + + + + + Level3 + true + true + true + WIN32;NDEBUG;XRSOUNDLIBLINKTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + ..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + + + Windows + true + true + true + false + XRSound.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\XRSound + + + + + Level3 + true + _DEBUG;XRSOUNDLIBLINKTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + ..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + + + Windows + true + false + XRSoundD.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + + + + + Level3 + true + _DEBUG;XRSOUNDLIBLINKTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + ..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + + + Windows + true + false + XRSoundD.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\XRSound + + + + + Level3 + true + true + true + NDEBUG;XRSOUNDLIBLINKTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + ..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + + + Windows + true + true + true + false + XRSound.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + + + + + Level3 + true + true + true + NDEBUG;XRSOUNDLIBLINKTEST_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + ..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + + + Windows + true + true + true + false + XRSound.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + ..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\XRSound + + + + + + + + + + + + \ No newline at end of file diff --git a/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj.filters b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj.filters new file mode 100644 index 000000000..791f7df49 --- /dev/null +++ b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + + + Source Files + + + \ No newline at end of file diff --git a/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/dllmain.cpp b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/dllmain.cpp new file mode 100644 index 000000000..1e5bbde7b --- /dev/null +++ b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/dllmain.cpp @@ -0,0 +1,30 @@ +#include "framework.h" +#include "xrsound.h" + +// dllmain.cpp : Defines the entry point for the DLL application. +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + static XRSound *pXRSoundInstance; + + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + // so we link with XRSound.lib (for Release builds) or XRSoundD.lib (for Debug builds) + pXRSoundInstance = XRSound::CreateInstance("XRSound-lib-linktest"); + break; + + case DLL_THREAD_ATTACH: + break; + + case DLL_THREAD_DETACH: + break; + + case DLL_PROCESS_DETACH: + delete pXRSoundInstance; + break; + } + return TRUE; +} diff --git a/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/framework.h b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/framework.h new file mode 100644 index 000000000..54b83e94f --- /dev/null +++ b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/framework.h @@ -0,0 +1,5 @@ +#pragma once + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files +#include From 6451a1ab7cc27f235ee8b29c04595cc0933bcbdf Mon Sep 17 00:00:00 2001 From: Doug Beachy Date: Sun, 8 Aug 2021 20:33:02 -0400 Subject: [PATCH 09/13] Updated README.md for XRSound-lib-linktest Fixed table formatting and polished it up. --- Sound/XRSound/XRSound-lib-linktest/README.md | 41 +++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/Sound/XRSound/XRSound-lib-linktest/README.md b/Sound/XRSound/XRSound-lib-linktest/README.md index 32b7739d8..55ebb3221 100644 --- a/Sound/XRSound/XRSound-lib-linktest/README.md +++ b/Sound/XRSound/XRSound-lib-linktest/README.md @@ -1,25 +1,28 @@ -This simple DLL solution is only so we can easily test the XRSound.lib and XRSoundD.lib build artifacts generated by the Orbiter CMake project. The .h and .lib include paths are all relative, so this project should run with no additional configuration. +# XRSound-lib-linktest +This simple DLL solution is only so we can easily test the `XRSound.lib` and `XRSoundD.lib` build artifacts generated by the Orbiter CMake project. The .h and .lib include paths are all relative, so this project should be able to build successfully with no additional configuration, provided you did not move the project folder. No build artifacts from this project should be released for end users. -Before attempting to compile this test app, first build all four Orbiter build configurations using CMake: -x86-Debug -x86-Release -x64-Debug -x64-Release +## Building this test app to verify the Orbiter CMake XRSound.lib and XRSoundD.lib build artifacts -Then open `XRSound-lib-linktest.sln`. You can test either one specific build target (see table below), or test all of them at once with Build -> Batch Build -> click Select All -> Click Rebuild. +Before attempting to build this test app, first build all four Orbiter build configurations using CMake: +* `x86-Debug` +* `x86-Release` +* `x64-Debug` +* `x64-Release` -In each configuration, XRSound.lib should be a Release build and XRSoundD.lib should be a Debug build. This means there are a total of eight build combinations to test (this linktest project tests them all): +Then open `XRSound-lib-linktest.sln`. You can test either one specific build target (see table below) by building and linking that configuration, or test all of them at once with `Build -> Batch Build -> click Select All -> Click Rebuild`. +In each of the `orbiter\out\build\*\Orbitersdk\XRSound\` folders created by Orbiter's CMake project, `XRSound.lib` should be a `Release` build and `XRSoundD.lib` should be a Debug build. This means there are a total of eight build combinations to test; this linktest project tests them all by creating a DLL compiled and linked with each of the following configurations: - |XRSoundLib-linktest| Project Configuration |XRSoundLib-linktest Platform|...tests this generated XRSound lib file| - |-------------------|:---------------------:|----------------------------|----------------------------------------| - |Debug-with-OrbiterDebug|x86|orbiter\out\build\x86-Debug\Orbitersdk\XRSound\XRSoundD.lib| - |Release-with-OrbiterDebug|x86|orbiter\out\build\x86-Debug\Orbitersdk\XRSound\XRSound.lib| - |Debug-with-OrbiterRelease|x86|orbiter\out\build\x86-Release\Orbitersdk\XRSound\XRSoundD.lib| - |Release-with-OrbiterRelease|x86|orbiter\out\build\x86-Release\Orbitersdk\XRSound\XRSound.lib| - |Debug-with-OrbiterDebug|x64|orbiter\out\build\x64-Debug\Orbitersdk\XRSound\XRSoundD.lib| - |Release-with-OrbiterDebug|x64|orbiter\out\build\x64-Debug\Orbitersdk\XRSound\XRSound.lib| - |Debug-with-OrbiterRelease|x64|orbiter\out\build\x64-Release\Orbitersdk\XRSound\XRSoundD.lib| - |Release-with-OrbiterRelease|x64|orbiter\out\build\x64-Release\Orbitersdk\XRSound\XRSound.lib| -Note: it is not strictly necessary for all eight combinations to link successfully, since only the `Release-with-OrbiterRelease` build artifacts will ever be used by end users. Therefore, only the Release-with-OrbiterRelease x86 and x86 build targets are what matter. +|XRSoundLib-linktest Project Configuration |XRSoundLib-linktest Platform|...tests this generated XRSound lib file| +|----------------------------------------|:----------------------------:|----------------------------------------| +|Debug-with-OrbiterDebug|x86|orbiter\out\build\x86-Debug\Orbitersdk\XRSound\XRSoundD.lib| +|Release-with-OrbiterDebug|x86|orbiter\out\build\x86-Debug\Orbitersdk\XRSound\XRSound.lib| +|Debug-with-OrbiterRelease|x86|orbiter\out\build\x86-Release\Orbitersdk\XRSound\XRSoundD.lib| +|Release-with-OrbiterRelease|x86|orbiter\out\build\x86-Release\Orbitersdk\XRSound\XRSound.lib| +|Debug-with-OrbiterDebug|x64|orbiter\out\build\x64-Debug\Orbitersdk\XRSound\XRSoundD.lib| +|Release-with-OrbiterDebug|x64|orbiter\out\build\x64-Debug\Orbitersdk\XRSound\XRSound.lib| +|Debug-with-OrbiterRelease|x64|orbiter\out\build\x64-Release\Orbitersdk\XRSound\XRSoundD.lib| +|Release-with-OrbiterRelease|x64|orbiter\out\build\x64-Release\Orbitersdk\XRSound\XRSound.lib| + +Note: it is not strictly necessary for all eight combinations to link successfully, since only the `Release-with-OrbiterRelease x86` and `Release-with-OrbiterRelease x64` build artifacts will ever be packaged up and released for end users. Therefore, only those two build targets are what really matter. Having the the other six build configurations work as well is just a matter of convenience for developers linking with XRSound as they work in the Orbiter project tree. From 1512cbe3e179a61a3cd55fb4a3c7f2b08185b89f Mon Sep 17 00:00:00 2001 From: Doug Beachy Date: Sun, 8 Aug 2021 22:44:24 -0400 Subject: [PATCH 10/13] Updated XRSound-lib-linktest README.md Corrected the list of project configurations that need to pass. --- Sound/XRSound/XRSound-lib-linktest/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sound/XRSound/XRSound-lib-linktest/README.md b/Sound/XRSound/XRSound-lib-linktest/README.md index 55ebb3221..7837522c7 100644 --- a/Sound/XRSound/XRSound-lib-linktest/README.md +++ b/Sound/XRSound/XRSound-lib-linktest/README.md @@ -25,4 +25,11 @@ In each of the `orbiter\out\build\*\Orbitersdk\XRSound\` folders created by Orbi |Debug-with-OrbiterRelease|x64|orbiter\out\build\x64-Release\Orbitersdk\XRSound\XRSoundD.lib| |Release-with-OrbiterRelease|x64|orbiter\out\build\x64-Release\Orbitersdk\XRSound\XRSound.lib| -Note: it is not strictly necessary for all eight combinations to link successfully, since only the `Release-with-OrbiterRelease x86` and `Release-with-OrbiterRelease x64` build artifacts will ever be packaged up and released for end users. Therefore, only those two build targets are what really matter. Having the the other six build configurations work as well is just a matter of convenience for developers linking with XRSound as they work in the Orbiter project tree. +Note: it is not strictly necessary for all eight combinations to link successfully, since only the `OrbiterRelease x86` and `OrbiterRelease x64` build artifacts will ever be packaged up and released for end users. Therefore, only those these four build targets need to pass: + +* Debug-with-OrbiterRelease x86 +* Release-with-OrbiterRelease x86 +* Debug-with-OrbiterRelease x64 +* Release-with-OrbiterRelease x64 + +Having the the other four build configurations work as well would just a matter of convenience for developers linking with XRSound as they work in the Orbiter project tree, but it is not required. From ae30a641eb692ebc7b6553975837f3067d02ab32 Mon Sep 17 00:00:00 2001 From: Martin Schweiger Date: Mon, 9 Aug 2021 21:20:27 +0100 Subject: [PATCH 11/13] placed location of Orbiter build directory into a macro (paths.props) to make it easier to modify. --- .../XRSound-lib-linktest.vcxproj | 42 +++++++++++-------- .../XRSound-lib-linktest/paths.props | 15 +++++++ 2 files changed, 40 insertions(+), 17 deletions(-) create mode 100644 Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/paths.props diff --git a/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj index 118680624..a159eb864 100644 --- a/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj +++ b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/XRSound-lib-linktest.vcxproj @@ -101,27 +101,35 @@ - + + + + + + + + + @@ -156,13 +164,13 @@ true NotUsing pch.h - ..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x86-debug\Orbitersdk\include;$(CMAKE_BINARY_DIR)\x86-debug\Orbitersdk\XRSound Windows true false - ..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x86-debug\Orbitersdk\lib;$(CMAKE_BINARY_DIR)\x86-debug\Orbitersdk\XRSound XRSoundD.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) @@ -174,13 +182,13 @@ true NotUsing pch.h - ..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x86-debug\Orbitersdk\include;$(CMAKE_BINARY_DIR)\x86-debug\Orbitersdk\XRSound Windows true false - ..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x86-debug\Orbitersdk\lib;$(CMAKE_BINARY_DIR)\x86-release\Orbitersdk\XRSound XRSoundD.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) @@ -194,7 +202,7 @@ true NotUsing pch.h - ..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x86-release\Orbitersdk\include;$(CMAKE_BINARY_DIR)\x86-debug\Orbitersdk\XRSound Windows @@ -203,7 +211,7 @@ true false XRSound.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - ..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x86-release\Orbitersdk\lib;$(CMAKE_BINARY_DIR)\x86-debug\Orbitersdk\XRSound @@ -216,7 +224,7 @@ true NotUsing pch.h - ..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x86-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x86-release\Orbitersdk\include;$(CMAKE_BINARY_DIR)\x86-debug\Orbitersdk\XRSound Windows @@ -225,7 +233,7 @@ true false XRSound.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - ..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x86-release\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x86-release\Orbitersdk\lib;$(CMAKE_BINARY_DIR)\x86-release\Orbitersdk\XRSound @@ -236,14 +244,14 @@ true NotUsing pch.h - ..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x64-debug\Orbitersdk\include;$(CMAKE_BINARY_DIR)\x64-debug\Orbitersdk\XRSound Windows true false XRSoundD.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - ..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x64-debug\Orbitersdk\lib;$(CMAKE_BINARY_DIR)\x64-debug\Orbitersdk\XRSound @@ -254,14 +262,14 @@ true NotUsing pch.h - ..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x64-debug\Orbitersdk\include;$(CMAKE_BINARY_DIR)\x64-debug\Orbitersdk\XRSound Windows true false XRSoundD.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - ..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x64-debug\Orbitersdk\lib;$(CMAKE_BINARY_DIR)\x64-release\Orbitersdk\XRSound @@ -274,7 +282,7 @@ true NotUsing pch.h - ..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x64-release\Orbitersdk\include;$(CMAKE_BINARY_DIR)\x64-debug\Orbitersdk\XRSound Windows @@ -283,7 +291,7 @@ true false XRSound.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - ..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x64-release\Orbitersdk\lib;$(CMAKE_BINARY_DIR)\x64-debug\Orbitersdk\XRSound @@ -296,7 +304,7 @@ true NotUsing pch.h - ..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\include;..\..\..\..\..\orbiter\out\build\x64-debug\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x64-release\Orbitersdk\include;$(CMAKE_BINARY_DIR)\x64-debug\Orbitersdk\XRSound Windows @@ -305,7 +313,7 @@ true false XRSound.lib;Orbiter.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - ..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\lib;..\..\..\..\..\orbiter\out\build\x64-release\Orbitersdk\XRSound + $(CMAKE_BINARY_DIR)\x64-release\Orbitersdk\lib;$(CMAKE_BINARY_DIR)\x64-release\Orbitersdk\XRSound diff --git a/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/paths.props b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/paths.props new file mode 100644 index 000000000..c88f4a4d7 --- /dev/null +++ b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/paths.props @@ -0,0 +1,15 @@ + + + + + $(SolutionDir)..\..\..\..\..\orbiter\out\build + + + + + + $(CMAKE_BINARY_DIR) + true + + + \ No newline at end of file From 67c6e9d71149f5de03957696bf6ac52518a2abd1 Mon Sep 17 00:00:00 2001 From: Doug Beachy Date: Mon, 9 Aug 2021 19:40:48 -0400 Subject: [PATCH 12/13] Fix CMAKE_BINARY_DIR default path so the project works out-of-the-box --- .../XRSound-lib-linktest/XRSound-lib-linktest/paths.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/paths.props b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/paths.props index c88f4a4d7..7928bd5a9 100644 --- a/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/paths.props +++ b/Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest/paths.props @@ -2,7 +2,7 @@ - $(SolutionDir)..\..\..\..\..\orbiter\out\build + $(SolutionDir)..\..\..\..\orbiter\out\build From e3fff10ba56b0e48e1c594a0f9cf9b23863c6925 Mon Sep 17 00:00:00 2001 From: Martin Schweiger Date: Tue, 10 Aug 2021 03:20:23 +0100 Subject: [PATCH 13/13] skip XRSound build if irrKlang libraries not found --- Sound/XRSound/CMakeLists.txt | 82 ++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 37 deletions(-) diff --git a/Sound/XRSound/CMakeLists.txt b/Sound/XRSound/CMakeLists.txt index e381d0eb0..24a2702b4 100644 --- a/Sound/XRSound/CMakeLists.txt +++ b/Sound/XRSound/CMakeLists.txt @@ -8,40 +8,48 @@ else() endif() set(IRRKLANG_LIB "${IRRKLANG_LIB_DIR}/irrKlang.lib") -set(ASSET_DIR ${CMAKE_CURRENT_SOURCE_DIR}/XRSound/assets) -set(SOLUTION_DIR ${CMAKE_CURRENT_SOURCE_DIR}/XRSound/src) -set(IRRKLANG_DLL_DIR ${IRRKLANG_DIR}) -# Deploy assets -file(GLOB config_files ${ASSET_DIR}/XRSound/*.cfg) - -add_custom_target(XRSound_assets ALL - COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_ROOT_DIR}/Doc - COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_ROOT_DIR}/XRSound - COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_SDK_DIR}/XRSound/ - COMMAND ${CMAKE_COMMAND} -E copy ${config_files} ${ORBITER_BINARY_ROOT_DIR}/XRSound/ - COMMAND ${CMAKE_COMMAND} -E copy ${ASSET_DIR}/XRSound/ReadMe.txt ${ORBITER_BINARY_ROOT_DIR}/XRSound/ - COMMAND ${CMAKE_COMMAND} -E copy "${ASSET_DIR}/Doc/XRSound User Manual.pdf" ${ORBITER_BINARY_ROOT_DIR}/Doc/ - COMMAND ${CMAKE_COMMAND} -E copy ${SOLUTION_DIR}/XRSoundLib/XRSound.h ${ORBITER_BINARY_SDK_DIR}/XRSound/ - COMMAND ${CMAKE_COMMAND} -E copy ${IRRKLANG_BIN_DIR}/ikpMP3.dll ${ORBITER_BINARY_ROOT_DIR} - COMMAND ${CMAKE_COMMAND} -E copy ${IRRKLANG_BIN_DIR}/ikpFlac.dll ${ORBITER_BINARY_ROOT_DIR} - COMMAND ${CMAKE_COMMAND} -E copy ${IRRKLANG_BIN_DIR}/irrKlang.dll ${ORBITER_BINARY_ROOT_DIR} - COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSET_DIR}/XRSound/Default ${ORBITER_BINARY_ROOT_DIR}/XRSound/Default -) - -install(DIRECTORY ${ORBITER_BINARY_ROOT_DIR}/XRSound - DESTINATION ${ORBITER_INSTALL_ROOT_DIR} -) -install(DIRECTORY ${ORBITER_BINARY_SDK_DIR}/XRSound - DESTINATION ${ORBITER_INSTALL_SDK_DIR} -) -install(DIRECTORY ${ORBITER_BINARY_ROOT_DIR}/XRSound/Default - DESTINATION ${ORBITER_BINARY_ROOT_DIR}/XRSound -) -install(FILES "${ORBITER_BINARY_ROOT_DIR}/Doc/XRSound User Manual.pdf" - DESTINATION ${ORBITER_INSTALL_DOC_DIR}/ -) -install(FILES ${ORBITER_BINARY_ROOT_DIR}/ikpMP3.dll ${ORBITER_BINARY_ROOT_DIR}/ikpFlac.dll ${ORBITER_BINARY_ROOT_DIR}/irrKlang.dll - DESTINATION ${ORBITER_INSTALL_ROOT_DIR}/ -) - -add_subdirectory(XRSound) +if(EXISTS ${IRRKLANG_LIB}) + + set(ASSET_DIR ${CMAKE_CURRENT_SOURCE_DIR}/XRSound/assets) + set(SOLUTION_DIR ${CMAKE_CURRENT_SOURCE_DIR}/XRSound/src) + set(IRRKLANG_DLL_DIR ${IRRKLANG_DIR}) + # Deploy assets + file(GLOB config_files ${ASSET_DIR}/XRSound/*.cfg) + + add_custom_target(XRSound_assets ALL + COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_ROOT_DIR}/Doc + COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_ROOT_DIR}/XRSound + COMMAND ${CMAKE_COMMAND} -E make_directory ${ORBITER_BINARY_SDK_DIR}/XRSound/ + COMMAND ${CMAKE_COMMAND} -E copy ${config_files} ${ORBITER_BINARY_ROOT_DIR}/XRSound/ + COMMAND ${CMAKE_COMMAND} -E copy ${ASSET_DIR}/XRSound/ReadMe.txt ${ORBITER_BINARY_ROOT_DIR}/XRSound/ + COMMAND ${CMAKE_COMMAND} -E copy "${ASSET_DIR}/Doc/XRSound User Manual.pdf" ${ORBITER_BINARY_ROOT_DIR}/Doc/ + COMMAND ${CMAKE_COMMAND} -E copy ${SOLUTION_DIR}/XRSoundLib/XRSound.h ${ORBITER_BINARY_SDK_DIR}/XRSound/ + COMMAND ${CMAKE_COMMAND} -E copy ${IRRKLANG_BIN_DIR}/ikpMP3.dll ${ORBITER_BINARY_ROOT_DIR} + COMMAND ${CMAKE_COMMAND} -E copy ${IRRKLANG_BIN_DIR}/ikpFlac.dll ${ORBITER_BINARY_ROOT_DIR} + COMMAND ${CMAKE_COMMAND} -E copy ${IRRKLANG_BIN_DIR}/irrKlang.dll ${ORBITER_BINARY_ROOT_DIR} + COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSET_DIR}/XRSound/Default ${ORBITER_BINARY_ROOT_DIR}/XRSound/Default + ) + + install(DIRECTORY ${ORBITER_BINARY_ROOT_DIR}/XRSound + DESTINATION ${ORBITER_INSTALL_ROOT_DIR} + ) + install(DIRECTORY ${ORBITER_BINARY_SDK_DIR}/XRSound + DESTINATION ${ORBITER_INSTALL_SDK_DIR} + ) + install(DIRECTORY ${ORBITER_BINARY_ROOT_DIR}/XRSound/Default + DESTINATION ${ORBITER_BINARY_ROOT_DIR}/XRSound + ) + install(FILES "${ORBITER_BINARY_ROOT_DIR}/Doc/XRSound User Manual.pdf" + DESTINATION ${ORBITER_INSTALL_DOC_DIR}/ + ) + install(FILES ${ORBITER_BINARY_ROOT_DIR}/ikpMP3.dll ${ORBITER_BINARY_ROOT_DIR}/ikpFlac.dll ${ORBITER_BINARY_ROOT_DIR}/irrKlang.dll + DESTINATION ${ORBITER_INSTALL_ROOT_DIR}/ + ) + + add_subdirectory(XRSound) + +else() + + message(WARNING "irrKlang libraries not found: not building XRSound module.") + +endif()