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 .
|
2019-10-28 22:07:40 -07:00
|
|
|
#cmake -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=i386|amd64|armhf -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=eoan -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
|
2017-02-23 23:45:25 -08:00
|
|
|
#cmake -DCMAKE_BUILD_TYPE=Release -DLINK_STATICALLY=true .
|
|
|
|
|
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)
|
2020-12-20 13:22:44 -08:00
|
|
|
set (musikcube_VERSION_MINOR 96)
|
2022-02-06 18:22:58 -08:00
|
|
|
set (musikcube_VERSION_PATCH 11)
|
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)
|
2017-05-29 16:37:19 -07:00
|
|
|
include(CMakeToolsHelpers OPTIONAL)
|
2021-04-10 20:59:05 -07:00
|
|
|
include(CheckDependencies)
|
2019-10-28 04:45:17 +00:00
|
|
|
include(CheckAtomic)
|
2022-02-07 17:22:51 -08:00
|
|
|
include(ConfigureCurses)
|
|
|
|
include(ConfigureRpath)
|
|
|
|
include(ConfigureTaglib)
|
|
|
|
include(ConfigureBsdPaths)
|
|
|
|
include(ConfigureCompilerFlags)
|
|
|
|
include(ConfigureStaticLinking)
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2021-04-10 20:59:05 -07:00
|
|
|
# our include directories
|
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")
|
|
|
|
|
|
|
|
# our library directories
|
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-07 19:53:26 -08:00
|
|
|
find_package(Boost 1.55.0 REQUIRED 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
|
|
|
|
2021-04-10 20:59:05 -07:00
|
|
|
ensure_library_exists(curl)
|
|
|
|
ensure_library_exists(pthread)
|
|
|
|
ensure_library_exists(ssl)
|
|
|
|
ensure_library_exists(crypto)
|
|
|
|
ensure_library_exists(z)
|
2022-02-07 19:53:26 -08:00
|
|
|
find_library(LIBCURL NAMES libcurl.a)
|
|
|
|
find_library(LIBPTHREAD NAMES libpthread.a)
|
|
|
|
find_library(LIBSSL NAMES libssl.a)
|
|
|
|
find_library(LIBCRYPTO NAMES libcrypto.a)
|
|
|
|
find_library(LIBZ NAMES libz.a)
|
|
|
|
|
|
|
|
set(COMMON_LINK_LIBS ${Boost_LIBRARIES} ${LIBCURL} ${LIBPTHREAD} ${LIBSSL} ${LIBCRYPTO} ${LIBZ})
|
2019-10-19 20:58:26 -07:00
|
|
|
|
2022-02-07 17:22:51 -08:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
|
|
find_library(LIBDL NAMES dl)
|
|
|
|
set (musikcube_LINK_LIBS ${COMMON_LINK_LIBS} ${LIBDL})
|
2017-12-20 22:29:29 +00:00
|
|
|
endif()
|
2009-07-18 11:50:49 +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-07 17:36:43 -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-07 19:53:26 -08:00
|
|
|
#add_subdirectory(src/core_c_demo)
|
2020-06-30 22:42:56 -07:00
|
|
|
add_subdirectory(src/musikcube)
|
|
|
|
add_subdirectory(src/musikcubed)
|
|
|
|
add_subdirectory(src/plugins/taglib_plugin)
|
|
|
|
add_subdirectory(src/plugins/nullout)
|
|
|
|
add_subdirectory(src/plugins/server)
|
|
|
|
add_subdirectory(src/plugins/httpdatastream)
|
|
|
|
add_subdirectory(src/plugins/stockencoders)
|
|
|
|
add_subdirectory(src/plugins/supereqdsp)
|
|
|
|
add_subdirectory(src/plugins/gmedecoder)
|
2022-02-07 17:22:51 -08:00
|
|
|
add_subdirectory(src/plugins/ffmpegdecoder)
|
2020-06-30 22:42:56 -07:00
|
|
|
|
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-02-07 17:22:51 -08:00
|
|
|
include(AddOsSpecificPlugins)
|
|
|
|
include(InstallFiles)
|
|
|
|
include(GenerateDeb)
|
|
|
|
include(PostBuild)
|