2019-03-15 06:59:16 +00:00
|
|
|
#cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .
|
|
|
|
#cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr .
|
2022-02-15 16:16:37 -08:00
|
|
|
#cmake -DGENERATE_DEB=true -DDEB_ARCHITECTURE=i386|amd64|armhf -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=eoan -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
|
2022-04-23 15:15:02 -07:00
|
|
|
#cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_STANDALONE=true .
|
2017-02-23 23:45:25 -08:00
|
|
|
|
2016-05-25 22:02:09 -07:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2009-05-06 09:12:12 +00:00
|
|
|
|
2017-07-19 17:36:50 -07:00
|
|
|
project(musikcube)
|
|
|
|
set (musikcube_VERSION_MAJOR 0)
|
2022-07-03 12:47:20 -07:00
|
|
|
set (musikcube_VERSION_MINOR 98)
|
2022-11-27 12:23:14 -08:00
|
|
|
set (musikcube_VERSION_PATCH 2)
|
2017-07-19 17:36:50 -07:00
|
|
|
set (musikcube_VERSION "${musikcube_VERSION_MAJOR}.${musikcube_VERSION_MINOR}.${musikcube_VERSION_PATCH}")
|
2022-02-07 17:22:51 -08:00
|
|
|
set (LIBRARY_OUTPUT_PATH ${musikcube_SOURCE_DIR}/bin/plugins)
|
|
|
|
set (EXECUTABLE_OUTPUT_PATH ${musikcube_SOURCE_DIR}/bin)
|
2016-05-25 22:02:09 -07:00
|
|
|
|
2019-10-28 04:45:17 +00:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/.cmake)
|
2022-03-13 16:52:18 -07:00
|
|
|
include(Colors)
|
2017-05-29 16:37:19 -07:00
|
|
|
include(CMakeToolsHelpers OPTIONAL)
|
2019-10-28 04:45:17 +00:00
|
|
|
include(CheckAtomic)
|
2022-02-10 18:34:07 -08:00
|
|
|
include(AddPlugin)
|
2022-02-07 17:22:51 -08:00
|
|
|
include(ConfigureRpath)
|
2022-02-08 13:02:18 -08:00
|
|
|
include(ConfigureStandalone)
|
2022-02-07 17:22:51 -08:00
|
|
|
include(ConfigureBsdPaths)
|
2022-02-08 01:22:00 -08:00
|
|
|
include(AddDarwinSystemLibs)
|
2022-02-08 13:31:58 -08:00
|
|
|
include(AddLinuxSystemLibs)
|
2022-02-08 00:20:55 -08:00
|
|
|
include(ConfigureCurses)
|
|
|
|
include(ConfigureTaglib)
|
2022-02-07 17:22:51 -08:00
|
|
|
include(ConfigureCompilerFlags)
|
2022-02-13 11:26:17 -08:00
|
|
|
include(FindVendorLibrary)
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2022-03-24 15:09:53 -07:00
|
|
|
find_program(CCACHE_FOUND ccache)
|
|
|
|
if (CCACHE_FOUND)
|
|
|
|
message(STATUS "${BoldGreen}[ccache] ccache enabled!${ColorReset}")
|
|
|
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
|
|
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
|
|
|
endif(CCACHE_FOUND)
|
|
|
|
|
2022-02-17 01:45:22 -08:00
|
|
|
if (CROSS_COMPILE_SYSROOT)
|
|
|
|
message(STATUS "[cross-compile] enabled, rooted at: ${CROSS_COMPILE_SYSROOT}")
|
2022-02-17 10:45:15 -08:00
|
|
|
set(CMAKE_FIND_ROOT_PATH ${CROSS_COMPILE_SYSROOT} ${musikcube_SOURCE_DIR}/vendor)
|
|
|
|
set(ENV{PKG_CONFIG_PATH} ${CROSS_COMPILE_PKG_CONFIG_PATH})
|
2022-02-17 01:45:22 -08:00
|
|
|
else()
|
|
|
|
message(STATUS "[cross-compile] not enabled!")
|
|
|
|
endif()
|
|
|
|
|
2022-02-08 00:20:55 -08:00
|
|
|
message(STATUS "[vendor-link-directories] ${VENDOR_LINK_DIRECTORIES}")
|
2022-02-08 13:02:18 -08:00
|
|
|
message(STATUS "[vendor-include-directories] ${VENDOR_INCLUDE_DIRECTORIES}")
|
2022-02-08 13:31:58 -08:00
|
|
|
message(STATUS "[os-system-libs] ${DEFAULT_OS_SYSTEM_LIBS}")
|
2022-02-08 00:20:55 -08:00
|
|
|
|
2022-02-07 17:22:51 -08:00
|
|
|
include_directories(
|
2021-04-10 20:59:05 -07:00
|
|
|
"${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")
|
|
|
|
|
2022-02-07 17:22:51 -08:00
|
|
|
link_directories("${musikcube_SOURCE_DIR}/bin/plugins")
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2022-02-08 00:20:55 -08:00
|
|
|
find_package(Boost 1.55.0 REQUIRED system filesystem thread)
|
2022-02-07 17:22:51 -08:00
|
|
|
include_directories(${Boost_INCLUDE_DIRS})
|
|
|
|
message(STATUS "[boost] libs: " ${Boost_LIBRARIES})
|
|
|
|
message(STATUS "[boost] includes: " ${Boost_INCLUDE_DIRS})
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2022-02-08 13:31:58 -08:00
|
|
|
if (${BUILD_STANDALONE} MATCHES "true")
|
2022-02-13 11:26:17 -08:00
|
|
|
find_vendor_library(LIBCURL curl)
|
|
|
|
find_vendor_library(LIBSSL ssl)
|
|
|
|
find_vendor_library(LIBCRYPTO crypto)
|
2022-02-08 13:31:58 -08:00
|
|
|
else()
|
2022-02-18 19:20:47 -08: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 13:31:58 -08:00
|
|
|
endif()
|
|
|
|
|
2022-02-08 13:02:18 -08:00
|
|
|
find_library(LIBZ NAMES z)
|
2022-02-07 19:53:26 -08:00
|
|
|
|
2022-02-08 00:20:55 -08:00
|
|
|
set(musikcube_LINK_LIBS ${DEFAULT_OS_SYSTEM_LIBS} ${Boost_LIBRARIES} ${LIBCURL} ${LIBSSL} ${LIBCRYPTO} ${LIBZ})
|
2019-10-19 20:58:26 -07: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 00:20:55 -08:00
|
|
|
message(STATUS "[build] musikcube_LINK_LIBS: " ${musikcube_LINK_LIBS})
|
2019-10-28 04:45:17 +00:00
|
|
|
|
2020-10-12 19:23:17 -07:00
|
|
|
add_subdirectory(src/musikcore)
|
2022-02-08 01:22:00 -08:00
|
|
|
add_subdirectory(src/core_c_demo)
|
2020-06-30 22:42:56 -07:00
|
|
|
add_subdirectory(src/musikcube)
|
|
|
|
add_subdirectory(src/musikcubed)
|
|
|
|
|
2022-02-07 17:22:51 -08:00
|
|
|
add_dependencies(musikcube musikcore)
|
|
|
|
add_dependencies(musikcubed musikcore)
|
2021-12-28 20:14:08 -08:00
|
|
|
|
2022-03-13 16:52:18 -07:00
|
|
|
# tag readers
|
2022-02-10 19:43:48 -08:00
|
|
|
add_plugin("src/plugins/taglib_plugin" "taglibreader")
|
2022-03-13 16:52:18 -07:00
|
|
|
# outputs
|
2022-02-10 19:43:48 -08:00
|
|
|
add_plugin("src/plugins/nullout" "nullout")
|
2022-03-13 16:52:18 -07:00
|
|
|
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-10 19:43:48 -08:00
|
|
|
add_plugin("src/plugins/server" "server")
|
2022-03-13 16:52:18 -07:00
|
|
|
add_plugin("src/plugins/mpris" "mpris")
|
|
|
|
add_plugin("src/plugins/macosmediakeys" "macosmediakeys")
|
|
|
|
# streams
|
2022-02-10 19:43:48 -08:00
|
|
|
add_plugin("src/plugins/httpdatastream" "httpdatastream")
|
2022-03-13 16:52:18 -07:00
|
|
|
# decoders
|
|
|
|
add_plugin("src/plugins/ffmpegdecoder" "ffmpegdecoder")
|
|
|
|
add_plugin("src/plugins/libopenmptdecoder" "openmptdecoder")
|
|
|
|
add_plugin("src/plugins/gmedecoder" "gmedecoder")
|
|
|
|
# encoders
|
2022-02-10 19:43:48 -08:00
|
|
|
add_plugin("src/plugins/stockencoders" "stockencoders")
|
2022-03-13 16:52:18 -07:00
|
|
|
# dsps
|
2022-02-10 19:43:48 -08:00
|
|
|
add_plugin("src/plugins/supereqdsp" "supereqdsp")
|
2022-02-10 18:34:07 -08:00
|
|
|
|
2022-02-07 17:22:51 -08:00
|
|
|
include(InstallFiles)
|
2022-02-15 19:15:30 -08:00
|
|
|
include(GeneratePackage)
|
2022-02-07 17:22:51 -08:00
|
|
|
include(PostBuild)
|