From 874f59c646882308611d429e7250c9abe050b989 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Tue, 8 Dec 2020 01:02:00 +0100 Subject: [PATCH 1/4] Cleanup Qt4 support Unmaintained upstream for many years. Signed-off-by: Andreas Sturmlechner --- CMakeLists.txt | 45 +++++++++++++++------------------ README.md | 21 +++++---------- src/CMakeLists.txt | 21 +++------------ src/Url.cpp | 12 --------- src/UrlBuilder.cpp | 4 --- src/fingerprint/CMakeLists.txt | 8 +----- src/fingerprint/Fingerprint.cpp | 4 +-- tests/lastfm_add_test.cmake | 14 +++------- 8 files changed, 37 insertions(+), 92 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4fd67021..0995c8277 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,36 +28,33 @@ set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_SOURCE_DIR}/cmake/Module # setup qt stuff set(CMAKE_AUTOMOC ON) -option(BUILD_WITH_QT4 "Build liblastfm with Qt4" OFF) +find_package(Qt5 CONFIG REQUIRED COMPONENTS Core Network Xml) -if(NOT BUILD_WITH_QT4) - find_package(Qt5 REQUIRED COMPONENTS Core Network Xml CONFIG) +if(BUILD_FINGERPRINT) + find_package(Qt5Sql CONFIG REQUIRED) +endif() - if(BUILD_FINGERPRINT) - find_package(Qt5Sql REQUIRED CONFIG) - endif() +if(BUILD_TESTS) + find_package(Qt5Test CONFIG REQUIRED) +endif() - set(LASTFM_LIB_VERSION_SUFFIX 5) - if(UNIX AND NOT APPLE) - find_package(Qt5DBus REQUIRED CONFIG) - endif() +set(LASTFM_LIB_VERSION_SUFFIX 5) +if(UNIX AND NOT APPLE) + find_package(Qt5DBus CONFIG REQUIRED) +endif() -# macro(qt_wrap_ui) -# qt5_wrap_ui(${ARGN}) -# endmacro() +# macro(qt_wrap_ui) +# qt5_wrap_ui(${ARGN}) +# endmacro() # -# macro(qt_add_resources) -# qt5_add_resources(${ARGN}) -# endmacro() +# macro(qt_add_resources) +# qt5_add_resources(${ARGN}) +# endmacro() # -# find_package(Qt5LinguistTools REQUIRED) -# macro(qt_add_translation) -# qt5_add_translation(${ARGN}) -# endmacro() -else() - find_package(Qt4 COMPONENTS QtCore QtNetwork QtXml REQUIRED) -endif() - +# find_package(Qt5LinguistTools REQUIRED) +# macro(qt_add_translation) +# qt5_add_translation(${ARGN}) +# endmacro() if(CMAKE_COMPILER_IS_GNUCXX) add_definitions("-fno-operator-names -fvisibility-inlines-hidden -fvisibility=hidden") diff --git a/README.md b/README.md index 62a1ee961..cc2f99f1f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Channel: #last.desktop liblastfm requires: -* Qt 4.8 http://qt.digia.com/ +* Qt 5.0 https://www.qt.io/ * FFTW http://www.fftw.org/ * libsamplerate http://www.mega-nerd.com/SRC/ @@ -27,23 +27,14 @@ Additionally, to build it you will need: ## Mac OS X -We recommend that you use Homebrew to install dependancies http://mxcl.github.com/homebrew/ +We recommend that you use Homebrew to install dependancies https://brew.sh/ -In order to install QT 5 run: +In order to install Qt 5 run: ``` brew install qt ``` -In order to install QT 4.8 run: - -``` -brew install cartr/qt4/qt@4 -brew install cartr/qt4/qt-webkit@2.3 -``` -Don't forget to turn on the BUILD_WITH_QT4 option in CMakeLists.txt - - -And for other dependencies: +For other dependencies: ``` brew install cmake brew install fftw @@ -52,9 +43,9 @@ brew install libsamplerate ## Linux/*NIX -Do something like this: +On Debian-based systems, do something like this: - sudo apt-get install qt4-qmake pkg-config g++ libqt4-dev cmake libfftw-dev libsamplerate0-dev + sudo apt-get install qt5-qmake pkg-config g++ qtbase5-dev cmake libfftw-dev libsamplerate0-dev Please note, we have only tested on Linux, but we think it'll work on all varieties of UNIX. If it doesn't, report the bug to eartle on GitHub. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 22ce506cd..98b1e0e97 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,8 +1,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/global.h.in ${CMAKE_CURRENT_BINARY_DIR}/global.h) - -add_definitions(${QT_DEFINITIONS}) -include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(liblastfm_SOURCES ws.cpp @@ -66,20 +64,9 @@ endif() add_library(${LASTFM_LIB_TARGET_NAME} SHARED ${liblastfm_SOURCES}) -if(Qt5Core_DIR) - target_link_libraries(${LASTFM_LIB_TARGET_NAME} Qt5::Network Qt5::Xml) - if(UNIX AND NOT APPLE) - target_link_libraries(${LASTFM_LIB_TARGET_NAME} Qt5::DBus) - endif() -else() - target_link_libraries(${LASTFM_LIB_TARGET_NAME} - ${QT_QTCORE_LIBRARY} - ${QT_QTNETWORK_LIBRARY} - ${QT_QTXML_LIBRARY} - ) - if(UNIX AND NOT APPLE) - target_link_libraries(${LASTFM_LIB_TARGET_NAME} ${QT_QTDBUS_LIBRARY}) - endif() +target_link_libraries(${LASTFM_LIB_TARGET_NAME} Qt5::Network Qt5::Xml) +if(UNIX AND NOT APPLE) + target_link_libraries(${LASTFM_LIB_TARGET_NAME} Qt5::DBus) endif() if(WIN32 AND NOT MINGW) diff --git a/src/Url.cpp b/src/Url.cpp index af27ecd75..06f84291d 100644 --- a/src/Url.cpp +++ b/src/Url.cpp @@ -20,25 +20,19 @@ #include "Url.h" -#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) #include -#endif class lastfm::UrlPrivate { public: UrlPrivate( const QUrl& url ); QUrl url; -#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) QUrlQuery query; -#endif }; lastfm::UrlPrivate::UrlPrivate( const QUrl& u ) : url( u ) -#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) , query( u.query() ) -#endif { } @@ -55,12 +49,8 @@ lastfm::Url::~Url() void lastfm::Url::addQueryItem( const QString& key, const QString& value ) { -#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) d->query.addQueryItem( key, value ); d->url.setQuery( d->query ); -#else - d->url.addQueryItem( key, value ); -#endif } QUrl @@ -73,9 +63,7 @@ lastfm::Url& lastfm::Url::operator=( const lastfm::Url& that ) { d->url = that.d->url; -#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) d->query = that.d->query; -#endif return *this; } diff --git a/src/UrlBuilder.cpp b/src/UrlBuilder.cpp index a542a02cb..df299a344 100644 --- a/src/UrlBuilder.cpp +++ b/src/UrlBuilder.cpp @@ -62,11 +62,7 @@ lastfm::UrlBuilder::url() const QUrl url; url.setScheme( "http" ); url.setHost( host() ); -#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) url.setPath( d->path ); -#else - url.setEncodedPath( d->path ); -#endif return url; } diff --git a/src/fingerprint/CMakeLists.txt b/src/fingerprint/CMakeLists.txt index 4a74e0dc0..966d59afa 100644 --- a/src/fingerprint/CMakeLists.txt +++ b/src/fingerprint/CMakeLists.txt @@ -1,12 +1,10 @@ -#find_package(Qt4 COMPONENTS QtCore QtSql REQUIRED) #FIXME: find modules are horrible, port them to find_package_handle_standard_args find_package(LibSamplerate REQUIRED) find_package(LibFFTW3 REQUIRED) include_directories(${LIBFFTW3_INCLUDE_DIR}) include_directories(${LIBSAMPLERATE_INCLUDE_DIR}) -include_directories(${QT_INCLUDES}) include_directories(${CMAKE_CURRENT_LIST_DIR}/..) include_directories(${CMAKE_CURRENT_BINARY_DIR}/..) @@ -38,11 +36,7 @@ target_link_libraries(${FINGERPRINT_LIB_TARGET_NAME} ${LIBFFTW3_LIBRARY} ) -if(Qt5Core_DIR) - target_link_libraries(${FINGERPRINT_LIB_TARGET_NAME} Qt5::Network Qt5::Sql Qt5::Xml) -else() - target_link_libraries(${FINGERPRINT_LIB_TARGET_NAME} ${QT_QTCORE_LIBRARY} ${QT_QTSQL_LIBRARY}) -endif() +target_link_libraries(${FINGERPRINT_LIB_TARGET_NAME} Qt5::Network Qt5::Sql Qt5::Xml) install(TARGETS ${FINGERPRINT_LIB_TARGET_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/src/fingerprint/Fingerprint.cpp b/src/fingerprint/Fingerprint.cpp index 55f77a458..a105e4375 100644 --- a/src/fingerprint/Fingerprint.cpp +++ b/src/fingerprint/Fingerprint.cpp @@ -31,9 +31,7 @@ #include #include #include -#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) - #include -#endif +#include #include #include "User.h" diff --git a/tests/lastfm_add_test.cmake b/tests/lastfm_add_test.cmake index 2f0664d97..46e49deaa 100644 --- a/tests/lastfm_add_test.cmake +++ b/tests/lastfm_add_test.cmake @@ -1,20 +1,14 @@ macro(lastfm_add_test test_class) - include_directories(${QT_INCLUDES} "${PROJECT_SOURCE_DIR}/src" ${CMAKE_CURRENT_BINARY_DIR}) + include_directories("${PROJECT_SOURCE_DIR}/src" ${CMAKE_CURRENT_BINARY_DIR}) set(LASTFM_TEST_CLASS ${test_class}) configure_file(main.cpp.in Test${LASTFM_TEST_CLASS}.cpp) configure_file(Test${LASTFM_TEST_CLASS}.h Test${LASTFM_TEST_CLASS}.h) add_executable(${LASTFM_TEST_CLASS}Test Test${LASTFM_TEST_CLASS}.cpp) - if(Qt5Core_DIR) - target_link_libraries(${LASTFM_TEST_CLASS}Test Qt5::Core Qt5::Test Qt5::Xml Qt5::Network - ${LASTFM_LIB_TARGET_NAME} - ) - else() - target_link_libraries(${LASTFM_TEST_CLASS}Test ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} - ${LASTFM_LIB_TARGET_NAME} - ) - endif() + target_link_libraries(${LASTFM_TEST_CLASS}Test Qt5::Core Qt5::Test Qt5::Xml Qt5::Network + ${LASTFM_LIB_TARGET_NAME} + ) add_test(NAME ${LASTFM_TEST_CLASS}Test COMMAND ${LASTFM_TEST_CLASS}Test) endmacro() From 75ec9dd8b370c9c522c5a26b023f3030c8f24157 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Tue, 8 Dec 2020 01:15:33 +0100 Subject: [PATCH 2/4] Raise CMake minimum to 2.8.12, move find_package to root CMakeLists.txt Support for <2.8.12 will soon be dropped from a future CMake version. Easier reading if all dependencies are listed in root CMakeLists.txt. Signed-off-by: Andreas Sturmlechner --- CMakeLists.txt | 5 ++++- src/fingerprint/CMakeLists.txt | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0995c8277..5a46a5741 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.6) +cmake_minimum_required(VERSION 2.8.12) project(liblastfm) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) @@ -32,6 +32,9 @@ find_package(Qt5 CONFIG REQUIRED COMPONENTS Core Network Xml) if(BUILD_FINGERPRINT) find_package(Qt5Sql CONFIG REQUIRED) + #FIXME: find modules are horrible, port them to find_package_handle_standard_args + find_package(LibSamplerate REQUIRED) + find_package(LibFFTW3 REQUIRED) endif() if(BUILD_TESTS) diff --git a/src/fingerprint/CMakeLists.txt b/src/fingerprint/CMakeLists.txt index 966d59afa..ef8bd9b6c 100644 --- a/src/fingerprint/CMakeLists.txt +++ b/src/fingerprint/CMakeLists.txt @@ -1,8 +1,3 @@ - -#FIXME: find modules are horrible, port them to find_package_handle_standard_args -find_package(LibSamplerate REQUIRED) -find_package(LibFFTW3 REQUIRED) - include_directories(${LIBFFTW3_INCLUDE_DIR}) include_directories(${LIBSAMPLERATE_INCLUDE_DIR}) include_directories(${CMAKE_CURRENT_LIST_DIR}/..) From a88fa4e4a3b07879778c07897aa8d44f174459a1 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Tue, 8 Dec 2020 02:10:56 +0100 Subject: [PATCH 3/4] Use FindPkgConfig and IMPORTED_TARGET to find LibSamplerate and FFTW3F Raises CMake minimum to 3.6 for IMPORTED_TARGET. Signed-off-by: Andreas Sturmlechner --- CMakeLists.txt | 12 ++++++++---- src/fingerprint/CMakeLists.txt | 6 ++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a46a5741..07c296446 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.6) project(liblastfm) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) @@ -21,6 +21,7 @@ option(BUILD_TESTS "Build liblastfm tests" ON) # installation dirs include(GNUInstallDirs) include(FeatureSummary) +include(FindPkgConfig) #cmake module path set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_SOURCE_DIR}/cmake/Modules") @@ -32,9 +33,12 @@ find_package(Qt5 CONFIG REQUIRED COMPONENTS Core Network Xml) if(BUILD_FINGERPRINT) find_package(Qt5Sql CONFIG REQUIRED) - #FIXME: find modules are horrible, port them to find_package_handle_standard_args - find_package(LibSamplerate REQUIRED) - find_package(LibFFTW3 REQUIRED) + + pkg_check_modules(LibSamplerate REQUIRED IMPORTED_TARGET samplerate) + add_feature_info(LibSamplerate LibSamplerate_FOUND "Required for lastfm-fingerprint library") + + pkg_check_modules(FFTW3F REQUIRED IMPORTED_TARGET fftw3f>=3.0) + add_feature_info(FFTW3F FFTW3F_FOUND "Required for lastfm-fingerprint library") endif() if(BUILD_TESTS) diff --git a/src/fingerprint/CMakeLists.txt b/src/fingerprint/CMakeLists.txt index ef8bd9b6c..c87f64899 100644 --- a/src/fingerprint/CMakeLists.txt +++ b/src/fingerprint/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${LIBFFTW3_INCLUDE_DIR}) -include_directories(${LIBSAMPLERATE_INCLUDE_DIR}) include_directories(${CMAKE_CURRENT_LIST_DIR}/..) include_directories(${CMAKE_CURRENT_BINARY_DIR}/..) @@ -27,8 +25,8 @@ set_target_properties(${FINGERPRINT_LIB_TARGET_NAME} PROPERTIES target_link_libraries(${FINGERPRINT_LIB_TARGET_NAME} ${LASTFM_LIB_TARGET_NAME} - ${LIBSAMPLERATE_LIBRARY} - ${LIBFFTW3_LIBRARY} + PkgConfig::LibSamplerate + PkgConfig::FFTW3F ) target_link_libraries(${FINGERPRINT_LIB_TARGET_NAME} Qt5::Network Qt5::Sql Qt5::Xml) From ce31a1494b3744b2a0929c60621c7ef1dc2d7d0f Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Tue, 8 Dec 2020 02:13:45 +0100 Subject: [PATCH 4/4] Drop obsolete cmake modules Signed-off-by: Andreas Sturmlechner --- CMakeLists.txt | 5 -- cmake/Modules/FindDBus.cmake | 72 --------------------------- cmake/Modules/FindLibFFTW3.cmake | 51 ------------------- cmake/Modules/FindLibSamplerate.cmake | 27 ---------- 4 files changed, 155 deletions(-) delete mode 100644 cmake/Modules/FindDBus.cmake delete mode 100644 cmake/Modules/FindLibFFTW3.cmake delete mode 100644 cmake/Modules/FindLibSamplerate.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 07c296446..63c2ce7a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required(VERSION 3.6) project(liblastfm) -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) - # general settings set(LASTFM_SOVERSION 1) set(LASTFM_VERSION "0x00010100") @@ -23,9 +21,6 @@ include(GNUInstallDirs) include(FeatureSummary) include(FindPkgConfig) -#cmake module path -set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_SOURCE_DIR}/cmake/Modules") - # setup qt stuff set(CMAKE_AUTOMOC ON) diff --git a/cmake/Modules/FindDBus.cmake b/cmake/Modules/FindDBus.cmake deleted file mode 100644 index f227cc297..000000000 --- a/cmake/Modules/FindDBus.cmake +++ /dev/null @@ -1,72 +0,0 @@ -# - Try to find the low-level D-Bus library -# Once done this will define -# -# DBUS_FOUND - system has D-Bus -# DBUS_INCLUDE_DIR - the D-Bus include directory -# DBUS_ARCH_INCLUDE_DIR - the D-Bus architecture-specific include directory -# DBUS_LIBRARIES - the libraries needed to use D-Bus - -# Copyright (c) 2008, Kevin Kofler, -# modeled after FindLibArt.cmake: -# Copyright (c) 2006, Alexander Neundorf, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES) - - # in cache already - SET(DBUS_FOUND TRUE) - -else (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES) - - IF (NOT WIN32) - FIND_PACKAGE(PkgConfig) - IF (PKG_CONFIG_FOUND) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - pkg_check_modules(_DBUS_PC QUIET dbus-1) - ENDIF (PKG_CONFIG_FOUND) - ENDIF (NOT WIN32) - - FIND_PATH(DBUS_INCLUDE_DIR dbus/dbus.h - ${_DBUS_PC_INCLUDE_DIRS} - /usr/include - /usr/include/dbus-1.0 - /usr/local/include - ) - - FIND_PATH(DBUS_ARCH_INCLUDE_DIR dbus/dbus-arch-deps.h - ${_DBUS_PC_INCLUDE_DIRS} - /usr/lib${LIB_SUFFIX}/include - /usr/lib${LIB_SUFFIX}/dbus-1.0/include - /usr/lib64/include - /usr/lib64/dbus-1.0/include - /usr/lib/include - /usr/lib/dbus-1.0/include - ) - - FIND_LIBRARY(DBUS_LIBRARIES NAMES dbus-1 dbus - PATHS - ${_DBUS_PC_LIBDIR} - ) - - - if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES) - set(DBUS_FOUND TRUE) - endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES) - - - if (DBUS_FOUND) - if (NOT DBus_FIND_QUIETLY) - message(STATUS "Found D-Bus: ${DBUS_LIBRARIES}") - endif (NOT DBus_FIND_QUIETLY) - else (DBUS_FOUND) - if (DBus_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find D-Bus") - endif (DBus_FIND_REQUIRED) - endif (DBUS_FOUND) - - MARK_AS_ADVANCED(DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR DBUS_LIBRARIES) - -endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES) diff --git a/cmake/Modules/FindLibFFTW3.cmake b/cmake/Modules/FindLibFFTW3.cmake deleted file mode 100644 index 97187ee3f..000000000 --- a/cmake/Modules/FindLibFFTW3.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# This file is copyrighted under the BSD-license for buildsystem files of KDE -# copyright 2010, Patrick von Reth -# -# -# - Try to find the LIBFFTW3 library -# Once done this will define -# -# LIBFFTW3_FOUND Set to TRUE if LIBFFTW3 librarys and include directory is found -# LIBFFTW3_INCLUDE_DIR The libfftw3 include directory -# LIBFFTW3_LIBRARY The libfftw3 librarys - -find_package(PkgConfig) -pkg_check_modules(PC_FFTW3F QUIET fftw) -set(FFTW3F_DEFINITIONS ${PC_FFTW3F_CFLAGS_OTHER}) - -if(NOT LIBFFTW3_PRECISION) - message(STATUS "Searching for LIBFFTW3, using default precision float") - set(LIBFFTW3_PRECISION FLOAT) -endif(NOT LIBFFTW3_PRECISION) - -find_path(LIBFFTW3_INCLUDE_DIR fftw3.h - HINTS ${PC_FFTW3F_INCLUDEDIR} ${PC_FFTW3F_INCLUDE_DIRS}) - -if(LIBFFTW3_PRECISION STREQUAL FLOAT) - set(LIBFFTW3_PRECISION_SUFFIX f) -endif(LIBFFTW3_PRECISION STREQUAL FLOAT) - -if(LIBFFTW3_PRECISION STREQUAL DOUBLE) - set(LIBFFTW3_PRECISION_SUFFIX "") -endif(LIBFFTW3_PRECISION STREQUAL DOUBLE) - -if(LIBFFTW3_PRECISION STREQUAL LDOUBLE) - set(LIBFFTW3_PRECISION_SUFFIX l) -endif(LIBFFTW3_PRECISION STREQUAL LDOUBLE) - -find_library(LIBFFTW3_LIBRARY NAMES fftw3${LIBFFTW3_PRECISION_SUFFIX} libfftw3${LIBFFTW3_PRECISION_SUFFIX}-3 fftw3${LIBFFTW3_PRECISION_SUFFIX}-3 - HINTS ${PC_FFTW3F_LIBDIR} ${PC_FFTW3F_LIBRARY_DIRS}) - -if(FIND_LIBFFTW3_VERBOSE) - message(STATUS - "LIBFFTW3_PRECISION ${LIBFFTW3_PRECISION}, searched for fftw3${LIBFFTW3_PRECISION_SUFFIX} libfftw3${LIBFFTW3_PRECISION_SUFFIX}-3 fftw3${LIBFFTW3_PRECISION_SUFFIX}-3 - and found ${LIBFFTW3_LIBRARY}" - ) -endif(FIND_LIBFFTW3_VERBOSE) - -if(LIBFFTW3_LIBRARY AND LIBFFTW3_INCLUDE_DIR) - set(LIBFFTW3_FOUND TRUE) - message(STATUS "Found libfftw3 ${LIBFFTW3_LIBRARY}") -else(LIBFFTW3_LIBRARY AND LIBFFTW3_PLUGIN_PATH) - message(STATUS "Could not find libfftw3, get it http://www.fftw.org/") -endif(LIBFFTW3_LIBRARY AND LIBFFTW3_INCLUDE_DIR) diff --git a/cmake/Modules/FindLibSamplerate.cmake b/cmake/Modules/FindLibSamplerate.cmake deleted file mode 100644 index 28063233c..000000000 --- a/cmake/Modules/FindLibSamplerate.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# This file is copyrighted under the BSD-license for buildsystem files of KDE -# copyright 2010, Patrick von Reth -# -# -# - Try to find the libsamplerate library -# Once done this will define -# -# LIBSAMPLERATE_FOUND Set to TRUE if libsamplerate librarys and include directory is found -# LIBSAMPLERATE_LIBRARY The libsamplerate librarys -# LIBSAMPLERATE_INCLUDE_DIR The libsamplerate include directory - -find_package(PkgConfig) -pkg_check_modules(PC_LIBSAMPLERATE QUIET libsamplerate) -set(LIBSAMPLERATE_DEFINITIONS ${PC_LIBSAMPLERATE_CFLAGS_OTHER}) - -find_library(LIBSAMPLERATE_LIBRARY NAMES samplerate libsamplerate-0 samplerate-0 - HINTS ${PC_LIBSAMPLERATE_LIBDIR} ${PC_LIBSAMPLERATE_LIBRARY_DIRS}) - -find_path(LIBSAMPLERATE_INCLUDE_DIR samplerate.h - HINTS ${PC_LIBSAMPLERATE_INCLUDEDIR} ${PC_LIBSAMPLERATE_INCLUDE_DIRS}) - -if(LIBSAMPLERATE_LIBRARY AND LIBSAMPLERATE_INCLUDE_DIR) - set(LIBSAMPLERATE_FOUND TRUE) - message(STATUS "Found libsamplerate ${LIBSAMPLERATE_LIBRARY}") -else(LIBSAMPLERATE_LIBRARY AND LIBSAMPLERATE_PLUGIN_PATH) - message(STATUS "Could not find libsamplerate, get it http://www.mega-nerd.com/SRC/") -endif(LIBSAMPLERATE_LIBRARY AND LIBSAMPLERATE_INCLUDE_DIR)