cmake: fix building without FAudio

Only add FAudio to target_link_libraries() if it's enabld.
This commit is contained in:
Rafael Kitover 2018-12-26 10:56:27 -08:00
parent a91f066493
commit 979ef8ebbd
1 changed files with 4 additions and 1 deletions

View File

@ -44,8 +44,10 @@ else(ENABLE_OPENAL)
ADD_DEFINITIONS (-DNO_OAL)
endif(ENABLE_OPENAL)
unset(FAUDIO_LIBS)
if(ENABLE_FAUDIO)
find_package(FAudio REQUIRED)
set(FAUDIO_LIBS FAudio)
endif()
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -601,6 +603,7 @@ ADD_EXECUTABLE (
${CM_STUFF}
)
TARGET_LINK_LIBRARIES (
visualboyadvance-m
${VBAMCORE_LIBS}
@ -609,7 +612,7 @@ TARGET_LINK_LIBRARIES (
${DIRECTX_LIBRARIES}
${GTK_LIBRARIES}
${OPENAL_LIBRARY}
FAudio
${FAUDIO_LIBS}
)
if(ENABLE_FFMPEG)