Description: Build with taglib support. Author: Mike Gabriel Forwarded: https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/merge_requests/121 --- a/src/plugin/CMakeLists.txt +++ b/src/plugin/CMakeLists.txt @@ -1,6 +1,3 @@ -# Disable TagLib in folderlistmodel plugin -ADD_DEFINITIONS(-DDO_NOT_USE_TAG_LIB) - add_subdirectory(folderlistmodel) add_subdirectory(placesmodel) add_subdirectory(archives) --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,8 @@ endif(SAMBA_INCLUDE_DIRS AND SAMBA_LIBRARIES) endif() +pkg_check_modules(TAG taglib) + # Standard install paths include(GNUInstallDirs) --- a/src/plugin/folderlistmodel/CMakeLists.txt +++ b/src/plugin/folderlistmodel/CMakeLists.txt @@ -103,10 +103,19 @@ ${folderlistmodel_SRCS} ) -target_link_libraries(folderlistmodel Qt5::Gui Qt5::Qml Qt5::Quick Qt5::Widgets) -target_include_directories(folderlistmodel PUBLIC ${SAMBA_INCLUDE_DIRS}) -target_link_libraries(folderlistmodel ${SAMBA_LIBRARIES}) +target_include_directories(folderlistmodel PUBLIC + ${SAMBA_INCLUDE_DIRS} + ${TAG_INCLUDE_DIRS} +) +target_link_libraries(folderlistmodel + Qt5::Gui + Qt5::Qml + Qt5::Quick + Qt5::Widgets + ${SAMBA_LIBRARIES} + ${TAG_LIBRARIES} +) # Copy the plugin, the qmldir file and other assets to the build dir for running in QtCreator if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")