cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5c4fdf7e4cb0512694f53c8d30f8b57605e3b793

commit 5c4fdf7e4cb0512694f53c8d30f8b57605e3b793
Author: Marcel Hollerbach <[email protected]>
Date:   Wed Mar 18 11:29:41 2015 +0100

    efreet: add cmake support for components.
    
    Summary:
    Add support for components in the efreet config. You can now add trash and 
mime.
    
    Reviewers: tasn
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2178
    
    Signed-off-by: Cedric BAIL <[email protected]>
---
 cmakeconfig/EfreetConfig.cmake.in | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/cmakeconfig/EfreetConfig.cmake.in 
b/cmakeconfig/EfreetConfig.cmake.in
index cb39d97..c650e39 100644
--- a/cmakeconfig/EfreetConfig.cmake.in
+++ b/cmakeconfig/EfreetConfig.cmake.in
@@ -30,3 +30,25 @@ find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
 
 mark_as_advanced(EFREET_INCLUDE_DIRS EFREET_LIBRARY EFREET_LIBRARIES 
EFREET_DEFINITIONS)
 
+if (Efreet_FIND_COMPONENTS)
+   foreach(_component ${Efreet_FIND_COMPONENTS})
+
+      string(TOUPPER ${_component} _COMPONENT)
+      string(TOLOWER ${_component} _component)
+      string(REGEX REPLACE "_" "-" _PKG_NAME "efreet-${_component}")
+
+      pkg_check_modules(PC_LIBEFREET_${_COMPONENT} ${_QUIET} ${_PKG_NAME})
+
+      find_library(EFREET_${_COMPONENT}_LIBRARY
+         NAMES ${PC_LIBEFREET_${_COMPONENT}_LIBRARIES}
+         HINTS ${PC_LIBEFREET_${_COMPONENT}_LIBDIR}
+               ${PC_LIBEFREET_${_COMPONENT}_LIBRARY_DIRS} )
+
+      set(EFREET_${_COMPONENT}_DEFINITIONS 
${PC_LIBEFREET_${_COMPONENT}_CFLAGS_OTHER})
+      set(EFREET_${_COMPONENT}_LIBRARIES ${EFREET_${_COMPONENT}_LIBRARY})
+      set(EFREET_${_COMPONENT}_INCLUDE_DIRS 
${PC_LIBEFREET_${_COMPONENT}_INCLUDE_DIRS})
+
+      find_package_handle_standard_args(efreet_${_component} DEFAULT_MSG
+         EFREET_${_COMPONENT}_LIBRARIES EFREET_${_COMPONENT}_INCLUDE_DIRS)
+    endforeach(_component)
+endif(Efreet_FIND_COMPONENTS)

-- 


Reply via email to