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
16 find_package(PkgConfig)
17 pkg_check_modules(PC_QEdje eet qzion>=0.3.0 qedje>=0.3.0)
20 # use this just to create a nice message at FindPackageHandleStandardArgs
22 FIND_PATH(QEDJE_QEdje_INCLUDE_DIR qedje.h
24 ${PC_QEdje_INCLUDE_DIRS}
26 FIND_PATH(QEDJE_QZion_INCLUDE_DIR qzion.h
28 ${PC_QEdje_INCLUDE_DIRS}
30 FIND_PATH(QEDJE_Eet_INCLUDE_DIR Eet.h
32 ${PC_QEdje_INCLUDE_DIRS}
35 FIND_LIBRARY(QEDJE_QEdje_LIBRARY NAMES qedje
37 ${PC_QEdje_LIBRARY_DIRS}
39 FIND_LIBRARY(QEDJE_QZion_LIBRARY NAMES qzion
41 ${PC_QEdje_LIBRARY_DIRS}
43 FIND_LIBRARY(QEDJE_Eet_LIBRARY NAMES eet
45 ${PC_QEdje_LIBRARY_DIRS}
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")
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)