@@ -54,8 +54,13 @@ endif()
5454set (3DMM_BRENDER_LIBRARY "${3DMM_BRENDER_LIBRARY_DEFAULT} " CACHE STRING "Argonaut BRender library to use for rendering 3D images" )
5555set_property (CACHE 3DMM_BRENDER_LIBRARY PROPERTY STRINGS "Original" "Source" )
5656
57- set (3DMM_AUDIOMAN_LIBRARY "Decompilation" CACHE STRING "AudioMan library to use for mixing wave sounds" )
58- set_property (CACHE 3DMM_AUDIOMAN_LIBRARY PROPERTY STRINGS "Original" "Decompilation" )
57+ if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
58+ # AudioMan is only supported on Windows
59+ set (3DMM_AUDIOMAN_LIBRARY "Decompilation" CACHE STRING "AudioMan library to use for mixing wave sounds" )
60+ set_property (CACHE 3DMM_AUDIOMAN_LIBRARY PROPERTY STRINGS "Original" "Decompilation" "None" )
61+ else ()
62+ set (3DMM_AUDIOMAN_LIBRARY "None" )
63+ endif ()
5964
6065# Default to Win32 on Windows, and SDL on other platforms.
6166if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
@@ -168,7 +173,7 @@ endif()
168173if ("${3DMM_AUDIOMAN_LIBRARY} " STREQUAL "Original" )
169174
170175 # Use original static library
171- find_package (AudioMan )
176+ find_package (AudioMan REQUIRED )
172177
173178elseif ("${3DMM_AUDIOMAN_LIBRARY} " STREQUAL "Decompilation" )
174179
@@ -184,10 +189,16 @@ elseif("${3DMM_AUDIOMAN_LIBRARY}" STREQUAL "Decompilation")
184189 FetchContent_MakeAvailable (AudioManDecomp)
185190 add_library (3DMMForever::AudioMan ALIAS AudioMan )
186191
192+ elseif ("${3DMM_AUDIOMAN_LIBRARY} " STREQUAL "None" )
193+ # No AudioMan
187194else ()
188195 message (FATAL_ERROR "Invalid AudioMan library selected: ${3DMM_AUDIOMAN_LIBRARY} " )
189196endif ()
190197
198+ if (NOT "${3DMM_AUDIOMAN_LIBRARY} " STREQUAL "None" )
199+ add_compile_definitions (HAS_AUDIOMAN )
200+ endif ()
201+
191202add_custom_target (tests )
192203
193204add_subdirectory (kauai )
0 commit comments