CMakeLists.txt
changeset 935 c52db177a8bd
parent 934 c251a3a6a2df
child 999 1a87fe70802d
     1.1 --- a/CMakeLists.txt	Wed Aug 14 09:47:18 2019 +0200
     1.2 +++ b/CMakeLists.txt	Thu Aug 15 18:14:15 2019 +0200
     1.3 @@ -14,9 +14,9 @@
     1.4      option(SUPPORT_MOD_MODPLUG "Support loading MOD music via modplug" OFF)
     1.5      option(SUPPORT_MID_TIMIDITY "Support TiMidity" OFF)
     1.6  
     1.7 -    add_library(SDL_mixer SHARED)
     1.8 +    add_library(SDL2_mixer SHARED)
     1.9  
    1.10 -    target_sources(SDL_mixer PRIVATE
    1.11 +    target_sources(SDL2_mixer PRIVATE
    1.12              effect_position.c effects_internal.c
    1.13              effect_stereoreverse.c load_aiff.c load_voc.c mixer.c music.c
    1.14              music_cmd.c music_flac.c music_fluidsynth.c music_mad.c
    1.15 @@ -27,7 +27,7 @@
    1.16          add_definitions(-DMUSIC_FLAC)
    1.17          add_subdirectory(external/flac-1.3.2)
    1.18          include_directories(external/flac-1.3.2/include)
    1.19 -        target_link_libraries(SDL_mixer PRIVATE FLAC)
    1.20 +        target_link_libraries(SDL2_mixer PRIVATE FLAC)
    1.21      endif()
    1.22  
    1.23      if (SUPPORT_OGG)
    1.24 @@ -35,29 +35,30 @@
    1.25          add_subdirectory(external/libogg-1.3.2)
    1.26          add_subdirectory(external/libvorbisidec-1.2.1)
    1.27          include_directories(external/libvorbisidec-1.2.1)
    1.28 -        target_link_libraries(SDL_mixer PRIVATE vorbisfile vorbisidec ogg)
    1.29 +        target_link_libraries(SDL2_mixer PRIVATE vorbisfile vorbisidec ogg)
    1.30      endif()
    1.31  
    1.32      if (SUPPORT_MP3_MPG123)
    1.33          add_definitions(-DMUSIC_MP3_MPG123)
    1.34          add_subdirectory(external/mpg123-1.25.6)
    1.35 -        target_link_libraries(SDL_mixer PRIVATE mpg123)
    1.36 +        target_link_libraries(SDL2_mixer PRIVATE mpg123)
    1.37      endif()
    1.38  
    1.39      if (SUPPORT_MOD_MODPLUG)
    1.40          add_definitions(-DMUSIC_MOD_MODPLUG -DMODPLUG_HEADER=<modplug.h>)
    1.41          add_subdirectory(external/libmodplug-0.8.9.0)
    1.42          include_directories(external/libmodplug-0.8.9.0/src)
    1.43 -        target_link_libraries(SDL_mixer PRIVATE modplug)
    1.44 +        target_link_libraries(SDL2_mixer PRIVATE modplug)
    1.45      endif()
    1.46  
    1.47      if (SUPPORT_MID_TIMIDITY)
    1.48          add_definitions(-DMUSIC_MID_TIMIDITY)
    1.49          add_subdirectory(timidity)
    1.50 -        target_link_libraries(SDL_mixer PRIVATE timidity)
    1.51 +        target_link_libraries(SDL2_mixer PRIVATE timidity)
    1.52      endif()
    1.53  
    1.54 -    target_link_libraries(SDL_mixer PRIVATE SDL2)
    1.55 +    target_include_directories(SDL2_mixer PUBLIC .)
    1.56 +    target_link_libraries(SDL2_mixer PRIVATE SDL2)
    1.57  else()
    1.58  
    1.59  endif()