summaryrefslogtreecommitdiffstats
path: root/ecmake/cmake/Modules/FindElementary.cmake
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-04-13 23:03:55 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-04-13 23:03:55 +0200
commit23929ded8ba244359e871e1d02ee1d05d060ea71 (patch)
tree0d22b1481f2259376ab3aa4d48f746ad76d8a3e5 /ecmake/cmake/Modules/FindElementary.cmake
parent3c54b36fa04a7c54bb685705397ce3eac707f956 (diff)
downloadskeletons-23929ded8ba244359e871e1d02ee1d05d060ea71.zip
skeletons-23929ded8ba244359e871e1d02ee1d05d060ea71.tar.gz
add ecmake, thanks a lot to eobj guys
Diffstat (limited to 'ecmake/cmake/Modules/FindElementary.cmake')
-rw-r--r--ecmake/cmake/Modules/FindElementary.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/ecmake/cmake/Modules/FindElementary.cmake b/ecmake/cmake/Modules/FindElementary.cmake
new file mode 100644
index 0000000..5b75bfc
--- /dev/null
+++ b/ecmake/cmake/Modules/FindElementary.cmake
@@ -0,0 +1,28 @@
+# - Try to find elementary
+# Once done this will define
+# ELEMENTARY_FOUND - System has elementary
+# ELEMENTARY_INCLUDE_DIRS - The elementary include directories
+# ELEMENTARY_LIBRARIES - The libraries needed to use elementary
+# ELEMENTARY_DEFINITIONS - Compiler switches required for using elementary
+
+find_package(PkgConfig)
+pkg_check_modules(PC_LIBELEMENTARY QUIET elementary)
+set(ELEMENTARY_DEFINITIONS ${PC_LIBELEMENTARY_CFLAGS_OTHER})
+
+find_path(ELEMENTARY_INCLUDE_DIR Elementary.h
+ HINTS ${PC_LIBELEMENTARY_INCLUDEDIR} ${PC_LIBELEMENTARY_INCLUDE_DIRS}
+ PATH_SUFFIXES elementary )
+
+find_library(ELEMENTARY_LIBRARY NAMES elementary
+ HINTS ${PC_LIBELEMENTARY_LIBDIR} ${PC_LIBELEMENTARY_LIBRARY_DIRS} )
+
+set(ELEMENTARY_LIBRARIES ${ELEMENTARY_LIBRARY} )
+set(ELEMENTARY_INCLUDE_DIRS ${PC_LIBELEMENTARY_INCLUDEDIR} ${PC_LIBELEMENTARY_INCLUDE_DIRS} )
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set ELEMENTARY_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(elementary DEFAULT_MSG
+ ELEMENTARY_LIBRARY ELEMENTARY_INCLUDE_DIR)
+
+mark_as_advanced(ELEMENTARY_INCLUDE_DIR ELEMENTARY_LIBRARY )