summaryrefslogtreecommitdiff
path: root/cmakeconfig/EinaCxxConfig.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'cmakeconfig/EinaCxxConfig.cmake.in')
-rw-r--r--cmakeconfig/EinaCxxConfig.cmake.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/cmakeconfig/EinaCxxConfig.cmake.in b/cmakeconfig/EinaCxxConfig.cmake.in
new file mode 100644
index 0000000000..f2f5658b63
--- /dev/null
+++ b/cmakeconfig/EinaCxxConfig.cmake.in
@@ -0,0 +1,30 @@
1# - Try to find eina
2# Once done this will define
3# EINA_CXX_FOUND - System has eina
4# EINA_CXX_INCLUDE_DIRS - The eina include directories
5# EINA_CXX_LIBRARIES - The libraries needed to use eina
6# EINA_CXX_DEFINITIONS - Compiler switches required for using eina
7
8set(MY_PKG eina_cxx)
9
10find_package(PkgConfig)
11if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
12 # "QUIET" was introduced in 2.8.2
13 set(_QUIET QUIET)
14endif ()
15pkg_check_modules(PC_EINA_CXX ${_QUIET} ${MY_PKG})
16find_library(EINA_CXX_LIBRARY
17 NAMES ${PC_EINA_CXX_LIBRARIES}
18 HINTS ${PC_EINA_CXX_LIBDIR} ${PC_EINA_CXX_LIBRARY_DIRS} )
19
20set(EINA_CXX_DEFINITIONS ${PC_EINA_CXX_CFLAGS_OTHER})
21set(EINA_CXX_LIBRARIES ${EINA_CXX_LIBRARY})
22set(EINA_CXX_INCLUDE_DIRS ${PC_EINA_CXX_INCLUDE_DIRS})
23
24include(FindPackageHandleStandardArgs)
25# handle the QUIETLY and REQUIRED arguments and set EINA_CXX_FOUND to TRUE
26# if all listed variables are TRUE
27find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
28 EINA_CXX_LIBRARIES EINA_CXX_INCLUDE_DIRS)
29
30mark_as_advanced(EINA_CXX_INCLUDE_DIRS EINA_CXX_LIBRARY EINA_CXX_LIBRARIES EINA_CXX_DEFINITIONS)