summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-02-05 16:19:37 +0000
committerTom Hacohen <tom@stosb.com>2013-02-05 16:19:37 +0000
commit0f3d5509bc8b6d437e74483b4a69e91811c737ad (patch)
tree6df7e8f492e5d0d3e52e150c7d7356ae70a847dd
parentf9cf5bb374a361b7b14bae8b191365ad5961e1c0 (diff)
Efl: Ship cmake configs (like pkg-config).
This should make it easier for applications to use efl with cmake. It seems to work with my tests. It's ugly and redundant but it's the first step. Not all the components are supported at the moment. SVN revision: 83637
-rw-r--r--Makefile.am10
-rw-r--r--cmakeconfig/EcoreConfig.cmake.in49
-rw-r--r--cmakeconfig/EdjeConfig.cmake.in32
-rw-r--r--cmakeconfig/EetConfig.cmake.in32
-rw-r--r--cmakeconfig/EfreetConfig.cmake.in32
-rw-r--r--cmakeconfig/EinaConfig.cmake.in32
-rw-r--r--cmakeconfig/EoConfig.cmake.in32
-rw-r--r--cmakeconfig/EvasConfig.cmake.in32
-rw-r--r--configure.ac7
9 files changed, 258 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index a0924be285..4a6d8eb075 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -227,6 +227,16 @@ if HAVE_ECORE_AUDIO
227pkgconfig_DATA += pc/ecore-audio.pc 227pkgconfig_DATA += pc/ecore-audio.pc
228endif 228endif
229 229
230# Cmake configs:
231cmakeconfigdir = ${prefix}/share/cmake/Modules/
232cmakeconfig_DATA = cmakeconfig/EinaConfig.cmake \
233 cmakeconfig/EoConfig.cmake \
234 cmakeconfig/EetConfig.cmake \
235 cmakeconfig/EvasConfig.cmake \
236 cmakeconfig/EcoreConfig.cmake \
237 cmakeconfig/EdjeConfig.cmake \
238 cmakeconfig/EfreetConfig.cmake
239
230# D-Bus services: 240# D-Bus services:
231 241
232servicedir = @dbusservicedir@ 242servicedir = @dbusservicedir@
diff --git a/cmakeconfig/EcoreConfig.cmake.in b/cmakeconfig/EcoreConfig.cmake.in
new file mode 100644
index 0000000000..3f3cbd38a6
--- /dev/null
+++ b/cmakeconfig/EcoreConfig.cmake.in
@@ -0,0 +1,49 @@
1# - Try to find ecore
2# Once done this will define
3# ECORE_FOUND - System has ecore
4# ECORE_INCLUDE_DIRS - The ecore include directories
5# ECORE_LIBRARIES - The libraries needed to use ecore
6# ECORE_DEFINITIONS - Compiler switches required for using ecore
7
8set(MY_PKG ecore)
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_LIBECORE ${_QUIET} ${MY_PKG})
16
17find_library(ECORE_LIBRARY
18 NAMES ${PC_LIBECORE_LIBRARIES}
19 HINTS ${PC_LIBECORE_LIBDIR} ${PC_LIBECORE_LIBRARY_DIRS} )
20
21set(ECORE_DEFINITIONS ${PC_LIBECORE_CFLAGS_OTHER})
22set(ECORE_LIBRARIES ${ECORE_LIBRARY})
23set(ECORE_INCLUDE_DIRS ${PC_LIBECORE_INCLUDE_DIRS})
24
25include(FindPackageHandleStandardArgs)
26# handle the QUIETLY and REQUIRED arguments and set ECORE_FOUND to TRUE
27# if all listed variables are TRUE
28find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
29 ECORE_LIBRARIES ECORE_INCLUDE_DIRS)
30
31mark_as_advanced(ECORE_INCLUDE_DIRS ECORE_LIBRARY ECORE_LIBRARIES ECORE_DEFINITIONS)
32
33if (ECORE_USE_ECORE-X)
34 pkg_check_modules(PC_LIBECORE_X ${_QUIET} ecore-x)
35
36 find_library(ECORE_X_LIBRARY
37 NAMES ${PC_LIBECORE_X_LIBRARIES}
38 HINTS ${PC_LIBECORE_X_LIBDIR} ${PC_LIBECORE_LIBRARY_DIRS} )
39
40 set(ECORE_X_DEFINITIONS ${PC_LIBECORE_CFLAGS_OTHER})
41 set(ECORE_X_LIBRARIES ${ECORE_LIBRARY})
42 set(ECORE_X_INCLUDE_DIRS ${PC_LIBECORE_INCLUDE_DIRS})
43
44 include(FindPackageHandleStandardArgs)
45 # handle the QUIETLY and REQUIRED arguments and set ECORE_X_FOUND to TRUE
46 # if all listed variables are TRUE
47 find_package_handle_standard_args(ecore_x DEFAULT_MSG
48 ECORE_X_LIBRARIES ECORE_INCLUDE_DIRS)
49endif (ECORE_USE_ECORE-X)
diff --git a/cmakeconfig/EdjeConfig.cmake.in b/cmakeconfig/EdjeConfig.cmake.in
new file mode 100644
index 0000000000..895b61d07c
--- /dev/null
+++ b/cmakeconfig/EdjeConfig.cmake.in
@@ -0,0 +1,32 @@
1# - Try to find edje
2# Once done this will define
3# EDJE_FOUND - System has edje
4# EDJE_INCLUDE_DIRS - The edje include directories
5# EDJE_LIBRARIES - The libraries needed to use edje
6# EDJE_DEFINITIONS - Compiler switches required for using edje
7
8set(MY_PKG edje)
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_LIBEDJE ${_QUIET} ${MY_PKG})
16
17find_library(EDJE_LIBRARY
18 NAMES ${PC_LIBEDJE_LIBRARIES}
19 HINTS ${PC_LIBEDJE_LIBDIR} ${PC_LIBEDJE_LIBRARY_DIRS} )
20
21set(EDJE_DEFINITIONS ${PC_LIBEDJE_CFLAGS_OTHER})
22set(EDJE_LIBRARIES ${EDJE_LIBRARY})
23set(EDJE_INCLUDE_DIRS ${PC_LIBEDJE_INCLUDE_DIRS})
24
25include(FindPackageHandleStandardArgs)
26# handle the QUIETLY and REQUIRED arguments and set EDJE_FOUND to TRUE
27# if all listed variables are TRUE
28find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
29 EDJE_LIBRARIES EDJE_INCLUDE_DIRS)
30
31mark_as_advanced(EDJE_INCLUDE_DIRS EDJE_LIBRARY EDJE_LIBRARIES EDJE_DEFINITIONS)
32
diff --git a/cmakeconfig/EetConfig.cmake.in b/cmakeconfig/EetConfig.cmake.in
new file mode 100644
index 0000000000..479e1f06b8
--- /dev/null
+++ b/cmakeconfig/EetConfig.cmake.in
@@ -0,0 +1,32 @@
1# - Try to find eet
2# Once done this will define
3# EET_FOUND - System has eet
4# EET_INCLUDE_DIRS - The eet include directories
5# EET_LIBRARIES - The libraries needed to use eet
6# EET_DEFINITIONS - Compiler switches required for using eet
7
8set(MY_PKG eet)
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_LIBEET ${_QUIET} ${MY_PKG})
16
17find_library(EET_LIBRARY
18 NAMES ${PC_LIBEET_LIBRARIES}
19 HINTS ${PC_LIBEET_LIBDIR} ${PC_LIBEET_LIBRARY_DIRS} )
20
21set(EET_DEFINITIONS ${PC_LIBEET_CFLAGS_OTHER})
22set(EET_LIBRARIES ${EET_LIBRARY})
23set(EET_INCLUDE_DIRS ${PC_LIBEET_INCLUDE_DIRS})
24
25include(FindPackageHandleStandardArgs)
26# handle the QUIETLY and REQUIRED arguments and set EET_FOUND to TRUE
27# if all listed variables are TRUE
28find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
29 EET_LIBRARIES EET_INCLUDE_DIRS)
30
31mark_as_advanced(EET_INCLUDE_DIRS EET_LIBRARY EET_LIBRARIES EET_DEFINITIONS)
32
diff --git a/cmakeconfig/EfreetConfig.cmake.in b/cmakeconfig/EfreetConfig.cmake.in
new file mode 100644
index 0000000000..cb39d97d41
--- /dev/null
+++ b/cmakeconfig/EfreetConfig.cmake.in
@@ -0,0 +1,32 @@
1# - Try to find efreet
2# Once done this will define
3# EFREET_FOUND - System has efreet
4# EFREET_INCLUDE_DIRS - The efreet include directories
5# EFREET_LIBRARIES - The libraries needed to use efreet
6# EFREET_DEFINITIONS - Compiler switches required for using efreet
7
8set(MY_PKG efreet)
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_LIBEFREET ${_QUIET} ${MY_PKG})
16
17find_library(EFREET_LIBRARY
18 NAMES ${PC_LIBEFREET_LIBRARIES}
19 HINTS ${PC_LIBEFREET_LIBDIR} ${PC_LIBEFREET_LIBRARY_DIRS} )
20
21set(EFREET_DEFINITIONS ${PC_LIBEFREET_CFLAGS_OTHER})
22set(EFREET_LIBRARIES ${EFREET_LIBRARY})
23set(EFREET_INCLUDE_DIRS ${PC_LIBEFREET_INCLUDE_DIRS})
24
25include(FindPackageHandleStandardArgs)
26# handle the QUIETLY and REQUIRED arguments and set EFREET_FOUND to TRUE
27# if all listed variables are TRUE
28find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
29 EFREET_LIBRARIES EFREET_INCLUDE_DIRS)
30
31mark_as_advanced(EFREET_INCLUDE_DIRS EFREET_LIBRARY EFREET_LIBRARIES EFREET_DEFINITIONS)
32
diff --git a/cmakeconfig/EinaConfig.cmake.in b/cmakeconfig/EinaConfig.cmake.in
new file mode 100644
index 0000000000..5fa8a5a4b5
--- /dev/null
+++ b/cmakeconfig/EinaConfig.cmake.in
@@ -0,0 +1,32 @@
1# - Try to find eina
2# Once done this will define
3# EINA_FOUND - System has eina
4# EINA_INCLUDE_DIRS - The eina include directories
5# EINA_LIBRARIES - The libraries needed to use eina
6# EINA_DEFINITIONS - Compiler switches required for using eina
7
8set(MY_PKG eina)
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_LIBEINA ${_QUIET} ${MY_PKG})
16
17find_library(EINA_LIBRARY
18 NAMES ${PC_LIBEINA_LIBRARIES}
19 HINTS ${PC_LIBEINA_LIBDIR} ${PC_LIBEINA_LIBRARY_DIRS} )
20
21set(EINA_DEFINITIONS ${PC_LIBEINA_CFLAGS_OTHER})
22set(EINA_LIBRARIES ${EINA_LIBRARY})
23set(EINA_INCLUDE_DIRS ${PC_LIBEINA_INCLUDE_DIRS})
24
25include(FindPackageHandleStandardArgs)
26# handle the QUIETLY and REQUIRED arguments and set EINA_FOUND to TRUE
27# if all listed variables are TRUE
28find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
29 EINA_LIBRARIES EINA_INCLUDE_DIRS)
30
31mark_as_advanced(EINA_INCLUDE_DIRS EINA_LIBRARY EINA_LIBRARIES EINA_DEFINITIONS)
32
diff --git a/cmakeconfig/EoConfig.cmake.in b/cmakeconfig/EoConfig.cmake.in
new file mode 100644
index 0000000000..268528f598
--- /dev/null
+++ b/cmakeconfig/EoConfig.cmake.in
@@ -0,0 +1,32 @@
1# - Try to find eo
2# Once done this will define
3# EO_FOUND - System has eo
4# EO_INCLUDE_DIRS - The eo include directories
5# EO_LIBRARIES - The libraries needed to use eo
6# EO_DEFINITIONS - Compiler switches required for using eo
7
8set(MY_PKG eo)
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_LIBEO ${_QUIET} ${MY_PKG})
16
17find_library(EO_LIBRARY
18 NAMES ${PC_LIBEO_LIBRARIES}
19 HINTS ${PC_LIBEO_LIBDIR} ${PC_LIBEO_LIBRARY_DIRS} )
20
21set(EO_DEFINITIONS ${PC_LIBEO_CFLAGS_OTHER})
22set(EO_LIBRARIES ${EO_LIBRARY})
23set(EO_INCLUDE_DIRS ${PC_LIBEO_INCLUDE_DIRS})
24
25include(FindPackageHandleStandardArgs)
26# handle the QUIETLY and REQUIRED arguments and set EO_FOUND to TRUE
27# if all listed variables are TRUE
28find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
29 EO_LIBRARIES EO_INCLUDE_DIRS)
30
31mark_as_advanced(EO_INCLUDE_DIRS EO_LIBRARY EO_LIBRARIES EO_DEFINITIONS)
32
diff --git a/cmakeconfig/EvasConfig.cmake.in b/cmakeconfig/EvasConfig.cmake.in
new file mode 100644
index 0000000000..11510f126c
--- /dev/null
+++ b/cmakeconfig/EvasConfig.cmake.in
@@ -0,0 +1,32 @@
1# - Try to find evas
2# Once done this will define
3# EVAS_FOUND - System has evas
4# EVAS_INCLUDE_DIRS - The evas include directories
5# EVAS_LIBRARIES - The libraries needed to use evas
6# EVAS_DEFINITIONS - Compiler switches required for using evas
7
8set(MY_PKG evas)
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_LIBEVAS ${_QUIET} ${MY_PKG})
16
17find_library(EVAS_LIBRARY
18 NAMES ${PC_LIBEVAS_LIBRARIES}
19 HINTS ${PC_LIBEVAS_LIBDIR} ${PC_LIBEVAS_LIBRARY_DIRS} )
20
21set(EVAS_DEFINITIONS ${PC_LIBEVAS_CFLAGS_OTHER})
22set(EVAS_LIBRARIES ${EVAS_LIBRARY})
23set(EVAS_INCLUDE_DIRS ${PC_LIBEVAS_INCLUDE_DIRS})
24
25include(FindPackageHandleStandardArgs)
26# handle the QUIETLY and REQUIRED arguments and set EVAS_FOUND to TRUE
27# if all listed variables are TRUE
28find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
29 EVAS_LIBRARIES EVAS_INCLUDE_DIRS)
30
31mark_as_advanced(EVAS_INCLUDE_DIRS EVAS_LIBRARY EVAS_LIBRARIES EVAS_DEFINITIONS)
32
diff --git a/configure.ac b/configure.ac
index 856c037e7c..2ab49caf8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3484,6 +3484,13 @@ pc/ethumb_client.pc
3484dbus-services/org.enlightenment.Efreet.service 3484dbus-services/org.enlightenment.Efreet.service
3485dbus-services/org.enlightenment.Ethumb.service 3485dbus-services/org.enlightenment.Ethumb.service
3486$po_makefile_in 3486$po_makefile_in
3487cmakeconfig/EinaConfig.cmake
3488cmakeconfig/EoConfig.cmake
3489cmakeconfig/EetConfig.cmake
3490cmakeconfig/EvasConfig.cmake
3491cmakeconfig/EcoreConfig.cmake
3492cmakeconfig/EdjeConfig.cmake
3493cmakeconfig/EfreetConfig.cmake
3487]) 3494])
3488 3495
3489AC_OUTPUT 3496AC_OUTPUT