[sdl2-mixer]Delete the absolute path of the dependent libraries.

This commit is contained in:
JackBoosY 2019-10-08 00:26:14 -07:00
parent 9f26ae8bf0
commit df09093358
2 changed files with 12 additions and 6 deletions

View File

@ -16,7 +16,9 @@ if(SDL_MIXER_ENABLE_MP3)
find_library(MPG123_LIBRARY NAMES libmpg123 mpg123) find_library(MPG123_LIBRARY NAMES libmpg123 mpg123)
list(APPEND SDL_MIXER_INCLUDES ${MPG123_INCLUDE_DIR}) list(APPEND SDL_MIXER_INCLUDES ${MPG123_INCLUDE_DIR})
list(APPEND SDL_MIXER_DEFINES MUSIC_MP3_MPG123) list(APPEND SDL_MIXER_DEFINES MUSIC_MP3_MPG123)
list(APPEND SDL_MIXER_LOAD_DEFINES -DMPG123_DYNAMIC="${MPG123_LIBRARY}") get_filename_component(MPG123_LIBRARY_NAME "${MPG123_LIBRARY}" NAME)
message("MPG123_LIBRARY_NAME: ${MPG123_LIBRARY_NAME}")
list(APPEND SDL_MIXER_LOAD_DEFINES -DMPG123_DYNAMIC="${MPG123_LIBRARY_NAME}")
endif() endif()
# FLAC support # FLAC support
@ -25,7 +27,8 @@ if(SDL_MIXER_ENABLE_FLAC)
find_library(FLAC_LIBRARY FLAC) find_library(FLAC_LIBRARY FLAC)
list(APPEND SDL_MIXER_INCLUDES ${FLAC_INCLUDE_DIR}) list(APPEND SDL_MIXER_INCLUDES ${FLAC_INCLUDE_DIR})
list(APPEND SDL_MIXER_DEFINES MUSIC_FLAC) list(APPEND SDL_MIXER_DEFINES MUSIC_FLAC)
list(APPEND SDL_MIXER_LOAD_DEFINES -DFLAC_DYNAMIC="${FLAC_LIBRARY}") get_filename_component(FLAC_LIBRARY_NAME "${FLAC_LIBRARY}" NAME)
list(APPEND SDL_MIXER_LOAD_DEFINES -DFLAC_DYNAMIC="${FLAC_LIBRARY_NAME}")
endif() endif()
# MOD support # MOD support
@ -34,7 +37,8 @@ if(SDL_MIXER_ENABLE_MOD)
find_library(MODPLUG_LIBRARY modplug) find_library(MODPLUG_LIBRARY modplug)
list(APPEND SDL_MIXER_INCLUDES ${MODPLUG_INCLUDE_DIR}) list(APPEND SDL_MIXER_INCLUDES ${MODPLUG_INCLUDE_DIR})
list(APPEND SDL_MIXER_DEFINES MUSIC_MOD_MODPLUG) list(APPEND SDL_MIXER_DEFINES MUSIC_MOD_MODPLUG)
list(APPEND SDL_MIXER_LOAD_DEFINES -DMODPLUG_DYNAMIC="${MODPLUG_LIBRARY}") get_filename_component(MODPLUG_LIBRARY_NAME "${MODPLUG_LIBRARY}" NAME)
list(APPEND SDL_MIXER_LOAD_DEFINES -DMODPLUG_DYNAMIC="${MODPLUG_LIBRARY_NAME}")
endif() endif()
# Ogg-Vorbis support # Ogg-Vorbis support
@ -43,7 +47,8 @@ if(SDL_MIXER_ENABLE_OGGVORBIS)
find_library(VORBISFILE_LIBRARY vorbisfile) find_library(VORBISFILE_LIBRARY vorbisfile)
list(APPEND SDL_MIXER_INCLUDES ${VORBIS_INCLUDE_DIR}) list(APPEND SDL_MIXER_INCLUDES ${VORBIS_INCLUDE_DIR})
list(APPEND SDL_MIXER_DEFINES MUSIC_OGG) list(APPEND SDL_MIXER_DEFINES MUSIC_OGG)
list(APPEND SDL_MIXER_LOAD_DEFINES -DOGG_DYNAMIC="${VORBISFILE_LIBRARY}") get_filename_component(VORBISFILE_LIBRARY_NAME "${VORBISFILE_LIBRARY}" NAME)
list(APPEND SDL_MIXER_LOAD_DEFINES -DOGG_DYNAMIC="${VORBISFILE_LIBRARY_NAME}")
endif() endif()
# Opus support # Opus support
@ -52,7 +57,8 @@ if(SDL_MIXER_ENABLE_OPUS)
find_library(OPUSFILE_LIBRARY opusfile) find_library(OPUSFILE_LIBRARY opusfile)
list(APPEND SDL_MIXER_INCLUDES ${OPUS_INCLUDE_DIR}) list(APPEND SDL_MIXER_INCLUDES ${OPUS_INCLUDE_DIR})
list(APPEND SDL_MIXER_DEFINES MUSIC_OPUS) list(APPEND SDL_MIXER_DEFINES MUSIC_OPUS)
list(APPEND SDL_MIXER_LOAD_DEFINES -DOPUS_DYNAMIC="${OPUSFILE_LIBRARY}") get_filename_component(OPUSFILE_LIBRARY_NAME "${OPUSFILE_LIBRARY}" NAME)
list(APPEND SDL_MIXER_LOAD_DEFINES -DOPUS_DYNAMIC="${OPUSFILE_LIBRARY_NAME}")
endif() endif()
add_library(SDL2_mixer add_library(SDL2_mixer

View File

@ -1,5 +1,5 @@
Source: sdl2-mixer Source: sdl2-mixer
Version: 2.0.4-6 Version: 2.0.4-7
Homepage: https://www.libsdl.org/projects/SDL_mixer Homepage: https://www.libsdl.org/projects/SDL_mixer
Description: Multi-channel audio mixer library for SDL. Description: Multi-channel audio mixer library for SDL.
Build-Depends: sdl2 Build-Depends: sdl2