Skip to content

Commit

Permalink
cmake: fix building without FAudio
Browse files Browse the repository at this point in the history
Only add FAudio to target_link_libraries() if it's enabld.
  • Loading branch information
rkitover committed Dec 26, 2018
1 parent a91f066 commit 979ef8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/wx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -601,6 +603,7 @@ ADD_EXECUTABLE (
${CM_STUFF}
)


TARGET_LINK_LIBRARIES (
visualboyadvance-m
${VBAMCORE_LIBS}
Expand All @@ -609,7 +612,7 @@ TARGET_LINK_LIBRARIES (
${DIRECTX_LIBRARIES}
${GTK_LIBRARIES}
${OPENAL_LIBRARY}
FAudio
${FAUDIO_LIBS}
)

if(ENABLE_FFMPEG)
Expand Down

0 comments on commit 979ef8e

Please sign in to comment.