4dc0b9e0b09a30ec4f9c0460843ebc4a93a6a6dc
[quassel.git] / cmake / modules / FindLibsnore.cmake
1 # - Try to find the libsnore library
2 #  Once done this will define
3 #
4 #  LIBSNORE_FOUND - system has the LIBSNORE library
5 #  LIBSNORE_LIBRARIES - The libraries needed to use LIBSNORE
6 #  LIBSNORE_INCLUDE_DIRS - The includes needed to use LIBSNORE
7 #  LIBSNORE_PLUGIN_PATH - Path of the plugins
8 #  Copyright 2013 Patrick von Reth <vonreth@kde.org>
9
10 find_path(LIBSNORE_INCLUDE_DIR
11   NAMES snore/core/snore.h
12   PATHS ${KDE4_INCLUDE_DIR}
13 )
14
15 find_library(LIBSNORE_LIBRARY
16   NAMES
17   libsnore
18   snore
19   PATHS ${KDE4_LIB_DIR}
20 )
21
22 find_path(LIBSNORE_PLUGIN_PATH snoreplugins)
23
24 if(LIBSNORE_LIBRARY AND LIBSNORE_PLUGIN_PATH)
25     set(LIBSNORE_PLUGIN_PATH ${LIBSNORE_PLUGIN_PATH}/snoreplugins)
26 endif()
27
28 set(LIBSNORE_LIBRARIES ${LIBSNORE_LIBRARY})
29 set(LIBSNORE_INCLUDE_DIRS ${LIBSNORE_INCLUDE_DIR})
30
31 include(FindPackageHandleStandardArgs)
32 find_package_handle_standard_args(LIBSNORE DEFAULT_MSG LIBSNORE_LIBRARIES LIBSNORE_INCLUDE_DIRS)
33
34 mark_as_advanced(LIBSNORE_LIBRARIES LIBSNORE_INCLUDE_DIRS)