mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
More cleanups.
This commit is contained in:
parent
86b0200b27
commit
f113c3ce61
9
.cmake/AddLinuxSystemLibs.cmake
Normal file
9
.cmake/AddLinuxSystemLibs.cmake
Normal file
@ -0,0 +1,9 @@
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
find_library(LIBDL NAMES dl)
|
||||
list(APPEND DEFAULT_OS_SYSTEM_LIBS ${LIBDL})
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
find_library(LIBPTHREAD NAMES libpthread.a)
|
||||
list(APPEND DEFAULT_OS_SYSTEM_LIBS ${LIBPTHREAD})
|
||||
endif()
|
@ -21,14 +21,15 @@ include(ConfigureRpath)
|
||||
include(ConfigureStandalone)
|
||||
include(ConfigureBsdPaths)
|
||||
include(AddDarwinSystemLibs)
|
||||
include(AddLinuxSystemLibs)
|
||||
include(ConfigureCurses)
|
||||
include(ConfigureTaglib)
|
||||
include(ConfigureCompilerFlags)
|
||||
|
||||
message(STATUS "[vendor-link-directories] ${VENDOR_LINK_DIRECTORIES}")
|
||||
message(STATUS "[vendor-include-directories] ${VENDOR_INCLUDE_DIRECTORIES}")
|
||||
message(STATUS "[os-system-libs] ${DEFAULT_OS_SYSTEM_LIBS}")
|
||||
|
||||
# our include directories
|
||||
include_directories(
|
||||
"${musikcube_SOURCE_DIR}/src"
|
||||
"${musikcube_SOURCE_DIR}/src/musikcore"
|
||||
@ -36,7 +37,6 @@ include_directories(
|
||||
"${musikcube_SOURCE_DIR}/src/musikcube/cursespp"
|
||||
"${musikcube_SOURCE_DIR}/src/3rdparty/include")
|
||||
|
||||
# our library directories
|
||||
link_directories("${musikcube_SOURCE_DIR}/bin/plugins")
|
||||
|
||||
find_package(Boost 1.55.0 REQUIRED system filesystem thread)
|
||||
@ -44,23 +44,19 @@ include_directories(${Boost_INCLUDE_DIRS})
|
||||
message(STATUS "[boost] libs: " ${Boost_LIBRARIES})
|
||||
message(STATUS "[boost] includes: " ${Boost_INCLUDE_DIRS})
|
||||
|
||||
find_library(LIBCURL NAMES curl PATHS ${VENDOR_LINK_DIRECTORIES} NO_DEFAULT_PATH)
|
||||
if (${BUILD_STANDALONE} MATCHES "true")
|
||||
target_include_directories(musikcube BEFORE PRIVATE ${VENDOR_INCLUDE_DIRECTORIES})
|
||||
find_library(LIBCURL NAMES curl PATHS ${VENDOR_LINK_DIRECTORIES} NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library(LIBCURL NAMES curl)
|
||||
endif()
|
||||
|
||||
find_library(LIBSSL NAMES ssl)
|
||||
find_library(LIBCRYPTO NAMES crypto)
|
||||
find_library(LIBZ NAMES z)
|
||||
|
||||
set(musikcube_LINK_LIBS ${DEFAULT_OS_SYSTEM_LIBS} ${Boost_LIBRARIES} ${LIBCURL} ${LIBSSL} ${LIBCRYPTO} ${LIBZ})
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
find_library(LIBDL NAMES dl)
|
||||
set (musikcube_LINK_LIBS ${musikcube_LINK_LIBS} ${LIBDL})
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
find_library(LIBPTHREAD NAMES libpthread.a)
|
||||
set (musikcube_LINK_LIBS ${musikcube_LINK_LIBS} ${LIBPTHREAD})
|
||||
endif()
|
||||
|
||||
if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
|
||||
if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||
message(STATUS "[build] libatomic required, adding to library list")
|
||||
|
@ -200,19 +200,6 @@ make -j8 || exit $?
|
||||
make install
|
||||
cd ..
|
||||
|
||||
#
|
||||
# libmp3lame
|
||||
#
|
||||
|
||||
wget https://phoenixnap.dl.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
|
||||
tar xvfz lame-3.100.tar.gz
|
||||
cd lame-3.100/
|
||||
./configure --enable-shared --enable-static --prefix=`pwd`/output
|
||||
make -j8 || exit $?
|
||||
make install
|
||||
mv output ../lame-bin
|
||||
cd ..
|
||||
|
||||
#
|
||||
# libmicrohttpd
|
||||
#
|
||||
@ -226,19 +213,6 @@ make install
|
||||
mv output ../libmicrohttpd-bin
|
||||
cd ..
|
||||
|
||||
#
|
||||
# libz
|
||||
#
|
||||
|
||||
wget https://zlib.net/zlib-1.2.11.tar.gz
|
||||
tar xvfz zlib-1.2.11.tar.gz
|
||||
cd zlib-1.2.11
|
||||
./configure --prefix=`pwd`/output
|
||||
make -j8 || exit $?
|
||||
make install
|
||||
mv output ../zlib-bin
|
||||
cd ..
|
||||
|
||||
#
|
||||
# curl
|
||||
#
|
||||
|
@ -3,9 +3,9 @@ set (ffmpegdecoder_SOURCES
|
||||
FfmpegDecoder.cpp)
|
||||
|
||||
add_library(ffmpegdecoder SHARED ${ffmpegdecoder_SOURCES})
|
||||
target_include_directories(ffmpegdecoder PRIVATE BEFORE ${VENDOR_INCLUDE_DIRECTORIES})
|
||||
|
||||
if (${BUILD_STANDALONE} MATCHES "true")
|
||||
target_include_directories(ffmpegdecoder PRIVATE BEFORE ${VENDOR_INCLUDE_DIRECTORIES})
|
||||
find_library(AVCODEC NAMES avcodec-musikcube PATHS ${VENDOR_LINK_DIRECTORIES} NO_DEFAULT_PATH)
|
||||
find_library(AVUTIL NAMES avutil-musikcube PATHS ${VENDOR_LINK_DIRECTORIES} NO_DEFAULT_PATH)
|
||||
find_library(AVFORMAT NAMES avformat-musikcube PATHS ${VENDOR_LINK_DIRECTORIES} NO_DEFAULT_PATH)
|
||||
|
@ -10,13 +10,10 @@ set (server_SOURCES
|
||||
|
||||
add_library(server SHARED ${server_SOURCES})
|
||||
|
||||
target_include_directories(
|
||||
server
|
||||
BEFORE PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/include"
|
||||
${VENDOR_INCLUDE_DIRECTORIES})
|
||||
target_include_directories(server BEFORE PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/include")
|
||||
|
||||
if (${BUILD_STANDALONE} MATCHES "true")
|
||||
target_include_directories(server BEFORE PRIVATE ${VENDOR_INCLUDE_DIRECTORIES})
|
||||
find_library(LIBMICROHTTPD NAMES libmicrohttpd.a PATHS ${VENDOR_LINK_DIRECTORIES} NO_DEFAULT_PATH NO_CACHE)
|
||||
else()
|
||||
if (APPLE)
|
||||
|
@ -4,9 +4,9 @@ set (stockencoders_SOURCES
|
||||
FfmpegEncoder.cpp)
|
||||
|
||||
add_library(stockencoders SHARED ${stockencoders_SOURCES})
|
||||
target_include_directories(stockencoders BEFORE PRIVATE ${VENDOR_INCLUDE_DIRECTORIES})
|
||||
|
||||
if (${BUILD_STANDALONE} MATCHES "true")
|
||||
target_include_directories(stockencoders BEFORE PRIVATE ${VENDOR_INCLUDE_DIRECTORIES})
|
||||
find_library(AVCODEC NAMES avcodec-musikcube PATHS ${VENDOR_LINK_DIRECTORIES} NO_DEFAULT_PATH)
|
||||
find_library(AVUTIL NAMES avutil-musikcube PATHS ${VENDOR_LINK_DIRECTORIES} NO_DEFAULT_PATH)
|
||||
find_library(AVFORMAT NAMES avformat-musikcube PATHS ${VENDOR_LINK_DIRECTORIES} NO_DEFAULT_PATH)
|
||||
|
Loading…
Reference in New Issue
Block a user