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 .
|
2017-08-25 00:32:15 +00:00
|
|
|
#cmake -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=i386|amd64|armhf -DDEB_DISTRO=stretch -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
|
2017-02-24 07:45:25 +00:00
|
|
|
#cmake -DCMAKE_BUILD_TYPE=Release -DLINK_STATICALLY=true .
|
|
|
|
|
2016-05-26 05:02:09 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2009-05-06 09:12:12 +00:00
|
|
|
|
2017-07-20 00:36:50 +00:00
|
|
|
project(musikcube)
|
|
|
|
set (musikcube_VERSION_MAJOR 0)
|
2019-04-30 06:14:38 +00:00
|
|
|
set (musikcube_VERSION_MINOR 65)
|
|
|
|
set (musikcube_VERSION_PATCH 0)
|
2017-07-20 00:36:50 +00:00
|
|
|
set (musikcube_VERSION "${musikcube_VERSION_MAJOR}.${musikcube_VERSION_MINOR}.${musikcube_VERSION_PATCH}")
|
2016-05-26 05:02:09 +00:00
|
|
|
|
2017-05-29 23:37:19 +00:00
|
|
|
include(CMakeToolsHelpers OPTIONAL)
|
|
|
|
|
2017-07-27 14:01:25 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wno-unused-result -Wno-deprecated-declarations")
|
2017-08-07 22:58:16 +00:00
|
|
|
|
2019-01-05 06:20:51 +00:00
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -frtti -fexceptions")
|
2017-08-07 22:58:16 +00:00
|
|
|
# enable for additional memory checking with fsanitize
|
|
|
|
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -fsanitize=address,undefined")
|
2019-01-06 22:46:24 +00:00
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -frtti -fexceptions")
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2017-02-24 07:45:25 +00:00
|
|
|
if (${LINK_STATICALLY} MATCHES "true")
|
|
|
|
set(Boost_USE_STATIC_LIBS ON)
|
|
|
|
endif()
|
|
|
|
|
2017-12-20 22:29:29 +00:00
|
|
|
set (BOOST_LIBS system filesystem thread)
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2016-07-14 05:36:08 +00:00
|
|
|
find_package(Boost 1.55.0 REQUIRED ${BOOST_LIBS})
|
2016-05-26 05:02:09 +00:00
|
|
|
|
2017-03-15 02:30:13 +00:00
|
|
|
add_definitions (-DHAVE_BOOST -D_FILE_OFFSET_BITS=64 -DSIGSLOT_USE_POSIX_THREADS)
|
|
|
|
set (BOOST_LINK_LIBS ${Boost_LIBRARIES})
|
2011-02-17 00:22:30 +00:00
|
|
|
|
2016-05-27 07:22:26 +00:00
|
|
|
#message(STATUS "boost libs: " ${BOOST_LINK_LIBS})
|
|
|
|
#message(STATUS "boost includes: " ${Boost_INCLUDE_DIRS})
|
2016-05-26 05:02:09 +00:00
|
|
|
|
2017-12-20 22:29:29 +00:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Modules)
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2016-06-26 23:40:14 +00:00
|
|
|
# SET (CMAKE_BUILD_TYPE DEBUG)
|
2017-07-20 00:36:50 +00:00
|
|
|
set (LIBRARY_OUTPUT_PATH ${musikcube_SOURCE_DIR}/bin/plugins)
|
|
|
|
set (EXECUTABLE_OUTPUT_PATH ${musikcube_SOURCE_DIR}/bin)
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2018-12-24 23:41:16 +00:00
|
|
|
link_directories ("${musikcube_SOURCE_DIR}/bin/plugins")
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2017-12-20 22:29:29 +00:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
2018-05-03 05:07:41 +00:00
|
|
|
set (musikcube_LINK_LIBS ${BOOST_LINK_LIBS} curl pthread crypto)
|
2017-12-20 22:29:29 +00:00
|
|
|
else()
|
2018-05-03 05:07:41 +00:00
|
|
|
set (musikcube_LINK_LIBS ${BOOST_LINK_LIBS} dl curl pthread crypto)
|
2017-12-20 22:29:29 +00:00
|
|
|
endif()
|
2009-07-18 11:50:49 +00:00
|
|
|
|
2011-02-10 13:11:38 +00:00
|
|
|
include_directories (
|
2017-07-20 00:36:50 +00:00
|
|
|
"${musikcube_SOURCE_DIR}/src"
|
|
|
|
"${musikcube_SOURCE_DIR}/src/core"
|
|
|
|
"${musikcube_SOURCE_DIR}/src/musikcube"
|
2018-12-21 02:51:50 +00:00
|
|
|
"${musikcube_SOURCE_DIR}/src/musikcube/cursespp"
|
2018-12-24 23:41:16 +00:00
|
|
|
"${musikcube_SOURCE_DIR}/src/3rdparty/include")
|
2009-05-06 09:12:12 +00:00
|
|
|
|
2018-02-02 03:12:28 +00:00
|
|
|
# ensure the binaries can find libmusikcore.so, which lives in the
|
|
|
|
# same directory.
|
|
|
|
if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
|
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
|
|
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
|
|
|
endif()
|
|
|
|
|
2016-09-21 00:47:48 +00:00
|
|
|
# "/usr/local" doesn't seem to be included by default on macOS 10.12+
|
2017-12-11 00:42:26 +00:00
|
|
|
# "/opt/local" is the default installation location for MacPorts
|
2017-12-20 22:29:29 +00:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin" OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
2016-11-08 23:15:36 +00:00
|
|
|
link_directories ("/usr/local/lib")
|
2018-12-15 03:15:03 +00:00
|
|
|
link_directories ("/usr/local/opt/openssl/lib")
|
2016-11-08 23:15:36 +00:00
|
|
|
include_directories("/usr/local/include")
|
2018-05-04 04:27:37 +00:00
|
|
|
include_directories("/usr/local/opt/openssl/include")
|
2017-02-24 07:45:25 +00:00
|
|
|
endif ()
|
2016-09-21 00:47:48 +00:00
|
|
|
|
2017-07-30 00:08:59 +00:00
|
|
|
if (EXISTS "/etc/arch-release" OR EXISTS "/etc/manjaro-release" OR NO_NCURSESW)
|
2017-07-27 00:04:16 +00:00
|
|
|
add_definitions (-DNO_NCURSESW)
|
2017-12-20 22:29:29 +00:00
|
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
|
|
add_definitions (-DNO_NCURSESW)
|
2017-07-27 00:04:16 +00:00
|
|
|
endif()
|
|
|
|
|
2009-05-06 09:12:12 +00:00
|
|
|
add_subdirectory(src/core)
|
2017-07-20 00:36:50 +00:00
|
|
|
add_subdirectory(src/musikcube)
|
2018-01-28 07:18:56 +00:00
|
|
|
add_subdirectory(src/musikcubed)
|
2017-05-23 00:10:35 +00:00
|
|
|
add_subdirectory(src/plugins/taglib_plugin)
|
|
|
|
add_subdirectory(src/plugins/nullout)
|
2017-11-24 04:44:23 +00:00
|
|
|
add_subdirectory(src/plugins/server)
|
2017-05-23 00:10:35 +00:00
|
|
|
add_subdirectory(src/plugins/httpdatastream)
|
2017-11-24 04:44:23 +00:00
|
|
|
add_subdirectory(src/plugins/stockencoders)
|
2018-12-18 07:13:10 +00:00
|
|
|
add_subdirectory(src/plugins/supereqdsp)
|
2019-01-03 05:47:44 +00:00
|
|
|
add_subdirectory(src/plugins/gmedecoder)
|
2016-06-05 20:06:32 +00:00
|
|
|
|
2018-12-27 02:10:36 +00:00
|
|
|
if (${FFMPEG_DECODER} MATCHES "false")
|
2018-12-27 06:17:16 +00:00
|
|
|
message(STATUS "[ffmpeg] decoder enabled = false")
|
2017-12-15 04:59:36 +00:00
|
|
|
add_subdirectory(src/plugins/m4adecoder)
|
|
|
|
add_subdirectory(src/plugins/oggdecoder)
|
|
|
|
add_subdirectory(src/plugins/nomaddecoder)
|
|
|
|
add_subdirectory(src/plugins/flacdecoder)
|
2018-01-15 22:52:17 +00:00
|
|
|
add_dependencies(musikcube m4adecoder oggdecoder nomaddecoder flacdecoder)
|
2018-12-27 02:10:36 +00:00
|
|
|
else()
|
2018-12-27 06:17:16 +00:00
|
|
|
message(STATUS "[ffmpeg] decoder enabled = true")
|
2018-12-27 02:10:36 +00:00
|
|
|
add_subdirectory(src/plugins/ffmpegdecoder)
|
|
|
|
add_dependencies(musikcube ffmpegdecoder)
|
2017-12-15 04:59:36 +00:00
|
|
|
endif()
|
|
|
|
|
2018-12-24 23:41:16 +00:00
|
|
|
# some versions of Ubuntu ship with a taglib binary that is missing some
|
|
|
|
# symbols we depend on. for these distros, we compile taglib ourselves
|
|
|
|
# and link against it statically.
|
|
|
|
|
2018-12-25 02:17:51 +00:00
|
|
|
set(USE_BUNDLED_TAGLIB "false")
|
2018-12-24 23:41:16 +00:00
|
|
|
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
|
set(USE_BUNDLED_TAGLIB "false")
|
|
|
|
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
|
|
find_program(LSB_RELEASE lsb_release)
|
|
|
|
|
|
|
|
if(NOT ${LSB_RELEASE} MATCHES "LSB_RELEASE-NOTFOUND")
|
|
|
|
execute_process(
|
|
|
|
COMMAND ${LSB_RELEASE} -cs
|
|
|
|
OUTPUT_VARIABLE DISTRO
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
)
|
|
|
|
|
|
|
|
message(STATUS "[taglib] detected distro = ${DISTRO}")
|
|
|
|
|
|
|
|
if (DISTRO MATCHES "xenial" OR DISTRO MATCHES "zesty" OR DISTRO MATCHES "artful")
|
|
|
|
set(USE_BUNDLED_TAGLIB "true")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
message(STATUS "[taglib] using bundled taglib = ${USE_BUNDLED_TAGLIB}")
|
|
|
|
|
|
|
|
if (${USE_BUNDLED_TAGLIB} MATCHES "true")
|
|
|
|
include(ExternalProject)
|
|
|
|
|
|
|
|
ExternalProject_Add(taglib
|
|
|
|
SOURCE_DIR "${musikcube_SOURCE_DIR}/src/plugins/taglib_plugin/taglib-1.11"
|
|
|
|
BUILD_IN_SOURCE 0
|
|
|
|
DOWNLOAD_COMMAND ""
|
|
|
|
UPDATE_COMMAND ""
|
|
|
|
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX:PATH=${musikcube_SOURCE_DIR}/src/plugins/taglib_plugin/taglib-1.11/stage/"
|
|
|
|
INSTALL_COMMAND make install)
|
|
|
|
|
|
|
|
include_directories("${musikcube_SOURCE_DIR}/src/plugins/taglib_plugin/taglib-1.11/stage/include")
|
|
|
|
link_directories("${musikcube_SOURCE_DIR}/src/plugins/taglib_plugin/taglib-1.11/stage/lib")
|
|
|
|
add_dependencies(taglibreader taglib)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# end gross taglib detection stuff
|
2016-08-29 08:05:50 +00:00
|
|
|
|
2018-01-16 05:58:47 +00:00
|
|
|
add_dependencies(musikcube musikcore taglibreader nullout server httpdatastream stockencoders)
|
2018-01-28 07:18:56 +00:00
|
|
|
add_dependencies(musikcubed musikcube)
|
2018-01-14 23:46:10 +00:00
|
|
|
|
2017-12-21 09:08:21 +00:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
2017-05-23 00:10:35 +00:00
|
|
|
add_subdirectory(src/plugins/alsaout)
|
2018-01-13 20:09:01 +00:00
|
|
|
add_subdirectory(src/plugins/pulseout)
|
2018-01-14 23:46:10 +00:00
|
|
|
add_dependencies(musikcube alsaout pulseout)
|
2017-12-28 01:13:01 +00:00
|
|
|
if (${ENABLE_SNDIO} MATCHES "true")
|
2018-01-28 23:47:23 +00:00
|
|
|
add_subdirectory(src/plugins/sndioout)
|
2018-01-14 23:46:10 +00:00
|
|
|
add_dependencies(musikcube sndioout)
|
2017-12-28 01:13:01 +00:00
|
|
|
endif()
|
2017-12-21 09:08:21 +00:00
|
|
|
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
|
|
add_subdirectory(src/plugins/sndioout)
|
2018-01-14 23:46:10 +00:00
|
|
|
add_dependencies(musikcube sndioout)
|
2017-12-27 23:46:53 +00:00
|
|
|
if (${ENABLE_PULSEAUDIO} MATCHES "true")
|
|
|
|
add_subdirectory(src/plugins/pulseout) # disabled by default
|
2018-01-14 23:46:10 +00:00
|
|
|
add_dependencies(musikcube pulseout)
|
2017-12-27 23:46:53 +00:00
|
|
|
endif()
|
2019-01-01 20:58:04 +00:00
|
|
|
if (${ENABLE_ALSA} MATCHES "true")
|
|
|
|
add_subdirectory(src/plugins/alsaout) # disabled by default
|
|
|
|
add_dependencies(musikcube alsaout)
|
|
|
|
endif()
|
2017-12-21 09:08:21 +00:00
|
|
|
elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
|
add_subdirectory(src/plugins/coreaudioout)
|
2018-01-14 23:46:10 +00:00
|
|
|
add_dependencies(musikcube coreaudioout)
|
2019-01-13 02:19:09 +00:00
|
|
|
add_subdirectory(src/plugins/macosmediakeys)
|
|
|
|
add_dependencies(musikcube macosmediakeys)
|
2017-12-20 22:29:29 +00:00
|
|
|
endif()
|
2016-08-28 18:46:43 +00:00
|
|
|
|
2017-12-26 23:17:10 +00:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
|
file(GLOB plugins "bin/plugins/*.dylib")
|
|
|
|
install(FILES ${plugins} DESTINATION share/musikcube/plugins)
|
|
|
|
else ()
|
|
|
|
file(GLOB plugins "bin/plugins/*.so")
|
|
|
|
install(FILES ${plugins} DESTINATION share/musikcube/plugins)
|
2017-12-16 20:59:58 +00:00
|
|
|
endif ()
|
2016-08-28 18:46:43 +00:00
|
|
|
|
2016-11-08 20:34:06 +00:00
|
|
|
file(GLOB sdk_headers "src/core/sdk/*.h")
|
2017-12-26 23:17:10 +00:00
|
|
|
install(FILES ${sdk_headers} DESTINATION include/musikcube/core/sdk)
|
2017-03-13 02:03:08 +00:00
|
|
|
|
2017-12-26 23:17:10 +00:00
|
|
|
file(GLOB themes "src/musikcube/data/themes/*.json")
|
2017-12-20 22:29:29 +00:00
|
|
|
file(COPY ${themes} DESTINATION bin/themes)
|
|
|
|
install(FILES ${themes} DESTINATION share/musikcube/themes)
|
2017-03-13 02:03:08 +00:00
|
|
|
|
2017-12-26 23:17:10 +00:00
|
|
|
file(GLOB locales "src/musikcube/data/locales/*.json")
|
2017-12-20 22:29:29 +00:00
|
|
|
file(COPY ${locales} DESTINATION bin/locales)
|
|
|
|
install(FILES ${locales} DESTINATION share/musikcube/locales)
|
2017-03-15 07:03:27 +00:00
|
|
|
|
2018-01-28 23:47:23 +00:00
|
|
|
# libmusikcore sshared library
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
|
install(FILES "bin/libmusikcore.dylib" DESTINATION share/musikcube)
|
|
|
|
else ()
|
|
|
|
install(FILES "bin/libmusikcore.so" DESTINATION share/musikcube)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
# executable and shell script for musikcube
|
|
|
|
install(
|
2018-12-24 19:00:15 +00:00
|
|
|
FILES bin/musikcube
|
|
|
|
DESTINATION share/musikcube
|
2018-01-28 23:47:23 +00:00
|
|
|
PERMISSIONS
|
|
|
|
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
|
|
|
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
|
|
|
WORLD_EXECUTE WORLD_READ)
|
|
|
|
|
2016-11-08 23:15:36 +00:00
|
|
|
install(
|
2018-12-24 19:00:15 +00:00
|
|
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcube/musikcube"
|
2016-11-08 23:15:36 +00:00
|
|
|
DESTINATION bin/
|
|
|
|
PERMISSIONS
|
|
|
|
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
|
|
|
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
2017-12-20 22:29:29 +00:00
|
|
|
WORLD_EXECUTE WORLD_READ)
|
2017-02-19 23:54:25 +00:00
|
|
|
|
2018-01-28 23:47:23 +00:00
|
|
|
# executable and shell script for daemon
|
|
|
|
install(
|
2018-12-24 19:00:15 +00:00
|
|
|
FILES bin/musikcubed
|
|
|
|
DESTINATION share/musikcube
|
2018-01-28 23:47:23 +00:00
|
|
|
PERMISSIONS
|
|
|
|
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
|
|
|
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
|
|
|
WORLD_EXECUTE WORLD_READ)
|
|
|
|
|
|
|
|
install(
|
2018-12-24 19:00:15 +00:00
|
|
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcubed/musikcubed"
|
2018-01-28 23:47:23 +00:00
|
|
|
DESTINATION bin/
|
|
|
|
PERMISSIONS
|
|
|
|
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
|
|
|
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
|
|
|
WORLD_EXECUTE WORLD_READ)
|
|
|
|
|
|
|
|
# deb generation
|
2017-02-19 23:54:25 +00:00
|
|
|
if (GENERATE_DEB MATCHES "1")
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
2017-08-25 00:32:15 +00:00
|
|
|
set(DEB_BOOST_VERSION "1.55.0")
|
|
|
|
set(DEB_MICROHTTPD_VERSION "10")
|
2018-06-01 05:24:17 +00:00
|
|
|
set(DEB_LIBCURL_VERSION "3")
|
2018-12-27 02:10:36 +00:00
|
|
|
set(DEB_AVUTIL_VERSION "55")
|
|
|
|
set(DEB_AVFORMAT_VERSION "57")
|
2018-12-30 03:38:58 +00:00
|
|
|
set(DEB_SWRESAMPLE_VERSION "2")
|
2018-12-27 02:10:36 +00:00
|
|
|
if (DEB_DISTRO MATCHES "stretch")
|
2017-08-25 00:32:15 +00:00
|
|
|
set(DEB_BOOST_VERSION "1.62.0")
|
|
|
|
set(DEB_MICROHTTPD_VERSION "12")
|
|
|
|
elseif (DEB_DISTRO MATCHES "zesty")
|
2017-08-25 00:39:34 +00:00
|
|
|
set(DEB_BOOST_VERSION "1.62.0")
|
2017-08-25 00:32:15 +00:00
|
|
|
set(DEB_MICROHTTPD_VERSION "10")
|
2018-01-12 06:23:44 +00:00
|
|
|
elseif (DEB_DISTRO MATCHES "artful")
|
2017-11-01 20:44:10 +00:00
|
|
|
set(DEB_BOOST_VERSION "1.63.0")
|
|
|
|
set(DEB_MICROHTTPD_VERSION "12")
|
2018-04-27 04:54:48 +00:00
|
|
|
elseif (DEB_DISTRO MATCHES "bionic")
|
2018-06-10 16:01:41 +00:00
|
|
|
set(DEB_BOOST_VERSION "1.65.1")
|
2018-04-27 04:54:48 +00:00
|
|
|
set(DEB_MICROHTTPD_VERSION "12")
|
2018-06-01 05:24:17 +00:00
|
|
|
set(DEB_LIBCURL_VERSION "4")
|
2019-05-01 05:07:18 +00:00
|
|
|
elseif (DEB_DISTRO MATCHES "cosmic" OR DEB_DISTRO MATCHES "disco")
|
2018-12-30 03:38:58 +00:00
|
|
|
set(DEB_BOOST_VERSION "1.67.0")
|
2018-12-27 02:10:36 +00:00
|
|
|
set(DEB_MICROHTTPD_VERSION "12")
|
|
|
|
set(DEB_LIBCURL_VERSION "4")
|
|
|
|
set(DEB_AVUTIL_VERSION "56")
|
|
|
|
set(DEB_AVFORMAT_VERSION "58")
|
2018-12-30 03:38:58 +00:00
|
|
|
set(DEB_SWRESAMPLE_VERSION "3")
|
2017-12-11 22:16:57 +00:00
|
|
|
elseif (DEB_DISTRO MATCHES "xenial")
|
|
|
|
set(DEB_BOOST_VERSION "1.58.0")
|
|
|
|
set(DEB_MICROHTTPD_VERSION "10")
|
2018-12-27 02:10:36 +00:00
|
|
|
set(DEB_AVUTIL_VERSION "-ffmpeg54")
|
|
|
|
set(DEB_AVFORMAT_VERSION "-ffmpeg56")
|
2017-08-25 00:32:15 +00:00
|
|
|
endif()
|
|
|
|
|
2018-12-25 00:01:58 +00:00
|
|
|
set(DEPENDENCIES "libboost-thread${DEB_BOOST_VERSION}, libboost-system${DEB_BOOST_VERSION}, libboost-filesystem${DEB_BOOST_VERSION}, libmicrohttpd${DEB_MICROHTTPD_VERSION}, libcurl${DEB_LIBCURL_VERSION}, libogg0, libvorbis0a, libvorbisfile3, libncursesw5, libasound2, libpulse0, pulseaudio, libmp3lame0, libev4")
|
2018-12-18 07:13:10 +00:00
|
|
|
|
2018-12-27 02:10:36 +00:00
|
|
|
if (${FFMPEG_DECODER} MATCHES "false")
|
2018-12-25 00:01:58 +00:00
|
|
|
set(DEPENDENCIES "${DEPENDENCIES}, libflac8, libfaad2")
|
2018-12-27 02:10:36 +00:00
|
|
|
else()
|
2018-12-30 03:38:58 +00:00
|
|
|
set(DEPENDENCIES "${DEPENDENCIES}, libavcodec-extra, libavutil${DEB_AVUTIL_VERSION}, libavformat${DEB_AVFORMAT_VERSION}, libswresample${DEB_SWRESAMPLE_VERSION}")
|
2018-12-25 00:01:58 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT ${USE_BUNDLED_TAGLIB} MATCHES "true")
|
|
|
|
set(DEPENDENCIES "${DEPENDENCIES}, libtag1v5")
|
2017-12-16 20:59:58 +00:00
|
|
|
endif()
|
2018-12-18 07:13:10 +00:00
|
|
|
|
2017-02-19 23:54:25 +00:00
|
|
|
set(CPACK_GENERATOR "DEB")
|
2017-07-20 00:36:50 +00:00
|
|
|
set(CPACK_PACKAGE_DESCRIPTION "musikcube, a terminal-based music player and library")
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR "${musikcube_VERSION_MAJOR}")
|
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR "${musikcube_VERSION_MINOR}")
|
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH "${musikcube_VERSION_PATCH}")
|
2017-12-16 20:59:58 +00:00
|
|
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DEPENDENCIES})
|
2017-02-19 23:54:25 +00:00
|
|
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "casey langen")
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${DEB_ARCHITECTURE})
|
2017-08-25 00:32:15 +00:00
|
|
|
set(CPACK_PACKAGE_FILE_NAME "musikcube_${musikcube_VERSION}_${DEB_DISTRO}_${DEB_ARCHITECTURE}")
|
2017-02-19 23:54:25 +00:00
|
|
|
include(CPack)
|
|
|
|
endif()
|
2017-02-20 03:58:10 +00:00
|
|
|
endif()
|
2018-01-14 23:46:10 +00:00
|
|
|
|
|
|
|
# run `cmake .` again to pick up build plugin build artifacts that we need
|
|
|
|
# to file glob in. these won't be picked up on the initial build because
|
|
|
|
# they don't yet exist!
|
2018-01-28 07:18:56 +00:00
|
|
|
add_custom_target(postbuild ALL DEPENDS musikcube musikcubed)
|
2018-01-15 22:52:17 +00:00
|
|
|
add_custom_command(TARGET postbuild POST_BUILD COMMAND cmake .)
|