build: fix build with -DENABLE_OPENAL=TRUE
Followup on 8ced18c2
(build: make OpenAL-Soft optional again,
2025-05-22), put the sources for OpenAL support in the right place in
the CMake file for the build to work.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
8ced18c22f
commit
39cad5feb8
|
@ -186,17 +186,6 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg")
|
|||
set(wxWidgets_LIB_DIR "${wxWidgets_LIB_DIR}" CACHE INTERNAL "wxWidgets library directory" FORCE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPENAL)
|
||||
find_package(OpenAL REQUIRED)
|
||||
|
||||
target_sources(visualboyadvance-m PRIVATE
|
||||
audio/internal/openal.cpp
|
||||
audio/internal/openal.h
|
||||
)
|
||||
|
||||
target_compile_definitions(visualboyadvance-m PRIVATE VBAM_ENABLE_OPENAL)
|
||||
endif()
|
||||
|
||||
# Workaround of static liblzma not being found on MSYS2.
|
||||
if(VBAM_STATIC AND MSYS)
|
||||
unset(cleaned_up_wx_libs)
|
||||
|
@ -410,6 +399,18 @@ else()
|
|||
target_include_directories(visualboyadvance-m PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPENAL)
|
||||
find_package(OpenAL REQUIRED)
|
||||
|
||||
target_sources(visualboyadvance-m PRIVATE
|
||||
audio/internal/openal.cpp
|
||||
audio/internal/openal.h
|
||||
)
|
||||
|
||||
target_compile_definitions(visualboyadvance-m PRIVATE VBAM_ENABLE_OPENAL)
|
||||
endif()
|
||||
|
||||
|
||||
target_link_libraries(
|
||||
visualboyadvance-m
|
||||
vbam-components-draw-text
|
||||
|
|
Loading…
Reference in New Issue