not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / cmake / modules / FindQEdje.cmake
blob39f105f974ae481d191284c48ad9e3f8ec038842
1 # - Try to find QEdje and QZion
2 # Once done this will define
4 #  QEDJE_FOUND - system has QEdje
5 #  QZION_INCLUDE_DIRS - the QZion include directory
6 #  QEDJE_INCLUDE_DIRS - the QEdje include directory
7 #  QZION_LIBRARIES - Link these to use QZion
8 #  QEDJE_LIBRARIES - Link these to use QEdje
9 #  QZION_CFLAGS_OTHER - Compiler switches required for using QZion
10 #  QEDJE_CFLAGS_OTHER - Compiler switches required for using QEdje
13 # use pkg-config to get the directories and then use these values
14 # in the FIND_PATH() and FIND_LIBRARY() calls
15 if( NOT WIN32 )
16   find_package(PkgConfig)
17   pkg_check_modules(PC_QEdje eet qzion>=0.3.0 qedje>=0.3.0)
18 endif( NOT WIN32 )
20 # use this just to create a nice message at FindPackageHandleStandardArgs
21 if (PC_QEdje_FOUND)
22   FIND_PATH(QEDJE_QEdje_INCLUDE_DIR qedje.h
23     HINTS
24     ${PC_QEdje_INCLUDE_DIRS}
25   )
26   FIND_PATH(QEDJE_QZion_INCLUDE_DIR qzion.h
27     HINTS
28     ${PC_QEdje_INCLUDE_DIRS}
29   )
30   FIND_PATH(QEDJE_Eet_INCLUDE_DIR Eet.h
31     HINTS
32     ${PC_QEdje_INCLUDE_DIRS}
33   )
35   FIND_LIBRARY(QEDJE_QEdje_LIBRARY NAMES qedje
36     PATHS
37     ${PC_QEdje_LIBRARY_DIRS}
38   )
39   FIND_LIBRARY(QEDJE_QZion_LIBRARY NAMES qzion
40     PATHS
41     ${PC_QEdje_LIBRARY_DIRS}
42   )
43   FIND_LIBRARY(QEDJE_Eet_LIBRARY NAMES eet
44     PATHS
45     ${PC_QEdje_LIBRARY_DIRS}
46   )
48   SET(QEDJE_LIBRARIES ${QEDJE_QEdje_LIBRARY} ${QEDJE_QZion_LIBRARY} ${QEDJE_Eet_LIBRARY} CACHE INTERNAL "All libraries needed for QEdje")
49   SET(QEDJE_INCLUDE_DIRS  ${QEDJE_QEdje_INCLUDE_DIR} ${QEDJE_QZion_INCLUDE_DIR} ${QEDJE_Eet_INCLUDE_DIR} CACHE INTERNAL "All include directories needed for QEdje")
51 else (PC_QEdje_FOUND)
52   MESSAGE(STATUS "Could not find QZion and/or QEdje and/or eet. Please download them here (http://dev.openbossa.org/trac/qedje).")
53 endif (PC_QEdje_FOUND)
55 INCLUDE(FindPackageHandleStandardArgs)
56 FIND_PACKAGE_HANDLE_STANDARD_ARGS(QEdje DEFAULT_MSG QEDJE_LIBRARIES QEDJE_INCLUDE_DIRS)
58 # show QEdje_LIBRARY and QZion_LIBRARY variables only in the advanced view
59 MARK_AS_ADVANCED(QEDJE_QEdje_LIBRARY QEDJE_QZion_LIBRARY QEDJE_Eet_LIBRARY QEDJE_QEdje_INCLUDE_DIR QEDJE_QZion_INCLUDE_DIR QEDJE_Eet_INCLUDE_DIR)