More cleanups.

This commit is contained in:
casey langen 2022-02-08 13:31:58 -08:00
parent 86b0200b27
commit f113c3ce61
6 changed files with 22 additions and 46 deletions

View 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()

View File

@ -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")

View File

@ -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
#

View File

@ -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)

View File

@ -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)

View File

@ -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)