PageRenderTime 226ms CodeModel.GetById 100ms app.highlight 5ms RepoModel.GetById 116ms app.codeStats 1ms

/CMakeModules/FindJreen.cmake

http://github.com/tomahawk-player/tomahawk
CMake | 35 lines | 23 code | 6 blank | 6 comment | 0 complexity | 56841f1c01f177551c6130101ec69fc9 MD5 | raw file
 1# - Find libjreen
 2# Find the libjreen includes and the libjreen libraries
 3# This module defines
 4# LIBJREEN_INCLUDE_DIR, root jreen include dir. Include jreen includes with jreen/foo.h
 5# LIBJREEN_LIBRARY, the path to libjreen
 6# LIBJREEN_FOUND, whether libjreen was found
 7
 8FIND_PACKAGE(PkgConfig QUIET)
 9PKG_CHECK_MODULES(PC_JREEN QUIET libjreen-qt5)
10
11FIND_PATH(JREEN_INCLUDE_DIR NAMES jreen/jreen.h
12    HINTS
13        ${PC_JREEN_INCLUDEDIR}
14        ${PC_JREEN_INCLUDE_DIRS}
15        ${CMAKE_INSTALL_INCLUDEDIR}
16    PATH_SUFFIXES
17        jreen-qt5
18)
19
20FIND_LIBRARY(JREEN_LIBRARIES NAMES jreen-qt5
21    HINTS
22        ${PC_JREEN_LIBDIR}
23        ${PC_JREEN_LIBRARY_DIRS}
24        ${CMAKE_INSTALL_LIBDIR}
25)
26
27IF(JREEN_LIBRARIES AND JREEN_INCLUDE_DIR AND NOT PC_JREEN_VERSION)
28    MESSAGE(WARNING "You don't have pkg-config and so the Jreen version check does not work!")
29ENDIF()
30
31INCLUDE(FindPackageHandleStandardArgs)
32FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jreen
33                                  REQUIRED_VARS JREEN_LIBRARIES JREEN_INCLUDE_DIR)
34
35MARK_AS_ADVANCED(JREEN_INCLUDE_DIR JREEN_LIBRARIES)