misc: added run-cmake.sh.
[profile/ivi/genivi/genivi-audio-manager.git] / cmake / FindMURPHY.cmake
1 ############################################################################
2 #
3 # Copyright 2014 Intel
4 #
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #               http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18 ############################################################################
19
20 FIND_PATH(MURPHY_INCLUDE_DIR murphy/common.h
21 /usr/include
22 )
23
24 FIND_LIBRARY(MURPHY_LIBRARY
25 NAMES murphy-common
26 PATHS /lib
27 )
28
29 FIND_LIBRARY(DOMCTL_LIBRARY
30 NAMES murphy-domain-controller
31 PATHS /lib
32 )
33
34 FIND_LIBRARY(MURPHY_DBUS_LIBRARY
35 NAMES murphy-dbus-libdbus
36 PATHS /lib
37 )
38
39 SET( MURPHY_FOUND "NO" )
40
41 IF(MURPHY_LIBRARY)
42     IF(DOMCTL_LIBRARY)
43         IF(MURPHY_DBUS_LIBRARY)
44           SET( MURPHY_FOUND "YES" )
45           SET( MURPHY_LIBRARY "${DOMCTL_LIBRARY}" "${MURPHY_LIBRARY}" "${MURPHY_DBUS_LIBRARY}")
46           message(STATUS "Found MURPHY libs: ${MURPHY_LIBRARY}")
47           message(STATUS "Found MURPHY include: ${MURPHY_INCLUDE_DIR}")
48       ENDIF(MURPHY_DBUS_LIBRARY)
49   ENDIF(DOMCTL_LIBRARY)
50 ENDIF(MURPHY_LIBRARY)
51
52 MARK_AS_ADVANCED(
53   MURPHY_INCLUDE_DIR
54   MURPHY_LIBRARY
55 )