musikcube/CMakeLists.txt

116 lines
4.1 KiB
CMake
Raw Permalink Normal View History

#cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .
#cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr .
#cmake -DGENERATE_DEB=true -DDEB_ARCHITECTURE=i386|amd64|armhf -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=eoan -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
#cmake -DCMAKE_BUILD_TYPE=Release - -DBUILD_STANDALONE=true .
cmake_minimum_required(VERSION 3.0)
project(musikcube)
set (musikcube_VERSION_MAJOR 0)
2022-02-19 03:12:54 +00:00
set (musikcube_VERSION_MINOR 97)
2022-03-12 21:33:25 +00:00
set (musikcube_VERSION_PATCH 1)
set (musikcube_VERSION "${musikcube_VERSION_MAJOR}.${musikcube_VERSION_MINOR}.${musikcube_VERSION_PATCH}")
set (LIBRARY_OUTPUT_PATH ${musikcube_SOURCE_DIR}/bin/plugins)
set (EXECUTABLE_OUTPUT_PATH ${musikcube_SOURCE_DIR}/bin)
2019-10-28 04:45:17 +00:00
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/.cmake)
include(Colors)
include(CMakeToolsHelpers OPTIONAL)
2019-10-28 04:45:17 +00:00
include(CheckAtomic)
include(AddPlugin)
include(ConfigureRpath)
include(ConfigureStandalone)
include(ConfigureBsdPaths)
2022-02-08 09:22:00 +00:00
include(AddDarwinSystemLibs)
2022-02-08 21:31:58 +00:00
include(AddLinuxSystemLibs)
2022-02-08 08:20:55 +00:00
include(ConfigureCurses)
include(ConfigureTaglib)
include(ConfigureCompilerFlags)
include(FindVendorLibrary)
if (CROSS_COMPILE_SYSROOT)
message(STATUS "[cross-compile] enabled, rooted at: ${CROSS_COMPILE_SYSROOT}")
2022-02-17 18:45:15 +00:00
set(CMAKE_FIND_ROOT_PATH ${CROSS_COMPILE_SYSROOT} ${musikcube_SOURCE_DIR}/vendor)
set(ENV{PKG_CONFIG_PATH} ${CROSS_COMPILE_PKG_CONFIG_PATH})
else()
message(STATUS "[cross-compile] not enabled!")
endif()
2022-02-08 08:20:55 +00:00
message(STATUS "[vendor-link-directories] ${VENDOR_LINK_DIRECTORIES}")
message(STATUS "[vendor-include-directories] ${VENDOR_INCLUDE_DIRECTORIES}")
2022-02-08 21:31:58 +00:00
message(STATUS "[os-system-libs] ${DEFAULT_OS_SYSTEM_LIBS}")
2022-02-08 08:20:55 +00:00
include_directories(
"${musikcube_SOURCE_DIR}/src"
"${musikcube_SOURCE_DIR}/src/musikcore"
"${musikcube_SOURCE_DIR}/src/musikcube"
"${musikcube_SOURCE_DIR}/src/musikcube/cursespp"
"${musikcube_SOURCE_DIR}/src/3rdparty/include")
link_directories("${musikcube_SOURCE_DIR}/bin/plugins")
2022-02-08 08:20:55 +00:00
find_package(Boost 1.55.0 REQUIRED system filesystem thread)
include_directories(${Boost_INCLUDE_DIRS})
message(STATUS "[boost] libs: " ${Boost_LIBRARIES})
message(STATUS "[boost] includes: " ${Boost_INCLUDE_DIRS})
2022-02-08 21:31:58 +00:00
if (${BUILD_STANDALONE} MATCHES "true")
find_vendor_library(LIBCURL curl)
find_vendor_library(LIBSSL ssl)
find_vendor_library(LIBCRYPTO crypto)
2022-02-08 21:31:58 +00:00
else()
2022-02-19 03:20:47 +00:00
# need VENDOR_LINK_DIRECTORIES here for Darwin.
find_library(LIBCURL NAMES curl PATHS ${VENDOR_LINK_DIRECTORIES})
find_library(LIBSSL NAMES ssl PATHS ${VENDOR_LINK_DIRECTORIES})
find_library(LIBCRYPTO NAMES crypto PATHS ${VENDOR_LINK_DIRECTORIES})
2022-02-08 21:31:58 +00:00
endif()
find_library(LIBZ NAMES z)
2022-02-08 08:20:55 +00:00
set(musikcube_LINK_LIBS ${DEFAULT_OS_SYSTEM_LIBS} ${Boost_LIBRARIES} ${LIBCURL} ${LIBSSL} ${LIBCRYPTO} ${LIBZ})
2019-10-20 03:58:26 +00:00
2019-10-28 04:45:17 +00:00
if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
message(STATUS "[build] libatomic required, adding to library list")
set (musikcube_LINK_LIBS ${musikcube_LINK_LIBS} atomic)
endif()
endif()
2022-02-08 08:20:55 +00:00
message(STATUS "[build] musikcube_LINK_LIBS: " ${musikcube_LINK_LIBS})
2019-10-28 04:45:17 +00:00
add_subdirectory(src/musikcore)
2022-02-08 09:22:00 +00:00
add_subdirectory(src/core_c_demo)
add_subdirectory(src/musikcube)
add_subdirectory(src/musikcubed)
add_dependencies(musikcube musikcore)
add_dependencies(musikcubed musikcore)
# tag readers
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/taglib_plugin" "taglibreader")
# outputs
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/nullout" "nullout")
add_plugin("src/plugins/alsaout" "alsaout")
add_plugin("src/plugins/pulseout" "pulseout")
add_plugin("src/plugins/pipewireout" "pipewireout")
add_plugin("src/plugins/sndioout" "sndioout")
add_plugin("src/plugins/coreaudioout" "coreaudioout")
# remotes
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/server" "server")
add_plugin("src/plugins/mpris" "mpris")
add_plugin("src/plugins/macosmediakeys" "macosmediakeys")
# streams
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/httpdatastream" "httpdatastream")
# decoders
add_plugin("src/plugins/ffmpegdecoder" "ffmpegdecoder")
add_plugin("src/plugins/libopenmptdecoder" "openmptdecoder")
add_plugin("src/plugins/gmedecoder" "gmedecoder")
# encoders
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/stockencoders" "stockencoders")
# dsps
2022-02-11 03:43:48 +00:00
add_plugin("src/plugins/supereqdsp" "supereqdsp")
include(InstallFiles)
2022-02-16 03:15:30 +00:00
include(GeneratePackage)
include(PostBuild)