1 ############################################################################
3 # Copyright (C) 2013 DENSO CORPORATION
4 # Copyright 2014 BMW Car IT GmbH
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 ############################################################################
21 cmake_minimum_required (VERSION 2.6)
23 project(ivi-controller)
25 find_package(PkgConfig REQUIRED)
26 pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED)
27 pkg_check_modules(CAIRO cairo REQUIRED)
28 pkg_check_modules(WESTON weston REQUIRED)
29 pkg_check_modules(PIXMAN pixman-1 REQUIRED)
31 GET_TARGET_PROPERTY(IVI_EXTENSION_INCLUDE_DIRS ivi-extension-protocol INCLUDE_DIRECTORIES)
35 ${IVI_EXTENSION_INCLUDE_DIRS}
36 ${WAYLAND_SERVER_INCLUDE_DIRS}
38 ${WESTON_INCLUDE_DIRS}
39 ${PIXMAN_INCLUDE_DIRS}
40 ${WESTON_INCLUDE_DIRS}/weston
44 ${WAYLAND_SERVER_LIBRARY_DIRS}
46 ${WESTON_LIBRARY_DIRS}
47 ${PIXMAN_LIBRARY_DIRS}
48 ${WESTON_LIBDIR}/weston
52 add_library(${PROJECT_NAME} MODULE
56 set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
58 add_dependencies(${PROJECT_NAME}
59 ivi-extension-protocol
60 ${WAYLAND_SERVER_LIBRARIES}
68 ivi-extension-protocol
69 ${WAYLAND_SERVER_LIBRARIES}
74 set(CMAKE_C_LDFLAGS "-module -avoid-version")
76 target_link_libraries(${PROJECT_NAME} ${LIBS})
79 TARGETS ${PROJECT_NAME}
80 LIBRARY DESTINATION lib/weston