1############################################################################ 2# 3# Copyright 2010-2014 BMW Car IT GmbH 4# Copyright (C) 2011 DENSO CORPORATION and Robert Bosch Car Multimedia Gmbh 5# Copyright (C) 2018 Advanced Driver Information Technology Joint Venture GmbH 6# 7# 8# Licensed under the Apache License, Version 2.0 (the "License"); 9# you may not use this file except in compliance with the License. 10# You may obtain a copy of the License at 11# 12# http://www.apache.org/licenses/LICENSE-2.0 13# 14# Unless required by applicable law or agreed to in writing, software 15# distributed under the License is distributed on an "AS IS" BASIS, 16# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17# See the License for the specific language governing permissions and 18# limitations under the License. 19# 20############################################################################ 21 22cmake_minimum_required (VERSION 2.6) 23 24project(EGLWLMockNavigation) 25 26find_package(PkgConfig) 27pkg_check_modules(GLESv2 glesv2 REQUIRED) 28pkg_check_modules(EGL egl REQUIRED) 29pkg_check_modules(WAYLAND_EGL wayland-egl REQUIRED) 30pkg_check_modules(WAYLAND_CLIENT wayland-client REQUIRED) 31 32find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner) 33 34add_custom_command( 35 OUTPUT ivi-application-client-protocol.h 36 COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header 37 < ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml 38 > ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-client-protocol.h 39 DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml 40) 41 42add_custom_command( 43 OUTPUT ivi-application-protocol.c 44 COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code 45 < ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml 46 > ${CMAKE_CURRENT_BINARY_DIR}/ivi-application-protocol.c 47 DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml 48) 49 50include_directories( 51 include 52 ${CMAKE_CURRENT_BINARY_DIR} 53 ${GLESv2_INCLUDE_DIRS} 54 ${EGL_INCLUDE_DIRS} 55 ${WAYLAND_CLIENT_INCLUDE_DIRS} 56) 57 58link_directories( 59 ${GLESv2_LIBRARY_DIRS} 60 ${EGL_LIBRARY_DIRS} 61 ${WAYLAND_CLIENT_LIBRARY_DIRS} 62) 63 64 65set (HEADER_FILES 66 include/Camera.h 67 include/Car.h 68 include/Argument.h 69 include/OpenGLES2App.h 70 include/Ground.h 71 include/House.h 72 include/IRenderable.h 73 include/IUpdateable.h 74 include/MockNavi.h 75 include/Street.h 76 include/ShaderBase.h 77 include/ShaderLighting.h 78 include/TextureLoader.h 79 include/ShaderTexture.h 80 include/Sky.h 81 include/ShaderGradient.h 82) 83 84set (SRC_FILES 85 src/Camera.cpp 86 src/Car.cpp 87 src/Argument.cpp 88 src/OpenGLES2App.cpp 89 src/Ground.cpp 90 src/House.cpp 91 src/MockNavi.cpp 92 src/Street.cpp 93 src/ShaderBase.cpp 94 src/ShaderLighting.cpp 95 src/main.cpp 96 src/TextureLoader.cpp 97 src/ShaderTexture.cpp 98 src/Sky.cpp 99 src/ShaderGradient.cpp 100) 101 102add_executable(${PROJECT_NAME} 103 ${SRC_FILES} 104 ivi-application-protocol.c 105 ${HEADER_FILES} 106 ivi-application-client-protocol.h 107) 108 109 110set(LIBS 111 ${LIBS} 112 ${GLESv2_LIBRARIES} 113 ${WAYLAND_CLIENT_LIBRARIES} 114 ${WAYLAND_EGL_LIBRARIES} 115 ${EGL_LIBRARIES} 116) 117 118SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" ) 119 120add_dependencies(${PROJECT_NAME} 121 ${LIBS} 122) 123 124add_definitions(${EGL_CFLAGS}) 125 126target_link_libraries(${PROJECT_NAME} 127 ${LIBS} 128) 129 130install( 131 TARGETS ${PROJECT_NAME} 132 DESTINATION bin 133) 134 135SET(TEXTURES_DIR share/wayland-ivi-extension) 136 137install ( 138 DIRECTORY ${CMAKE_SOURCE_DIR}/ivi-layermanagement-examples/EGLWLMockNavigation/textures 139 DESTINATION ${TEXTURES_DIR} 140) 141 142configure_file(configuration.h.in configuration.h)