Apply foo0's patch to disable mpg123 in cmake megasource builds (issues #931 and #404)

This commit is contained in:
Bart van Strien
2014-09-15 17:43:31 +02:00
parent 00944c5f5d
commit 793ef5db01
+25 -4
View File
@@ -46,6 +46,7 @@ else()
endif()
option(LOVE_JIT "Use LuaJIT" TRUE)
option(LOVE_MPG123 "Use mpg123" TRUE)
if(LOVE_JIT)
message(STATUS "LuaJIT: Enabled")
@@ -53,6 +54,10 @@ else()
message(STATUS "LuaJIT: Disabled")
endif()
if(NOT LOVE_MPG123)
add_definitions(-DLOVE_NOMPG123)
endif()
message(STATUS "Target platform: ${LOVE_TARGET_PLATFORM}")
find_package(OpenGL)
@@ -610,8 +615,6 @@ set(LOVE_SRC_MODULE_SOUND_LULLABY
src/modules/sound/lullaby/GmeDecoder.h
src/modules/sound/lullaby/ModPlugDecoder.cpp
src/modules/sound/lullaby/ModPlugDecoder.h
src/modules/sound/lullaby/Mpg123Decoder.cpp
src/modules/sound/lullaby/Mpg123Decoder.h
src/modules/sound/lullaby/Sound.cpp
src/modules/sound/lullaby/Sound.h
src/modules/sound/lullaby/VorbisDecoder.cpp
@@ -620,6 +623,14 @@ set(LOVE_SRC_MODULE_SOUND_LULLABY
src/modules/sound/lullaby/WaveDecoder.h
)
if(LOVE_MPG123)
set(LOVE_SRC_MODULE_SOUND_LULLABY
${LOVE_SRC_MODULE_SOUND_LULLABY}
src/modules/sound/lullaby/Mpg123Decoder.cpp
src/modules/sound/lullaby/Mpg123Decoder.h
)
endif()
set(LOVE_SRC_MODULE_SOUND
${LOVE_SRC_MODULE_SOUND_ROOT}
${LOVE_SRC_MODULE_SOUND_LULLABY}
@@ -1096,7 +1107,6 @@ set(LOVE_MEGA_3P
${MEGA_LIBVORBIS}
${MEGA_LUA}
${MEGA_MODPLUG}
${MEGA_MPEG123}
${MEGA_OPENAL}
${MEGA_PHYSFS}
${MEGA_SDL2MAIN}
@@ -1105,6 +1115,14 @@ set(LOVE_MEGA_3P
${MEGA_ZLIB}
)
if(LOVE_MPG123)
set(LOVE_MEGA_3P
${LOVE_MEGA_3P}
${MEGA_MPEG123}
)
endif()
set(LOVE_LINK_LIBRARIES
${OPENGL_gl_LIBRARY}
${LOVE_MEGA_3P}
@@ -1144,7 +1162,10 @@ target_link_libraries(love liblove)
# Add post build steps to move the DLLs next to the binary. Otherwise
# running/debugging the binary will not work from inside VS.
add_move_dll(love ${MEGA_MPEG123})
if(LOVE_MPG123)
add_move_dll(love ${MEGA_MPEG123})
endif()
add_move_dll(love ${MEGA_SDL2})
add_move_dll(love ${MEGA_OPENAL})
add_move_dll(love ${MEGA_DEVIL})