1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-17 14:29:40 +01:00
tomahawk/CMakeModules/FindLibLastFm.cmake

34 lines
892 B
CMake
Raw Normal View History

# - Try to find LibLastFm
#
2012-06-12 01:18:07 +02:00
# LIBLASTFM_FOUND - system has liblastfm
# LIBLASTFM_INCLUDE_DIRS - the liblastfm include directories
# LIBLASTFM_LIBRARIES - link these to use liblastfm
#
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
#
2010-10-17 05:32:01 +02:00
2014-10-02 15:43:33 +01:00
if( TOMAHAWK_QT5 )
set(LASTFM_LIB_SUFFIX "5")
endif()
# Include dir
find_path(LIBLASTFM_INCLUDE_DIR
# Track.h doesn't exist in liblastfm-0.3.1, was called Track back then
NAMES lastfm/Track.h
PATHS ${KDE4_INCLUDE_DIR}
2010-10-17 05:32:01 +02:00
)
# Finally the library itself
find_library(LIBLASTFM_LIBRARY
2014-10-02 15:43:33 +01:00
NAMES lastfm${LASTFM_LIB_SUFFIX}
PATHS ${KDE4_LIB_DIR}
2010-10-17 05:32:01 +02:00
)
set(LIBLASTFM_LIBRARIES ${LIBLASTFM_LIBRARY})
2012-06-12 01:21:09 +02:00
set(LIBLASTFM_INCLUDE_DIRS ${LIBLASTFM_INCLUDE_DIR})
2010-10-17 05:32:01 +02:00
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibLastFm DEFAULT_MSG LIBLASTFM_LIBRARIES LIBLASTFM_INCLUDE_DIRS)
2010-10-17 05:32:01 +02:00
mark_as_advanced(LIBLASTFM_LIBRARIES LIBLASTFM_INCLUDE_DIRS)