diff --git a/CMakeLists.txt b/CMakeLists.txt index 7566f5e49..5b3dbb97d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,39 +92,6 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD add_definitions (-DNO_NCURSESW) endif() -add_subdirectory(src/core) -add_subdirectory(src/core_c_demo) -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) - -find_library(LIBOPENMPT NAMES openmpt) -if ("${LIBOPENMPT}" STREQUAL "LIBOPENMPT-NOTFOUND") - message(STATUS "[libopenmpt] *not* found! plugin will not be built.") -else() - message(STATUS "[libopenmpt] enabled = true; found library at ${LIBOPENMPT}") - add_subdirectory(src/plugins/libopenmptdecoder) -endif() - -if (${FFMPEG_ENABLED} MATCHES "false") - message(STATUS "[ffmpeg] enabled = false") - add_subdirectory(src/plugins/m4adecoder) - add_subdirectory(src/plugins/oggdecoder) - add_subdirectory(src/plugins/nomaddecoder) - add_subdirectory(src/plugins/flacdecoder) - add_dependencies(musikcube m4adecoder oggdecoder nomaddecoder flacdecoder) -else() - message(STATUS "[ffmpeg] enabled = true") - add_subdirectory(src/plugins/ffmpegdecoder) - add_dependencies(musikcube ffmpegdecoder) -endif() - # we use a bundled version of taglib because the latest release is from 2016, # and the upstream git repo is hundreds of commits ahead and has a number of # important bugfixes. @@ -165,12 +132,47 @@ if (${USE_BUNDLED_TAGLIB} MATCHES "true") 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 +add_subdirectory(src/core) +add_subdirectory(src/core_c_demo) +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) + +if (${USE_BUNDLED_TAGLIB} MATCHES "true") + add_dependencies(taglibreader taglib) +endif() + +find_library(LIBOPENMPT NAMES openmpt) +if ("${LIBOPENMPT}" STREQUAL "LIBOPENMPT-NOTFOUND") + message(STATUS "[libopenmpt] *not* found! plugin will not be built.") +else() + message(STATUS "[libopenmpt] enabled = true; found library at ${LIBOPENMPT}") + add_subdirectory(src/plugins/libopenmptdecoder) +endif() + +if (${FFMPEG_ENABLED} MATCHES "false") + message(STATUS "[ffmpeg] enabled = false") + add_subdirectory(src/plugins/m4adecoder) + add_subdirectory(src/plugins/oggdecoder) + add_subdirectory(src/plugins/nomaddecoder) + add_subdirectory(src/plugins/flacdecoder) + add_dependencies(musikcube m4adecoder oggdecoder nomaddecoder flacdecoder) +else() + message(STATUS "[ffmpeg] enabled = true") + add_subdirectory(src/plugins/ffmpegdecoder) + add_dependencies(musikcube ffmpegdecoder) +endif() + # systemd / MPRIS detection if (NOT ENABLE_MPRIS MATCHES "false") diff --git a/src/plugins/taglib_plugin/CMakeLists.txt b/src/plugins/taglib_plugin/CMakeLists.txt index 4a6a404d6..42771d252 100644 --- a/src/plugins/taglib_plugin/CMakeLists.txt +++ b/src/plugins/taglib_plugin/CMakeLists.txt @@ -14,7 +14,8 @@ endif() add_library(taglibreader SHARED ${taglibreader_SOURCES}) if (${USE_BUNDLED_TAGLIB} MATCHES "true") - target_link_libraries(taglibreader ${BOOST_LINK_LIBS} tag.a z) + message(STATUS "[taglibmetadatareader] using ${musikcube_SOURCE_DIR}/src/plugins/taglib_plugin/taglib-1.11/stage/lib/libtag.a") + target_link_libraries(taglibreader ${BOOST_LINK_LIBS} "${musikcube_SOURCE_DIR}/src/plugins/taglib_plugin/taglib-1.11/stage/lib/libtag.a" z) else() target_link_libraries(taglibreader ${BOOST_LINK_LIBS} tag z) endif() diff --git a/src/plugins/taglib_plugin/taglib-1.11/taglib/CMakeLists.txt b/src/plugins/taglib_plugin/taglib-1.11/taglib/CMakeLists.txt index fcff0b340..c8164ccbd 100755 --- a/src/plugins/taglib_plugin/taglib-1.11/taglib/CMakeLists.txt +++ b/src/plugins/taglib_plugin/taglib-1.11/taglib/CMakeLists.txt @@ -336,6 +336,7 @@ set(tag_LIB_SRCS tagutils.cpp ) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) add_library(tag ${tag_LIB_SRCS} ${tag_HDRS}) if(HAVE_ZLIB AND NOT HAVE_ZLIB_SOURCE) @@ -356,7 +357,7 @@ endif() if(BUILD_FRAMEWORK) unset(INSTALL_NAME_DIR) - set_target_properties(tag PROPERTIES + set_target_properties(tag PROPERTIES FRAMEWORK TRUE MACOSX_RPATH 1 VERSION "A"