Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
JuK
Commits
9a54d6e7
Commit
9a54d6e7
authored
Feb 10, 2021
by
Nicolas Fella
Browse files
Use FindTagLib from ECM
parent
74b86c84
Pipeline
#50440
passed with stage
in 12 minutes and 52 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
9a54d6e7
...
...
@@ -10,7 +10,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project
(
juk VERSION
${
RELEASE_SERVICE_VERSION
}
)
set
(
QT_MIN_VERSION
"5.10.0"
)
set
(
KF5_MIN_VERSION
"5.
35
.0"
)
set
(
KF5_MIN_VERSION
"5.
72
.0"
)
find_package
(
ECM
${
KF5_MIN_VERSION
}
REQUIRED NO_MODULE
)
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
${
ECM_MODULE_PATH
}
)
...
...
@@ -63,12 +63,10 @@ set(HAVE_TUNEPIMP 0)
########### next target ###############
include_directories
(
SYSTEM
${
TAGLIB_INCLUDES
}
)
add_definitions
(
-DQT_STL -DQT_NO_URL_CAST_FROM_STRING
)
# Look for Ogg Opus support in taglib (not released yet)
cmake_push_check_state
()
set
(
CMAKE_REQUIRED_INCLUDES
${
CMAKE_REQUIRED_INCLUDES
}
${
TAGLIB_INCLUDES
}
)
check_include_file_cxx
(
opusfile.h TAGLIB_HAS_OPUSFILE
)
cmake_pop_check_state
()
...
...
@@ -194,7 +192,7 @@ target_link_libraries(juk ${LIBMATH}
KF5::WidgetsAddons
KF5::Wallet
Phonon::phonon4qt5
${
TAGLIB_LIBRARIES
}
Taglib::Taglib
)
if
(
TUNEPIMP_FOUND
)
...
...
cmake/FindTaglib.cmake
deleted
100644 → 0
View file @
74b86c84
# - Try to find the Taglib library
# Once done this will define
#
# TAGLIB_FOUND - system has the taglib library
# TAGLIB_CFLAGS - the taglib cflags
# TAGLIB_LIBRARIES - The libraries needed to use taglib
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if
(
NOT TAGLIB_MIN_VERSION
)
set
(
TAGLIB_MIN_VERSION
"1.4"
)
endif
(
NOT TAGLIB_MIN_VERSION
)
if
(
NOT WIN32
)
find_program
(
TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS
${
BIN_INSTALL_DIR
}
)
endif
(
NOT WIN32
)
#reset vars
set
(
TAGLIB_LIBRARIES
)
set
(
TAGLIB_CFLAGS
)
# if taglib-config has been found
if
(
TAGLIBCONFIG_EXECUTABLE
)
exec_program
(
${
TAGLIBCONFIG_EXECUTABLE
}
ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION
)
if
(
TAGLIB_VERSION VERSION_LESS
"
${
TAGLIB_MIN_VERSION
}
"
)
message
(
STATUS
"TagLib version not found: version searched :
${
TAGLIB_MIN_VERSION
}
, found
${
TAGLIB_VERSION
}
"
)
set
(
TAGLIB_FOUND FALSE
)
else
(
TAGLIB_VERSION VERSION_LESS
"
${
TAGLIB_MIN_VERSION
}
"
)
exec_program
(
${
TAGLIBCONFIG_EXECUTABLE
}
ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES
)
exec_program
(
${
TAGLIBCONFIG_EXECUTABLE
}
ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_CFLAGS
)
if
(
TAGLIB_LIBRARIES AND TAGLIB_CFLAGS
)
set
(
TAGLIB_FOUND TRUE
)
message
(
STATUS
"Found taglib:
${
TAGLIB_LIBRARIES
}
"
)
endif
(
TAGLIB_LIBRARIES AND TAGLIB_CFLAGS
)
string
(
REGEX REPLACE
" *-I"
";"
TAGLIB_INCLUDES
"
${
TAGLIB_CFLAGS
}
"
)
endif
(
TAGLIB_VERSION VERSION_LESS
"
${
TAGLIB_MIN_VERSION
}
"
)
mark_as_advanced
(
TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES
)
else
(
TAGLIBCONFIG_EXECUTABLE
)
include
(
FindLibraryWithDebug
)
include
(
FindPackageHandleStandardArgs
)
find_path
(
TAGLIB_INCLUDES
NAMES
tag.h
PATH_SUFFIXES taglib
PATHS
${
KDE4_INCLUDE_DIR
}
${
INCLUDE_INSTALL_DIR
}
)
list
(
APPEND TAGLIB_INCLUDES
"
${
TAGLIB_INCLUDES
}
/.."
)
find_library_with_debug
(
TAGLIB_LIBRARIES
WIN32_DEBUG_POSTFIX d
NAMES tag
PATHS
${
KDE4_LIB_DIR
}
${
LIB_INSTALL_DIR
}
)
find_package_handle_standard_args
(
Taglib DEFAULT_MSG
TAGLIB_INCLUDES TAGLIB_LIBRARIES
)
endif
(
TAGLIBCONFIG_EXECUTABLE
)
if
(
TAGLIB_FOUND
)
if
(
NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE
)
message
(
STATUS
"Taglib found:
${
TAGLIB_LIBRARIES
}
"
)
endif
(
NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE
)
else
(
TAGLIB_FOUND
)
if
(
Taglib_FIND_REQUIRED
)
message
(
FATAL_ERROR
"Could not find Taglib"
)
endif
(
Taglib_FIND_REQUIRED
)
endif
(
TAGLIB_FOUND
)
Michael Pyne
@mpyne
mentioned in commit
082914b0
·
Feb 13, 2021
mentioned in commit
082914b0
mentioned in commit 082914b0f2e8508bb5ce67bd22896e9ff64d3b32
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment