1############################################################################### 2# 3# Copyright (C) 2017 Advanced Driver Information Technology Joint Venture GmbH 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 20cmake_minimum_required (VERSION 2.6) 21 22project(ivi-id-agent) 23 24find_package(PkgConfig REQUIRED) 25pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED) 26pkg_check_modules(WESTON weston>=6.0.0 REQUIRED) 27pkg_check_modules(PIXMAN pixman-1 REQUIRED) 28pkg_check_modules(LIBWESTON_DESKTOP libweston-desktop-6 REQUIRED) 29 30find_package(Threads REQUIRED) 31 32include_directories( 33 src 34 ${WAYLAND_SERVER_INCLUDE_DIRS} 35 ${WESTON_INCLUDE_DIRS} 36 ${PIXMAN_INCLUDE_DIRS} 37) 38 39link_directories( 40 ${WAYLAND_SERVER_LIBRARY_DIRS} 41 ${PIXMAN_LIBRARY_DIRS} 42) 43 44 45add_library(${PROJECT_NAME} MODULE 46 src/ivi-id-agent.c 47) 48 49set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") 50 51add_dependencies(${PROJECT_NAME} 52 ${WAYLAND_SERVER_LIBRARIES} 53 ${PIXMAN_LIBRARIES} 54) 55 56set(LIBS 57 ${LIBS} 58 ${WAYLAND_SERVER_LIBRARIES} 59 ${LIBWESTON_DESKTOP_LIBRARIES} 60) 61 62set(CMAKE_C_LDFLAGS "-module -avoid-version") 63 64target_link_libraries(${PROJECT_NAME} ${LIBS}) 65 66install ( 67 TARGETS ${PROJECT_NAME} 68 LIBRARY DESTINATION lib${LIB_SUFFIX}/weston 69) 70