summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/FindEdje.cmake
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-21 16:05:55 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-21 16:05:55 +0200
commit5c2347eb55eb0b6d661a3efddc5e3aff93dd6c2e (patch)
tree6f61427dc5fc6879638575109d1e06ebadb60451 /cmake/Modules/FindEdje.cmake
downloadedoors-5c2347eb55eb0b6d661a3efddc5e3aff93dd6c2e.zip
edoors-5c2347eb55eb0b6d661a3efddc5e3aff93dd6c2e.tar.gz
initial commit: project tree and cmake scripts
Diffstat (limited to 'cmake/Modules/FindEdje.cmake')
-rw-r--r--cmake/Modules/FindEdje.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/cmake/Modules/FindEdje.cmake b/cmake/Modules/FindEdje.cmake
new file mode 100644
index 0000000..927b31d
--- /dev/null
+++ b/cmake/Modules/FindEdje.cmake
@@ -0,0 +1,28 @@
+# - Try to find edje
+# Once done this will define
+# EDJE_FOUND - System has edje
+# EDJE_INCLUDE_DIRS - The edje include directories
+# EDJE_LIBRARIES - The libraries needed to use edje
+# EDJE_DEFINITIONS - Compiler switches required for using edje
+
+find_package(PkgConfig)
+pkg_check_modules(PC_LIBEDJE QUIET edje)
+set(EDJE_DEFINITIONS ${PC_LIBEDJE_CFLAGS_OTHER})
+
+find_path(EDJE_INCLUDE_DIR Edje.h
+ HINTS ${PC_LIBEDJE_INCLUDEDIR} ${PC_LIBEDJE_INCLUDE_DIRS}
+ PATH_SUFFIXES edje )
+
+find_library(EDJE_LIBRARY NAMES edje
+ HINTS ${PC_LIBEDJE_LIBDIR} ${PC_LIBEDJE_LIBRARY_DIRS} )
+
+set(EDJE_LIBRARIES ${EDJE_LIBRARY} )
+set(EDJE_INCLUDE_DIRS ${EDJE_INCLUDE_DIR} )
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set EDJE_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(edje DEFAULT_MSG
+ EDJE_LIBRARY EDJE_INCLUDE_DIR)
+
+mark_as_advanced(EDJE_INCLUDE_DIR EDJE_LIBRARY )