diff --git a/CMakeLists.txt b/CMakeLists.txt index de7dbc654..e2a1ea15c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,6 +109,23 @@ add_subdirectory(src/plugins/stockencoders) add_subdirectory(src/plugins/supereqdsp) add_subdirectory(src/plugins/gmedecoder) +# ideally this section would exist in the taglib plugin itself, but that doesn't seem to +# work properly in older versions of CMake (specifically, the one that ships on Ubuntu +# 18.04) +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) + + 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.") diff --git a/src/plugins/taglib_plugin/CMakeLists.txt b/src/plugins/taglib_plugin/CMakeLists.txt index 032268896..87dd1913b 100644 --- a/src/plugins/taglib_plugin/CMakeLists.txt +++ b/src/plugins/taglib_plugin/CMakeLists.txt @@ -16,20 +16,7 @@ add_library(taglibreader SHARED ${taglibreader_SOURCES}) message(STATUS "[taglibmetadatareader] using bundled taglib = ${USE_BUNDLED_TAGLIB}") if (${USE_BUNDLED_TAGLIB} MATCHES "true") - 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") - endif() - add_dependencies(taglibreader taglib) + include_directories("${musikcube_SOURCE_DIR}/src/plugins/taglib_plugin/taglib-1.11/stage/include") target_link_libraries(taglibreader ${BOOST_LINK_LIBS} "${musikcube_SOURCE_DIR}/src/plugins/taglib_plugin/taglib-1.11/stage/lib/libtag.a" z) message(STATUS "[taglibmetadatareader] using ${musikcube_SOURCE_DIR}/src/plugins/taglib_plugin/taglib-1.11/stage/lib/libtag.a") else()