forked from enlightenment/efl
Elementary: 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: 83639
This commit is contained in:
parent
32665325e0
commit
f6e4492eb4
|
@ -73,6 +73,9 @@ config.rpath
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = elementary.pc
|
pkgconfig_DATA = elementary.pc
|
||||||
|
|
||||||
|
cmakeconfigdir = $(prefix)/share/cmake/Modules
|
||||||
|
cmakeconfig_DATA = cmakeconfig/ElementaryConfig.cmake
|
||||||
|
|
||||||
.PHONY: doc screenshots
|
.PHONY: doc screenshots
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
# - Try to find elementary
|
||||||
|
# Once done this will define
|
||||||
|
# ELEMENTARY_FOUND - System has elementary
|
||||||
|
# ELEMENTARY_INCLUDE_DIRS - The elementary include directories
|
||||||
|
# ELEMENTARY_LIBRARIES - The libraries needed to use elementary
|
||||||
|
# ELEMENTARY_DEFINITIONS - Compiler switches required for using elementary
|
||||||
|
|
||||||
|
set(MY_PKG elementary)
|
||||||
|
|
||||||
|
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_LIBELEMENTARY ${_QUIET} ${MY_PKG})
|
||||||
|
|
||||||
|
find_library(ELEMENTARY_LIBRARY
|
||||||
|
NAMES ${PC_LIBELEMENTARY_LIBRARIES}
|
||||||
|
HINTS ${PC_LIBELEMENTARY_LIBDIR} ${PC_LIBELEMENTARY_LIBRARY_DIRS} )
|
||||||
|
|
||||||
|
set(ELEMENTARY_DEFINITIONS ${PC_LIBELEMENTARY_CFLAGS_OTHER})
|
||||||
|
set(ELEMENTARY_LIBRARIES ${ELEMENTARY_LIBRARY})
|
||||||
|
set(ELEMENTARY_INCLUDE_DIRS ${PC_LIBELEMENTARY_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set ELEMENTARY_FOUND to TRUE
|
||||||
|
# if all listed variables are TRUE
|
||||||
|
find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
|
||||||
|
ELEMENTARY_LIBRARIES ELEMENTARY_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
mark_as_advanced(ELEMENTARY_INCLUDE_DIRS ELEMENTARY_LIBRARY ELEMENTARY_LIBRARIES ELEMENTARY_DEFINITIONS)
|
||||||
|
|
|
@ -829,6 +829,7 @@ config/default/Makefile
|
||||||
config/standard/Makefile
|
config/standard/Makefile
|
||||||
config/mobile/Makefile
|
config/mobile/Makefile
|
||||||
$po_makefile_in
|
$po_makefile_in
|
||||||
|
cmakeconfig/ElementaryConfig.cmake
|
||||||
])
|
])
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
Loading…
Reference in New Issue