@@ -39,9 +39,13 @@ if(SYNTAX_CHECK_ONLY)
3939endif (SYNTAX_CHECK_ONLY)
4040
4141# Do we want to build with ffmpeg for audio/video decoding?
42- option (W3D_BUILD_OPTION_FFMPEG "Build with ffmpeg." OFF )
42+ option (W3D_BUILD_OPTION_FFMPEG "Build with ffmpeg." ON )
4343add_feature_info(FFMpegBuild W3D_BUILD_OPTION_FFMPEG "Build OpenW3D with FFMpeg" )
4444
45+ # Do we want to build with OpenAL/ffmpeg for audio playback?
46+ cmake_dependent_option(W3D_BUILD_OPTION_OPENAL "Build with openal." ON W3D_BUILD_OPTION_FFMPEG OFF )
47+ add_feature_info(OpenALBuild W3D_BUILD_OPTION_OPENAL "Build OpenW3D with OpenAL" )
48+
4549if (NOT WIN32 )
4650 add_compile_definitions (__cdecl=)
4751 add_compile_definitions (__stdcall=)
@@ -58,9 +62,13 @@ if(W3D_BUILD_OPTION_FFMPEG)
5862 include (ffmpeg)
5963endif ()
6064
65+ if (W3D_BUILD_OPTION_OPENAL)
66+ include (openal)
67+ endif ()
68+
6169if (WIN32 )
6270 # Do we want to build with bink for video decoding?
63- option (W3D_BUILD_OPTION_BINK "Build with bink." ON )
71+ cmake_dependent_option (W3D_BUILD_OPTION_BINK "Build with bink." ON NOT W3D_BUILD_OPTION_FFMPEG OFF )
6472 add_feature_info(BinkBuild W3D_BUILD_OPTION_BINK "Build OpenW3D with Bink" )
6573
6674 if (W3D_BUILD_OPTION_BINK)
@@ -69,7 +77,7 @@ if(WIN32)
6977 endif ()
7078
7179 # Do we want to build with miles for audio playback?
72- option (W3D_BUILD_OPTION_MILES "Build with miles." ON )
80+ cmake_dependent_option (W3D_BUILD_OPTION_MILES "Build with miles." ON NOT W3D_BUILD_OPTION_OPENAL OFF )
7381 add_feature_info(MilesBuild W3D_BUILD_OPTION_MILES "Build OpenW3D with Miles Audio" )
7482
7583 if (W3D_BUILD_OPTION_MILES)
0 commit comments