compile
[kdegraphics.git] / cmake / modules / FindOkular.cmake
blob00a941f5bc1a69c87d8ced1c484cf841fd146586
1 # - Find Okular
2 # Find the Okular core library
4 # This module defines
5 #  OKULAR_FOUND - whether the Okular core library was found
6 #  OKULAR_LIBRARIES - the Okular core library
7 #  OKULAR_INCLUDE_DIR - the include path of the Okular core library
10 if (OKULAR_INCLUDE_DIR AND OKULAR_LIBRARIES)
12   # Already in cache
13   set (OKULAR_FOUND TRUE)
15 else (OKULAR_INCLUDE_DIR AND OKULAR_LIBRARIES)
17   find_library (OKULAR_LIBRARIES
18     NAMES
19     okularcore
20     PATHS
21     ${LIB_INSTALL_DIR}
22     ${KDE4_LIB_DIR}
23   )
25   find_path (OKULAR_INCLUDE_DIR
26     NAMES
27     okular/core/document.h
28     PATHS
29     ${INCLUDE_INSTALL_DIR}
30     ${KDE4_INCLUDE_DIR}
31   )
33   include(FindPackageHandleStandardArgs)
34   find_package_handle_standard_args(Okular DEFAULT_MSG OKULAR_LIBRARIES OKULAR_INCLUDE_DIR)
36 endif (OKULAR_INCLUDE_DIR AND OKULAR_LIBRARIES)
38 mark_as_advanced(OKULAR_INCLUDE_DIR OKULAR_LIBRARIES)