mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-23 22:41:05 +01:00
cmake: mpg123 downloads in v3.18<
This commit is contained in:
parent
c51b16b4e1
commit
a46606fddb
@ -7,19 +7,34 @@ if(NOT WIN32 AND USE_MPEG)
|
||||
endif()
|
||||
endif()
|
||||
if(MPEG_PATH OR BUILD_STATIC OR NOT MPG123_FOUND)
|
||||
FetchDependency(MPEG
|
||||
DIR mpg123
|
||||
DOWNLOAD https://downloads.sourceforge.net/mpg123/mpg123-1.28.2.tar.bz2
|
||||
SUBDIR mpg123-1.28.2
|
||||
)
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.18.0")
|
||||
# no ARCHIVE_EXTRACT until 3.18
|
||||
FetchDependency(MPEG
|
||||
DIR mpg123
|
||||
# "official" git repo: https://www.mpg123.de/trunk/.git/ but *very* slow (HTTP emulation)
|
||||
# (original is svn://scm.orgis.org/mpg123/trunk, FetchDependency would need SVN_REPOSITORY and stuff)
|
||||
# "official" git mirror (default branch is not master), works too
|
||||
# not sure how to set branch + commit fedb989a4d300199f09757815409d3a89b8bc63 (v1.28.2)
|
||||
GIT_REPOSITORY https://github.com/madebr/mpg123
|
||||
GIT_TAG master
|
||||
)
|
||||
set(MPEG_BUILD_COMMAND autoreconf -iv && ./configure --enable-static=yes --enable-shared=no && make && make install DESTDIR="${MPEG_BIN}/bin" && make clean)
|
||||
else()
|
||||
FetchDependency(MPEG
|
||||
DIR mpg123
|
||||
DOWNLOAD https://downloads.sourceforge.net/mpg123/mpg123-1.28.2.tar.bz2
|
||||
SUBDIR mpg123-1.28.2
|
||||
)
|
||||
set(MPEG_BUILD_COMMAND ./configure --enable-static=yes --enable-shared=no && make && make install DESTDIR="${MPEG_BIN}/bin" && make clean)
|
||||
endif()
|
||||
|
||||
if(MPEG_PATH)
|
||||
set(MPEG_LINK_PATH ${MPEG_BIN}/bin/usr/local/lib/libmpg123.a)
|
||||
set(MPG123_INCLUDE_DIR ${MPEG_BIN}/bin/usr/local/include)
|
||||
|
||||
if(NOT EXISTS ${MPEG_LINK_PATH})
|
||||
add_custom_target(MPEG_MAKE ALL
|
||||
COMMAND ./configure --enable-static=yes --enable-shared=no && make && make install DESTDIR="${MPEG_BIN}/bin" && make clean
|
||||
COMMAND ${MPEG_BUILD_COMMAND}
|
||||
WORKING_DIRECTORY ${MPEG_PATH}
|
||||
)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user