diff options
author | Timo Lotterbach <timo.lotterbach@bmw-carit.de> | 2014-01-31 15:59:02 +0100 |
---|---|---|
committer | Timo Lotterbach <timo.lotterbach@bmw-carit.de> | 2014-01-31 15:59:02 +0100 |
commit | cdb466a9964496fb23cb014df82b2db3cd75c185 (patch) | |
tree | c4eb1a0f49f4b3696784a1dbbf8ce4dfc19dd923 /weston-ivi-shell/CMakeLists.txt | |
parent | 2f5d78a15960957ba8cdea0fa217c1b488012bfc (diff) | |
download | wayland-ivi-extension-cdb466a9964496fb23cb014df82b2db3cd75c185.tar.gz |
added ivi-extension-protocol library
this library takes care to generate header and source files
from XML files.
All generated files are now stored in the build directory.
ilmCommon and weston-ivi-shell now just use the new library and
don't care about code generation any more.
In addition, a lot of duplicated code compilation is removed, resulting
in faster builds.
This patch also fixes an issue, that file generation was done every
time a build was started. This resulted in full rebuilds all the time.
Signed-off-by: Timo Lotterbach <timo.lotterbach@bmw-carit.de>
Diffstat (limited to 'weston-ivi-shell/CMakeLists.txt')
-rw-r--r-- | weston-ivi-shell/CMakeLists.txt | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/weston-ivi-shell/CMakeLists.txt b/weston-ivi-shell/CMakeLists.txt index 92807ec..4cf9295 100644 --- a/weston-ivi-shell/CMakeLists.txt +++ b/weston-ivi-shell/CMakeLists.txt @@ -1,6 +1,7 @@ ############################################################################ # # Copyright (C) 2013 DENSO CORPORATION +# Copyright 2014 BMW Car IT GmbH # # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,35 +28,11 @@ pkg_check_modules(CAIRO cairo REQUIRED) pkg_check_modules(WESTON weston REQUIRED) pkg_check_modules(PIXMAN pixman-1 REQUIRED) -find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner) - -add_custom_command( - OUTPUT ivi-application-server-protocol.h - COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header <${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/include/ivi-application-server-protocol.h -) - -add_custom_command( - OUTPUT ivi-application-protocol.c - COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code <${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/src/ivi-application-protocol.c -) - -add_custom_command( - OUTPUT ivi-controller-server-protocol.h - COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header <${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/include/ivi-controller-server-protocol.h -) - -add_custom_command( - OUTPUT ivi-controller-protocol.c - COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code <${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/src/ivi-controller-protocol.c -) - -add_custom_target( - generate_wayland_protocol_codes_for_server - DEPENDS ivi-application-server-protocol.h ivi-application-protocol.c ivi-controller-server-protocol.h ivi-controller-protocol.c -) +GET_TARGET_PROPERTY(IVI_EXTENSION_INCLUDE_DIRS ivi-extension-protocol INCLUDE_DIRECTORIES) include_directories( - "include" + include + ${IVI_EXTENSION_INCLUDE_DIRS} ${WAYLAND_SERVER_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${WESTON_INCLUDE_DIRS} @@ -65,13 +42,12 @@ include_directories( add_library(${PROJECT_NAME} MODULE src/ivi-controller.c - src/ivi-controller-protocol.c ) set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") add_dependencies(${PROJECT_NAME} - generate_wayland_protocol_codes_for_server + ivi-extension-protocol ${WAYLAND_SERVER_LIBRARIES} ${CAIRO_LIBRARIES} ${PIXMAN_LIBRARIES} @@ -80,14 +56,13 @@ add_dependencies(${PROJECT_NAME} set(LIBS ${LIBS} - rt - dl + ivi-extension-protocol ${WAYLAND_SERVER_LIBRARIES} ${CAIRO_LIBRARIES} ${WESTON_LIBRARIES} ) -target_link_libraries(${PROJECT_NAME} ${LIBS} -ldl) +target_link_libraries(${PROJECT_NAME} ${LIBS}) install ( TARGETS ${PROJECT_NAME} |