summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>2015-09-11 12:04:45 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-09-14 16:51:21 +0100
commit5a491443a5008f58554f21e9c6f7ec1e66707a73 (patch)
treefb8b789e75d3a6033a234786275dcf254cf28829 /cmake
parentc6cace53426b5be7e56c0fd202118009689bc707 (diff)
cmake: Fix Waffle detection, by using pkg-config on non-Android.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindWaffle.cmake23
1 files changed, 14 insertions, 9 deletions
diff --git a/cmake/FindWaffle.cmake b/cmake/FindWaffle.cmake
index 03be9cfd..93836c65 100644
--- a/cmake/FindWaffle.cmake
+++ b/cmake/FindWaffle.cmake
@@ -10,28 +10,33 @@ if (ANDROID)
set (Waffle_LIB_SEARCH_PATH "$ENV{OUT}/obj/lib")
endif ()
-endif ()
- find_path (Waffle_INCLUDE_DIR waffle.h
+ find_path (Waffle_INCLUDE_DIRS waffle.h
PATHS ${Waffle_INC_SEARCH_PATH}
DOC "The directory where waffle.h resides"
NO_CMAKE_FIND_ROOT_PATH NO_DEFAULT_PATH
)
- find_library (Waffle_LIBRARY waffle-1
+ find_library (Waffle_LIBRARIES waffle-1
PATHS ${Waffle_LIB_SEARCH_PATH}
DOC "The directory where libwaffle-1 resides"
NO_CMAKE_FIND_ROOT_PATH NO_DEFAULT_PATH
)
- if (Waffle_INCLUDE_DIR AND Waffle_LIBRARY)
+ if (Waffle_INCLUDE_DIRS AND Waffle_LIBRARIES)
set (Waffle_FOUND 1)
- endif (Waffle_INCLUDE_DIR AND Waffle_LIBRARY)
+ endif (Waffle_INCLUDE_DIRS AND Waffle_LIBRARIES)
+else ()
+ find_package (PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ pkg_search_module (Waffle waffle-1)
+ endif ()
+endif ()
- mark_as_advanced (
- Waffle_INCLUDE_DIR
- Waffle_LIBRARY
- )
+mark_as_advanced (
+ Waffle_INCLUDE_DIRS
+ Waffle_LIBRARIES
+)
mark_as_advanced (
Waffle_FOUND