-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from orbitersim/trigger_sound_build_cmake
Trigger_sound_build_cmake branch
- Loading branch information
Showing
19 changed files
with
692 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
if(ORBITER_BUILD_XRSOUND) | ||
|
||
add_subdirectory(XRSound) | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# 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") | ||
|
||
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# 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. | ||
|
||
## Building this test app to verify the Orbiter CMake XRSound.lib and XRSoundD.lib build artifacts | ||
|
||
Before attempting to build 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) 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 `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. |
43 changes: 43 additions & 0 deletions
43
Sound/XRSound/XRSound-lib-linktest/XRSound-lib-linktest.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.