1 ############################################################################
3 # Copyright (C) 2013 DENSO CORPORATION
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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.
18 ############################################################################
20 cmake_minimum_required (VERSION 2.6)
22 project(ivi-controller)
25 find_package(Cairo REQUIRED)
26 find_package(Wayland REQUIRED)
27 find_package(Weston REQUIRED)
28 find_package(Pixman REQUIRED)
31 OUTPUT ivi-application-server-protocol.h
32 COMMAND ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner server-header <${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/include/ivi-application-server-protocol.h
36 OUTPUT ivi-application-protocol.c
37 COMMAND ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner code <${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/src/ivi-application-protocol.c
41 OUTPUT ivi-controller-server-protocol.h
42 COMMAND ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner server-header <${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/include/ivi-controller-server-protocol.h
46 OUTPUT ivi-controller-protocol.c
47 COMMAND ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner code <${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/src/ivi-controller-protocol.c
51 generate_wayland_protocol_codes_for_server
52 DEPENDS ivi-application-server-protocol.h ivi-application-protocol.c ivi-controller-server-protocol.h ivi-controller-protocol.c
57 ${WAYLAND_SERVER_INCLUDE_DIR}
64 add_library(${PROJECT_NAME} MODULE
66 src/ivi-controller-protocol.c
69 set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
71 add_dependencies(${PROJECT_NAME}
72 generate_wayland_protocol_codes_for_server
73 ${WAYLAND_SERVER_LIBRARIES}
83 ${WAYLAND_SERVER_LIBRARIES}
88 target_link_libraries(${PROJECT_NAME} ${LIBS} -ldl)
91 TARGETS ${PROJECT_NAME}
92 LIBRARY DESTINATION lib/weston