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
This commit is contained in:
Tom Hacohen 2013-02-05 16:19:37 +00:00
parent f9cf5bb374
commit 0f3d5509bc
9 changed files with 258 additions and 0 deletions

View File

@ -227,6 +227,16 @@ if HAVE_ECORE_AUDIO
pkgconfig_DATA += pc/ecore-audio.pc
endif
# Cmake configs:
cmakeconfigdir = ${prefix}/share/cmake/Modules/
cmakeconfig_DATA = cmakeconfig/EinaConfig.cmake \
cmakeconfig/EoConfig.cmake \
cmakeconfig/EetConfig.cmake \
cmakeconfig/EvasConfig.cmake \
cmakeconfig/EcoreConfig.cmake \
cmakeconfig/EdjeConfig.cmake \
cmakeconfig/EfreetConfig.cmake
# D-Bus services:
servicedir = @dbusservicedir@

View File

@ -0,0 +1,49 @@
# - Try to find ecore
# Once done this will define
# ECORE_FOUND - System has ecore
# ECORE_INCLUDE_DIRS - The ecore include directories
# ECORE_LIBRARIES - The libraries needed to use ecore
# ECORE_DEFINITIONS - Compiler switches required for using ecore
set(MY_PKG ecore)
find_package(PkgConfig)
if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
# "QUIET" was introduced in 2.8.2
set(_QUIET QUIET)
endif ()
pkg_check_modules(PC_LIBECORE ${_QUIET} ${MY_PKG})
find_library(ECORE_LIBRARY
NAMES ${PC_LIBECORE_LIBRARIES}
HINTS ${PC_LIBECORE_LIBDIR} ${PC_LIBECORE_LIBRARY_DIRS} )
set(ECORE_DEFINITIONS ${PC_LIBECORE_CFLAGS_OTHER})
set(ECORE_LIBRARIES ${ECORE_LIBRARY})
set(ECORE_INCLUDE_DIRS ${PC_LIBECORE_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set ECORE_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
ECORE_LIBRARIES ECORE_INCLUDE_DIRS)
mark_as_advanced(ECORE_INCLUDE_DIRS ECORE_LIBRARY ECORE_LIBRARIES ECORE_DEFINITIONS)
if (ECORE_USE_ECORE-X)
pkg_check_modules(PC_LIBECORE_X ${_QUIET} ecore-x)
find_library(ECORE_X_LIBRARY
NAMES ${PC_LIBECORE_X_LIBRARIES}
HINTS ${PC_LIBECORE_X_LIBDIR} ${PC_LIBECORE_LIBRARY_DIRS} )
set(ECORE_X_DEFINITIONS ${PC_LIBECORE_CFLAGS_OTHER})
set(ECORE_X_LIBRARIES ${ECORE_LIBRARY})
set(ECORE_X_INCLUDE_DIRS ${PC_LIBECORE_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set ECORE_X_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(ecore_x DEFAULT_MSG
ECORE_X_LIBRARIES ECORE_INCLUDE_DIRS)
endif (ECORE_USE_ECORE-X)

View File

@ -0,0 +1,32 @@
# - Try to find edje
# Once done this will define
# EDJE_FOUND - System has edje
# EDJE_INCLUDE_DIRS - The edje include directories
# EDJE_LIBRARIES - The libraries needed to use edje
# EDJE_DEFINITIONS - Compiler switches required for using edje
set(MY_PKG edje)
find_package(PkgConfig)
if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
# "QUIET" was introduced in 2.8.2
set(_QUIET QUIET)
endif ()
pkg_check_modules(PC_LIBEDJE ${_QUIET} ${MY_PKG})
find_library(EDJE_LIBRARY
NAMES ${PC_LIBEDJE_LIBRARIES}
HINTS ${PC_LIBEDJE_LIBDIR} ${PC_LIBEDJE_LIBRARY_DIRS} )
set(EDJE_DEFINITIONS ${PC_LIBEDJE_CFLAGS_OTHER})
set(EDJE_LIBRARIES ${EDJE_LIBRARY})
set(EDJE_INCLUDE_DIRS ${PC_LIBEDJE_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set EDJE_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
EDJE_LIBRARIES EDJE_INCLUDE_DIRS)
mark_as_advanced(EDJE_INCLUDE_DIRS EDJE_LIBRARY EDJE_LIBRARIES EDJE_DEFINITIONS)

View File

@ -0,0 +1,32 @@
# - Try to find eet
# Once done this will define
# EET_FOUND - System has eet
# EET_INCLUDE_DIRS - The eet include directories
# EET_LIBRARIES - The libraries needed to use eet
# EET_DEFINITIONS - Compiler switches required for using eet
set(MY_PKG eet)
find_package(PkgConfig)
if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
# "QUIET" was introduced in 2.8.2
set(_QUIET QUIET)
endif ()
pkg_check_modules(PC_LIBEET ${_QUIET} ${MY_PKG})
find_library(EET_LIBRARY
NAMES ${PC_LIBEET_LIBRARIES}
HINTS ${PC_LIBEET_LIBDIR} ${PC_LIBEET_LIBRARY_DIRS} )
set(EET_DEFINITIONS ${PC_LIBEET_CFLAGS_OTHER})
set(EET_LIBRARIES ${EET_LIBRARY})
set(EET_INCLUDE_DIRS ${PC_LIBEET_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set EET_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
EET_LIBRARIES EET_INCLUDE_DIRS)
mark_as_advanced(EET_INCLUDE_DIRS EET_LIBRARY EET_LIBRARIES EET_DEFINITIONS)

View File

@ -0,0 +1,32 @@
# - Try to find efreet
# Once done this will define
# EFREET_FOUND - System has efreet
# EFREET_INCLUDE_DIRS - The efreet include directories
# EFREET_LIBRARIES - The libraries needed to use efreet
# EFREET_DEFINITIONS - Compiler switches required for using efreet
set(MY_PKG efreet)
find_package(PkgConfig)
if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
# "QUIET" was introduced in 2.8.2
set(_QUIET QUIET)
endif ()
pkg_check_modules(PC_LIBEFREET ${_QUIET} ${MY_PKG})
find_library(EFREET_LIBRARY
NAMES ${PC_LIBEFREET_LIBRARIES}
HINTS ${PC_LIBEFREET_LIBDIR} ${PC_LIBEFREET_LIBRARY_DIRS} )
set(EFREET_DEFINITIONS ${PC_LIBEFREET_CFLAGS_OTHER})
set(EFREET_LIBRARIES ${EFREET_LIBRARY})
set(EFREET_INCLUDE_DIRS ${PC_LIBEFREET_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set EFREET_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
EFREET_LIBRARIES EFREET_INCLUDE_DIRS)
mark_as_advanced(EFREET_INCLUDE_DIRS EFREET_LIBRARY EFREET_LIBRARIES EFREET_DEFINITIONS)

View File

@ -0,0 +1,32 @@
# - Try to find eina
# Once done this will define
# EINA_FOUND - System has eina
# EINA_INCLUDE_DIRS - The eina include directories
# EINA_LIBRARIES - The libraries needed to use eina
# EINA_DEFINITIONS - Compiler switches required for using eina
set(MY_PKG eina)
find_package(PkgConfig)
if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
# "QUIET" was introduced in 2.8.2
set(_QUIET QUIET)
endif ()
pkg_check_modules(PC_LIBEINA ${_QUIET} ${MY_PKG})
find_library(EINA_LIBRARY
NAMES ${PC_LIBEINA_LIBRARIES}
HINTS ${PC_LIBEINA_LIBDIR} ${PC_LIBEINA_LIBRARY_DIRS} )
set(EINA_DEFINITIONS ${PC_LIBEINA_CFLAGS_OTHER})
set(EINA_LIBRARIES ${EINA_LIBRARY})
set(EINA_INCLUDE_DIRS ${PC_LIBEINA_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set EINA_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
EINA_LIBRARIES EINA_INCLUDE_DIRS)
mark_as_advanced(EINA_INCLUDE_DIRS EINA_LIBRARY EINA_LIBRARIES EINA_DEFINITIONS)

View File

@ -0,0 +1,32 @@
# - Try to find eo
# Once done this will define
# EO_FOUND - System has eo
# EO_INCLUDE_DIRS - The eo include directories
# EO_LIBRARIES - The libraries needed to use eo
# EO_DEFINITIONS - Compiler switches required for using eo
set(MY_PKG eo)
find_package(PkgConfig)
if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
# "QUIET" was introduced in 2.8.2
set(_QUIET QUIET)
endif ()
pkg_check_modules(PC_LIBEO ${_QUIET} ${MY_PKG})
find_library(EO_LIBRARY
NAMES ${PC_LIBEO_LIBRARIES}
HINTS ${PC_LIBEO_LIBDIR} ${PC_LIBEO_LIBRARY_DIRS} )
set(EO_DEFINITIONS ${PC_LIBEO_CFLAGS_OTHER})
set(EO_LIBRARIES ${EO_LIBRARY})
set(EO_INCLUDE_DIRS ${PC_LIBEO_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set EO_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
EO_LIBRARIES EO_INCLUDE_DIRS)
mark_as_advanced(EO_INCLUDE_DIRS EO_LIBRARY EO_LIBRARIES EO_DEFINITIONS)

View File

@ -0,0 +1,32 @@
# - Try to find evas
# Once done this will define
# EVAS_FOUND - System has evas
# EVAS_INCLUDE_DIRS - The evas include directories
# EVAS_LIBRARIES - The libraries needed to use evas
# EVAS_DEFINITIONS - Compiler switches required for using evas
set(MY_PKG evas)
find_package(PkgConfig)
if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
# "QUIET" was introduced in 2.8.2
set(_QUIET QUIET)
endif ()
pkg_check_modules(PC_LIBEVAS ${_QUIET} ${MY_PKG})
find_library(EVAS_LIBRARY
NAMES ${PC_LIBEVAS_LIBRARIES}
HINTS ${PC_LIBEVAS_LIBDIR} ${PC_LIBEVAS_LIBRARY_DIRS} )
set(EVAS_DEFINITIONS ${PC_LIBEVAS_CFLAGS_OTHER})
set(EVAS_LIBRARIES ${EVAS_LIBRARY})
set(EVAS_INCLUDE_DIRS ${PC_LIBEVAS_INCLUDE_DIRS})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set EVAS_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
EVAS_LIBRARIES EVAS_INCLUDE_DIRS)
mark_as_advanced(EVAS_INCLUDE_DIRS EVAS_LIBRARY EVAS_LIBRARIES EVAS_DEFINITIONS)

View File

@ -3484,6 +3484,13 @@ pc/ethumb_client.pc
dbus-services/org.enlightenment.Efreet.service
dbus-services/org.enlightenment.Ethumb.service
$po_makefile_in
cmakeconfig/EinaConfig.cmake
cmakeconfig/EoConfig.cmake
cmakeconfig/EetConfig.cmake
cmakeconfig/EvasConfig.cmake
cmakeconfig/EcoreConfig.cmake
cmakeconfig/EdjeConfig.cmake
cmakeconfig/EfreetConfig.cmake
])
AC_OUTPUT