From 504c1aece2ff4222a50177c9a44510110903671a Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sat, 5 Jan 2013 16:41:06 +0100 Subject: [PATCH] qt5: clean up Find modules and don't depend on Qt(4) in them anymore --- CMakeModules/FindLibLastFm.cmake | 5 ----- CMakeModules/FindQJSON.cmake | 31 ++++++------------------------- CMakeModules/FindQTweetLib.cmake | 3 --- CMakeModules/FindQuaZip.cmake | 5 ++--- 4 files changed, 8 insertions(+), 36 deletions(-) diff --git a/CMakeModules/FindLibLastFm.cmake b/CMakeModules/FindLibLastFm.cmake index 27362fe71..55f1123e3 100644 --- a/CMakeModules/FindLibLastFm.cmake +++ b/CMakeModules/FindLibLastFm.cmake @@ -7,11 +7,6 @@ # (c) Dominik Schmidt # -# Dependencies -if(NOT QT4_FOUND) - find_package(Qt4 REQUIRED) -endif() - # Include dir find_path(LIBLASTFM_INCLUDE_DIR # Track.h doesn't exist in liblastfm-0.3.1, was called Track back then diff --git a/CMakeModules/FindQJSON.cmake b/CMakeModules/FindQJSON.cmake index 936d93b3c..d99e3e28b 100644 --- a/CMakeModules/FindQJSON.cmake +++ b/CMakeModules/FindQJSON.cmake @@ -6,30 +6,16 @@ # QJSON_INCLUDE_DIR - the include path of the qjson library # -if (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES) - - # Already in cache - set (QJSON_FOUND TRUE) - -else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES) - - if (NOT WIN32) - # use pkg-config to get the values of QJSON_INCLUDE_DIRS - # and QJSON_LIBRARY_DIRS to add as hints to the find commands. - include (FindPkgConfig) - pkg_check_modules (QJSON REQUIRED QJson>=0.5) - endif (NOT WIN32) - - find_library (QJSON_LIBRARIES +find_library (QJSON_LIBRARIES NAMES qjson PATHS ${QJSON_LIBRARY_DIRS} ${LIB_INSTALL_DIR} ${KDE4_LIB_DIR} - ) +) - find_path (QJSON_INCLUDE_DIR +find_path (QJSON_INCLUDE_DIR NAMES parser.h PATH_SUFFIXES @@ -38,13 +24,8 @@ else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES) ${QJSON_INCLUDE_DIRS} ${INCLUDE_INSTALL_DIR} ${KDE4_INCLUDE_DIR} - ) +) - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR) - if ( UNIX AND NOT APPLE ) - set ( QJSON_LIBRARIES "${QJSON_LIBRARIES} ${QJSON_LDFLAGS}" CACHE INTERNAL "") - endif () - -endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES) diff --git a/CMakeModules/FindQTweetLib.cmake b/CMakeModules/FindQTweetLib.cmake index ee2461f5e..536b09733 100644 --- a/CMakeModules/FindQTweetLib.cmake +++ b/CMakeModules/FindQTweetLib.cmake @@ -7,9 +7,6 @@ # (c) Dominik Schmidt # -# Dependencies -find_package(Qt4 REQUIRED) - # Include dir find_path(QTWEETLIB_INCLUDE_DIR NAMES QTweetLib/qtweetlib_global.h diff --git a/CMakeModules/FindQuaZip.cmake b/CMakeModules/FindQuaZip.cmake index 921213ca0..322e021a8 100644 --- a/CMakeModules/FindQuaZip.cmake +++ b/CMakeModules/FindQuaZip.cmake @@ -1,4 +1,3 @@ -find_package(Qt4) find_path(QuaZip_INCLUDE_DIR quazip.h ${CMAKE_INSTALL_PREFIX}/include/quazip ${CMAKE_INSTALL_PREFIX}/include /usr/include/quazip /usr/local/include/quazip ${QT_INCLUDE_DIR}/quazip ${QT_INCLUDE_DIR} ${QUAZIP_DIR}/include/quazip ${QUAZIP_DIR}/quazip ${QUAZIP_DIR}/include) find_library(QuaZip_LIBRARY NAMES quazip PATHS ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/Library/Frameworks ${QUAZIP_DIR}/lib64 ${QUAZIP_DIR}/lib ${QUAZIP_DIR}/quazip ${QUAZIP_DIR}) include(FindPackageHandleStandardArgs) @@ -6,6 +5,6 @@ find_package_handle_standard_args(quazip DEFAULT_MSG QuaZip_LIBRARY QuaZip_INCLU set(QuaZip_LIBRARIES ${QuaZip_LIBRARY}) mark_as_advanced(QuaZip_LIBRARY QuaZip_INCLUDE_DIR) -if(QuaZip_LIBRARY AND QuaZip_INCLUDE_DIR) - set(QuaZip_FOUND TRUE) +if(QuaZip_LIBRARY AND QuaZip_INCLUDE_DIR) + set(QuaZip_FOUND TRUE) endif()