fix: don't try to load OpenAL if option is turned off

Tobias Zwick 2012-11-16 17:30:52 +01:00
parent 348fb8c7a9
commit f7f734d2bb
1 changed files with 12 additions and 5 deletions

View File

@ -67,6 +67,8 @@ endif()
if(NOT USE_GL AND NOT USE_DIRECTX)
message(STATUS "No graphics display enabled; building dedicated server")
SET(USE_CONSOLE ON CACHE INTERNAL "Build dedicated server")
else()
SET(USE_CONSOLE OFF)
endif()
if(UNIX AND NOT USE_SDL_MAINLOOP AND NOT APPLE AND NOT USE_CONSOLE)
option(USE_X11 "Use X11 to create windows etc." ON)
@ -1003,12 +1005,17 @@ target_link_libraries(clonk
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${ICONV_LIBRARY}
${VORBIS_LIBRARY}
${VORBISFILE_LIBRARY}
${OGG_LIBRARY}
${OPENAL_LIBRARY}
${ALUT_LIBRARY}
)
if(USE_OPEN_AL)
target_link_libraries(clonk
${OPENAL_LIBRARY}
${ALUT_LIBRARY}
${VORBIS_LIBRARY}
${VORBISFILE_LIBRARY}
${OGG_LIBRARY}
)
endif()
target_link_libraries(c4group
${ZLIB_LIBRARIES}
)