summaryrefslogtreecommitdiff
path: root/cmakeconfig
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-05-03 00:55:51 +0200
committerCedric Bail <cedric.bail@free.fr>2014-05-03 00:56:32 +0200
commit46b6e8a563bd429690e7bffba4e98d06aa40798d (patch)
treeb7a2aebfc32bcc6d7a2600072a00d69a9f68d9a1 /cmakeconfig
parent64c6c63725d96f03baf34b660ca71e13b29078c1 (diff)
eolian_cxx: initial version of the EFL C++ Bindings Generator.
Summary: This patch adds 'eolian_cxx' -- a C++ bindings generator -- to the EFL tree. Eolian Cxx uses Eolian API to read .eo files and generate .eo.hh. It relies/depends on Eo Cxx and Eina Cxx (both non-generated bindings). src/bin/eolian_cxx: The eolian_cxx program. src/lib/eolian_cxx: A header-only library that implements the C++ code generation that binds the .eo classes. =Examples= src/examples/eolian_cxx/eolian_cxx_simple_01.cc: The simplest example, it just uses some "dummy" generated C++ classes. src/examples/eolian_cxx/eolian_cxx_inherit_01.cc: Illustrates how pure C++ classes inherit from .eo generated classes. src/examples/evas/evas_cxx_rectangle.cc: More realistic example using the generated bindings Evas Cxx. Still a bit shallow because we don't have full fledged .eo descriptions yet, but will be improved. =Important= The generated code is not supported and not a stable API/ABI. It is here to gather people interest and get review before we set things in stone for release 1.11. @feature Reviewers: cedric, smohanty, raster, stefan_schmidt CC: felipealmeida, JackDanielZ, cedric, stefan Differential Revision: https://phab.enlightenment.org/D805 Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Diffstat (limited to 'cmakeconfig')
-rw-r--r--cmakeconfig/EcoreCxxConfig.cmake.in66
-rw-r--r--cmakeconfig/EetCxxConfig.cmake.in30
-rw-r--r--cmakeconfig/EinaCxxConfig.cmake.in30
-rw-r--r--cmakeconfig/EoCxxConfig.cmake.in30
-rw-r--r--cmakeconfig/EolianCxxConfig.cmake.in30
-rw-r--r--cmakeconfig/EvasCxxConfig.cmake.in30
6 files changed, 216 insertions, 0 deletions
diff --git a/cmakeconfig/EcoreCxxConfig.cmake.in b/cmakeconfig/EcoreCxxConfig.cmake.in
new file mode 100644
index 0000000000..4dcd580286
--- /dev/null
+++ b/cmakeconfig/EcoreCxxConfig.cmake.in
@@ -0,0 +1,66 @@
1# - Try to find ecore_cxx
2# Once done this will define
3#
4# ECORE_CXX_FOUND - System has ecore_cxx
5# ECORE_CXX_INCLUDE_DIRS - The ecore_cxx include directories
6# ECORE_CXX_LIBRARIES - The libraries needed to use ecore_cxx
7# ECORE_CXX_DEFINITIONS - Compiler switches required for using ecore_cxx
8#
9# When the COMPONENTS keyword was passed to find_package(),
10# the following variables are defined for additional Ecore_Cxx modules
11# such as Evas, X, Imf, Imf_Evas.
12#
13# ECORE_CXX_*_FOUND - System has ecore_cxx *
14# ECORE_CXX_*_INCLUDE_DIRS - The ecore_cxx include directories
15# ECORE_CXX_*_LIBRARIES - The libraries needed to use ecore_cxx
16# ECORE_CXX_*_DEFINITIONS - Compiler switches required for using ecore_cxx * module.
17
18set(MY_PKG ecore_cxx)
19
20find_package(PkgConfig)
21if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
22 # "QUIET" was introduced in 2.8.2
23 set(_QUIET QUIET)
24endif ()
25pkg_check_modules(PC_LIBECORE_CXX ${_QUIET} ${MY_PKG})
26
27find_library(ECORE_CXX_LIBRARY
28 NAMES ${PC_LIBECORE_CXX_LIBRARIES}
29 HINTS ${PC_LIBECORE_CXX_LIBDIR} ${PC_LIBECORE_CXX_LIBRARY_DIRS} )
30
31set(ECORE_CXX_DEFINITIONS ${PC_LIBECORE_CXX_CFLAGS_OTHER})
32set(ECORE_CXX_LIBRARIES ${ECORE_CXX_LIBRARY})
33set(ECORE_CXX_INCLUDE_DIRS ${PC_LIBECORE_CXX_INCLUDE_DIRS})
34
35include(FindPackageHandleStandardArgs)
36# handle the QUIETLY and REQUIRED arguments and set ECORE_CXX_FOUND to TRUE
37# if all listed variables are TRUE
38find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
39 ECORE_CXX_LIBRARIES ECORE_CXX_INCLUDE_DIRS)
40
41mark_as_advanced(ECORE_CXX_INCLUDE_DIRS ECORE_CXX_LIBRARY ECORE_CXX_LIBRARIES ECORE_CXX_DEFINITIONS)
42
43if (Ecore_Cxx_FIND_COMPONENTS)
44 foreach(_component ${Ecore_Cxx_FIND_COMPONENTS})
45 string(TOUPPER ${_component} _COMPONENT)
46 string(TOLOWER ${_component} _component)
47 string(REGEX REPLACE "_" "-" _MODULE_PKGNAME "ecore_cxx-${_component}")
48
49 pkg_check_modules(PC_LIBECORE_CXX_${_COMPONENT} ${_QUIET} ${_MODULE_PKGNAME})
50
51 find_library(ECORE_CXX_${_COMPONENT}_LIBRARY
52 NAMES ${PC_LIBECORE_CXX_${_COMPONENT}_LIBRARIES}
53 HINTS ${PC_LIBECORE_CXX_${_COMPONENT}_LIBDIR}
54 ${PC_LIBECORE_CXX_${_COMPONENT}_LIBRARY_DIRS})
55
56 set(ECORE_CXX_${_COMPONENT}_DEFINITIONS ${PC_LIBECORE_CXX_${_COMPONENT}_CFLAGS_OTHER})
57 set(ECORE_CXX_${_COMPONENT}_LIBRARIES ${ECORE_CXX_${_COMPONENT}_LIBRARY})
58 set(ECORE_CXX_${_COMPONENT}_INCLUDE_DIRS ${PC_LIBECORE_CXX_${_COMPONENT}_INCLUDE_DIRS})
59
60 include(FindPackageHandleStandardArgs)
61 # handle the QUIETLY and REQUIRED arguments and set ECORE_CXX_*_FOUND to TRUE
62 # if all listed variables are TRUE
63 find_package_handle_standard_args(ecore_cxx_${_component} DEFAULT_MSG
64 ECORE_CXX_${_COMPONENT}_LIBRARIES ECORE_CXX_${_COMPONENT}_INCLUDE_DIRS)
65 endforeach(_component)
66endif(Ecore_Cxx_FIND_COMPONENTS)
diff --git a/cmakeconfig/EetCxxConfig.cmake.in b/cmakeconfig/EetCxxConfig.cmake.in
new file mode 100644
index 0000000000..18b0713340
--- /dev/null
+++ b/cmakeconfig/EetCxxConfig.cmake.in
@@ -0,0 +1,30 @@
1# - Try to find eet
2# Once done this will define
3# EET_CXX_FOUND - System has eet
4# EET_CXX_INCLUDE_DIRS - The eet include directories
5# EET_CXX_LIBRARIES - The libraries needed to use eet
6# EET_CXX_DEFINITIONS - Compiler switches required for using eet
7
8set(MY_PKG eet_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_EET_CXX ${_QUIET} ${MY_PKG})
16find_library(EET_CXX_LIBRARY
17 NAMES ${PC_EET_CXX_LIBRARIES}
18 HINTS ${PC_EET_CXX_LIBDIR} ${PC_EET_CXX_LIBRARY_DIRS} )
19
20set(EET_CXX_DEFINITIONS ${PC_EET_CXX_CFLAGS_OTHER})
21set(EET_CXX_LIBRARIES ${EET_CXX_LIBRARY})
22set(EET_CXX_INCLUDE_DIRS ${PC_EET_CXX_INCLUDE_DIRS})
23
24include(FindPackageHandleStandardArgs)
25# handle the QUIETLY and REQUIRED arguments and set EET_CXX_FOUND to TRUE
26# if all listed variables are TRUE
27find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
28 EET_CXX_LIBRARIES EET_CXX_INCLUDE_DIRS)
29
30mark_as_advanced(EET_CXX_INCLUDE_DIRS EET_CXX_LIBRARY EET_CXX_LIBRARIES EET_CXX_DEFINITIONS)
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)
diff --git a/cmakeconfig/EoCxxConfig.cmake.in b/cmakeconfig/EoCxxConfig.cmake.in
new file mode 100644
index 0000000000..94a9790da9
--- /dev/null
+++ b/cmakeconfig/EoCxxConfig.cmake.in
@@ -0,0 +1,30 @@
1# - Try to find eo
2# Once done this will define
3# EO_CXX_FOUND - System has eo
4# EO_CXX_INCLUDE_DIRS - The eo include directories
5# EO_CXX_LIBRARIES - The libraries needed to use eo
6# EO_CXX_DEFINITIONS - Compiler switches required for using eo
7
8set(MY_PKG eo_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_EO_CXX ${_QUIET} ${MY_PKG})
16find_library(EO_CXX_LIBRARY
17 NAMES ${PC_EO_CXX_LIBRARIES}
18 HINTS ${PC_EO_CXX_LIBDIR} ${PC_EO_CXX_LIBRARY_DIRS} )
19
20set(EO_CXX_DEFINITIONS ${PC_EO_CXX_CFLAGS_OTHER})
21set(EO_CXX_LIBRARIES ${EO_CXX_LIBRARY})
22set(EO_CXX_INCLUDE_DIRS ${PC_EO_CXX_INCLUDE_DIRS})
23
24include(FindPackageHandleStandardArgs)
25# handle the QUIETLY and REQUIRED arguments and set EO_CXX_FOUND to TRUE
26# if all listed variables are TRUE
27find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
28 EO_CXX_LIBRARIES EO_CXX_INCLUDE_DIRS)
29
30mark_as_advanced(EO_CXX_INCLUDE_DIRS EO_CXX_LIBRARY EO_CXX_LIBRARIES EO_CXX_DEFINITIONS)
diff --git a/cmakeconfig/EolianCxxConfig.cmake.in b/cmakeconfig/EolianCxxConfig.cmake.in
new file mode 100644
index 0000000000..2f7101f0a7
--- /dev/null
+++ b/cmakeconfig/EolianCxxConfig.cmake.in
@@ -0,0 +1,30 @@
1# - Try to find eolian
2# Once done this will define
3# EOLIAN_CXX_FOUND - System has eolian
4# EOLIAN_CXX_INCLUDE_DIRS - The eolian include directories
5# EOLIAN_CXX_LIBRARIES - The libraries needed to use eolian
6# EOLIAN_CXX_DEFINITIONS - Compiler switches required for using eolian
7
8set(MY_PKG eolian_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_EOLIAN_CXX ${_QUIET} ${MY_PKG})
16find_library(EOLIAN_CXX_LIBRARY
17 NAMES ${PC_EOLIAN_CXX_LIBRARIES}
18 HINTS ${PC_EOLIAN_CXX_LIBDIR} ${PC_EOLIAN_CXX_LIBRARY_DIRS} )
19
20set(EOLIAN_CXX_DEFINITIONS ${PC_EOLIAN_CXX_CFLAGS_OTHER})
21set(EOLIAN_CXX_LIBRARIES ${EOLIAN_CXX_LIBRARY})
22set(EOLIAN_CXX_INCLUDE_DIRS ${PC_EOLIAN_CXX_INCLUDE_DIRS})
23
24include(FindPackageHandleStandardArgs)
25# handle the QUIETLY and REQUIRED arguments and set EOLIAN_CXX_FOUND to TRUE
26# if all listed variables are TRUE
27find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
28 EOLIAN_CXX_LIBRARIES EOLIAN_CXX_INCLUDE_DIRS)
29
30mark_as_advanced(EOLIAN_CXX_INCLUDE_DIRS EOLIAN_CXX_LIBRARY EOLIAN_CXX_LIBRARIES EOLIAN_CXX_DEFINITIONS)
diff --git a/cmakeconfig/EvasCxxConfig.cmake.in b/cmakeconfig/EvasCxxConfig.cmake.in
new file mode 100644
index 0000000000..e45e111646
--- /dev/null
+++ b/cmakeconfig/EvasCxxConfig.cmake.in
@@ -0,0 +1,30 @@
1# - Try to find evas
2# Once done this will define
3# EVAS_CXX_FOUND - System has evas
4# EVAS_CXX_INCLUDE_DIRS - The evas include directories
5# EVAS_CXX_LIBRARIES - The libraries needed to use evas
6# EVAS_CXX_DEFINITIONS - Compiler switches required for using evas
7
8set(MY_PKG evas_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_EVAS_CXX ${_QUIET} ${MY_PKG})
16find_library(EVAS_CXX_LIBRARY
17 NAMES ${PC_EVAS_CXX_LIBRARIES}
18 HINTS ${PC_EVAS_CXX_LIBDIR} ${PC_EVAS_CXX_LIBRARY_DIRS} )
19
20set(EVAS_CXX_DEFINITIONS ${PC_EVAS_CXX_CFLAGS_OTHER})
21set(EVAS_CXX_LIBRARIES ${EVAS_CXX_LIBRARY})
22set(EVAS_CXX_INCLUDE_DIRS ${PC_EVAS_CXX_INCLUDE_DIRS})
23
24include(FindPackageHandleStandardArgs)
25# handle the QUIETLY and REQUIRED arguments and set EVAS_CXX_FOUND to TRUE
26# if all listed variables are TRUE
27find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
28 EVAS_CXX_LIBRARIES EVAS_CXX_INCLUDE_DIRS)
29
30mark_as_advanced(EVAS_CXX_INCLUDE_DIRS EVAS_CXX_LIBRARY EVAS_CXX_LIBRARIES EVAS_CXX_DEFINITIONS)