diff options
author | Daniel Kolesa <d.kolesa@samsung.com> | 2014-12-08 16:11:35 +0000 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@samsung.com> | 2014-12-08 16:12:01 +0000 |
commit | 8e1bccde78892a8414b8278bf34348b562b1c540 (patch) | |
tree | aa3547d106cc65b354fbf79249588c7d4afcb243 /cmakeconfig | |
parent | 4db40cea63abc9534b7255b8bd2346ab222d9418 (diff) |
elua: add elua.pc to configure.ac and add cmake definitions for elua
Diffstat (limited to 'cmakeconfig')
-rw-r--r-- | cmakeconfig/EluaConfig.cmake.in | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/cmakeconfig/EluaConfig.cmake.in b/cmakeconfig/EluaConfig.cmake.in new file mode 100644 index 0000000000..0d48224d32 --- /dev/null +++ b/cmakeconfig/EluaConfig.cmake.in | |||
@@ -0,0 +1,36 @@ | |||
1 | # - Try to find elua | ||
2 | # Once done this will define | ||
3 | # ELUA_FOUND - System has elua | ||
4 | # ELUA_INCLUDE_DIRS - The elua include directories | ||
5 | # ELUA_LIBRARIES - The libraries needed to use elua | ||
6 | # ELUA_DEFINITIONS - Compiler switches required for using elua | ||
7 | # ELUA_EXECUTABLE - full path to the `elua' program. | ||
8 | |||
9 | set(MY_PKG elua) | ||
10 | |||
11 | find_package(PkgConfig) | ||
12 | if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1") | ||
13 | # "QUIET" was introduced in 2.8.2 | ||
14 | set(_QUIET QUIET) | ||
15 | endif () | ||
16 | pkg_check_modules(PC_LIBELUA ${_QUIET} ${MY_PKG}) | ||
17 | |||
18 | find_library(ELUA_LIBRARY | ||
19 | NAMES ${PC_LIBELUA_LIBRARIES} | ||
20 | HINTS ${PC_LIBELUA_LIBDIR} ${PC_LIBELUA_LIBRARY_DIRS}) | ||
21 | |||
22 | find_program(ELUA_EXECUTABLE | ||
23 | NAMES elua) | ||
24 | |||
25 | set(ELUA_DEFINITIONS ${PC_LIBELUA_CFLAGS_OTHER}) | ||
26 | set(ELUA_LIBRARIES ${ELUA_LIBRARY}) | ||
27 | set(ELUA_INCLUDE_DIRS ${PC_LIBELUA_INCLUDE_DIRS}) | ||
28 | |||
29 | include(FindPackageHandleStandardArgs) | ||
30 | # handle the QUIETLY and REQUIRED arguments and set ELUA_FOUND to TRUE | ||
31 | # if all listed variables are TRUE | ||
32 | find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG | ||
33 | ELUA_LIBRARIES ELUA_INCLUDE_DIRS) | ||
34 | |||
35 | mark_as_advanced(ELUA_INCLUDE_DIRS ELUA_LIBRARY ELUA_LIBRARIES ELUA_DEFINITIONS ELUA_EXECUTABLE) | ||
36 | |||