[kfilemetadata] autotests: The usermetadatawritertest requires Taglib.

Ben Cooksley null at kde.org
Fri Dec 1 19:30:00 UTC 2017


Git commit 6c9111a952fb7c70c864b663d25080e418a0222c by Ben Cooksley.
Committed on 01/12/2017 at 19:29.
Pushed by bcooksley into branch 'master'.

The usermetadatawritertest requires Taglib.
Therefore if Taglib isn't around, we shouldn't try to build something that requires it.
This fixes the build on Windows.

CCMAIL: smithjd15 at gmail.com
CCMAIL: kde-frameworks-devel at kde.org

M  +9    -5    autotests/CMakeLists.txt

https://commits.kde.org/kfilemetadata/6c9111a952fb7c70c864b663d25080e418a0222c

diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
index 68f3778..cb7f3b9 100644
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -152,11 +152,15 @@ ecm_add_test(${extractorcollection_SRCS}
 # UserMetaData
 #
 
-kde_enable_exceptions()
-ecm_add_test(usermetadatawritertest.cpp ../src/usermetadata.cpp
-    TEST_NAME "usermetadatawritertest"
-    LINK_LIBRARIES Qt5::Test KF5::FileMetaData
-)
+if(TAGLIB_FOUND)
+    include_directories(${TAGLIB_INCLUDES})
+
+    kde_enable_exceptions()
+    ecm_add_test(usermetadatawritertest.cpp ../src/usermetadata.cpp
+        TEST_NAME "usermetadatawritertest"
+        LINK_LIBRARIES Qt5::Test KF5::FileMetaData
+    )
+endif()
 
 #
 # TagLib


More information about the Kde-frameworks-devel mailing list