Skip to content
Permalink
Browse files
Android: fix CMakeLists.txt
  • Loading branch information
1bsyl committed Aug 15, 2019
1 parent e92d830 commit e1dc59fd306e834f1fdf70475466d2e03f9a8294
Showing 1 changed file with 9 additions and 8 deletions.
@@ -14,9 +14,9 @@ if (ANDROID)
option(SUPPORT_MOD_MODPLUG "Support loading MOD music via modplug" OFF)
option(SUPPORT_MID_TIMIDITY "Support TiMidity" OFF)

add_library(SDL_mixer SHARED)
add_library(SDL2_mixer SHARED)

target_sources(SDL_mixer PRIVATE
target_sources(SDL2_mixer PRIVATE
effect_position.c effects_internal.c
effect_stereoreverse.c load_aiff.c load_voc.c mixer.c music.c
music_cmd.c music_flac.c music_fluidsynth.c music_mad.c
@@ -27,37 +27,38 @@ if (ANDROID)
add_definitions(-DMUSIC_FLAC)
add_subdirectory(external/flac-1.3.2)
include_directories(external/flac-1.3.2/include)
target_link_libraries(SDL_mixer PRIVATE FLAC)
target_link_libraries(SDL2_mixer PRIVATE FLAC)
endif()

if (SUPPORT_OGG)
add_definitions(-DMUSIC_OGG -DOGG_USE_TREMOR -DOGG_HEADER=<ivorbisfile.h>)
add_subdirectory(external/libogg-1.3.2)
add_subdirectory(external/libvorbisidec-1.2.1)
include_directories(external/libvorbisidec-1.2.1)
target_link_libraries(SDL_mixer PRIVATE vorbisfile vorbisidec ogg)
target_link_libraries(SDL2_mixer PRIVATE vorbisfile vorbisidec ogg)
endif()

if (SUPPORT_MP3_MPG123)
add_definitions(-DMUSIC_MP3_MPG123)
add_subdirectory(external/mpg123-1.25.6)
target_link_libraries(SDL_mixer PRIVATE mpg123)
target_link_libraries(SDL2_mixer PRIVATE mpg123)
endif()

if (SUPPORT_MOD_MODPLUG)
add_definitions(-DMUSIC_MOD_MODPLUG -DMODPLUG_HEADER=<modplug.h>)
add_subdirectory(external/libmodplug-0.8.9.0)
include_directories(external/libmodplug-0.8.9.0/src)
target_link_libraries(SDL_mixer PRIVATE modplug)
target_link_libraries(SDL2_mixer PRIVATE modplug)
endif()

if (SUPPORT_MID_TIMIDITY)
add_definitions(-DMUSIC_MID_TIMIDITY)
add_subdirectory(timidity)
target_link_libraries(SDL_mixer PRIVATE timidity)
target_link_libraries(SDL2_mixer PRIVATE timidity)
endif()

target_link_libraries(SDL_mixer PRIVATE SDL2)
target_include_directories(SDL2_mixer PUBLIC .)
target_link_libraries(SDL2_mixer PRIVATE SDL2)
else()

endif()

0 comments on commit e1dc59f

Please sign in to comment.