summaryrefslogtreecommitdiff
path: root/weston-ivi-shell
diff options
context:
space:
mode:
authorEmre Ucan <eucan@de.adit-jv.com>2017-11-10 14:57:31 +0100
committerEmre Ucan <eucan@de.adit-jv.com>2017-11-10 15:34:25 +0100
commit2c9f880d5abafb1743cc943c84354b5a20a1602b (patch)
tree854821cb03aebd9ce431de84ace06d21f9355381 /weston-ivi-shell
parent968e245415c3b168c2c7a8a86e2f0e72ab95608b (diff)
downloadwayland-ivi-extension-2c9f880d5abafb1743cc943c84354b5a20a1602b.tar.gz
ivi-controller: don't link ivi-extension-protocol
Instead generate wayland protocol files Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Diffstat (limited to 'weston-ivi-shell')
-rw-r--r--weston-ivi-shell/CMakeLists.txt43
1 files changed, 38 insertions, 5 deletions
diff --git a/weston-ivi-shell/CMakeLists.txt b/weston-ivi-shell/CMakeLists.txt
index 0288b58..67c7793 100644
--- a/weston-ivi-shell/CMakeLists.txt
+++ b/weston-ivi-shell/CMakeLists.txt
@@ -27,6 +27,40 @@ pkg_check_modules(WAYLAND_SERVER wayland-server>=1.13.0 REQUIRED)
pkg_check_modules(WESTON weston>=2.0.0 REQUIRED)
pkg_check_modules(PIXMAN pixman-1 REQUIRED)
+find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
+
+add_custom_command(
+ OUTPUT ivi-wm-server-protocol.h
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header
+ < ${CMAKE_SOURCE_DIR}/protocol/ivi-wm.xml
+ > ${CMAKE_CURRENT_BINARY_DIR}/ivi-wm-server-protocol.h
+ DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-wm.xml
+)
+
+add_custom_command(
+ OUTPUT ivi-wm-protocol.c
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
+ < ${CMAKE_SOURCE_DIR}/protocol/ivi-wm.xml
+ > ${CMAKE_CURRENT_BINARY_DIR}/ivi-wm-protocol.c
+ DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-wm.xml
+)
+
+add_custom_command(
+ OUTPUT ivi-share-server-protocol.h
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header
+ < ${CMAKE_SOURCE_DIR}/protocol/ivi-share.xml
+ > ${CMAKE_CURRENT_BINARY_DIR}/ivi-share-server-protocol.h
+ DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-share.xml
+)
+
+add_custom_command(
+ OUTPUT ivi-share-protocol.c
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
+ < ${CMAKE_SOURCE_DIR}/protocol/ivi-share.xml
+ > ${CMAKE_CURRENT_BINARY_DIR}/ivi-share-protocol.c
+ DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-share.xml
+)
+
find_package(Threads REQUIRED)
if (IVI_SHARE)
pkg_check_modules(GBM gbm REQUIRED)
@@ -35,6 +69,8 @@ if (IVI_SHARE)
SET(BUFFER_SHARING_SRC_FILES
src/ivi-share.c
src/ivi-share-gbm.c
+ ivi-share-protocol.c
+ ivi-share-server-protocol.h
)
endif (IVI_SHARE)
@@ -44,12 +80,9 @@ CHECK_FUNCTION_EXISTS(posix_fallocate HAVE_POSIX_FALLOCATE)
configure_file(src/config.h.cmake config.h)
-GET_TARGET_PROPERTY(IVI_EXTENSION_INCLUDE_DIRS ivi-extension-protocol INCLUDE_DIRECTORIES)
-
include_directories(
src
${CMAKE_CURRENT_BINARY_DIR}
- ${IVI_EXTENSION_INCLUDE_DIRS}
${WAYLAND_SERVER_INCLUDE_DIRS}
${WESTON_INCLUDE_DIRS}
${PIXMAN_INCLUDE_DIRS}
@@ -63,20 +96,20 @@ link_directories(
add_library(${PROJECT_NAME} MODULE
src/ivi-controller.c
+ ivi-wm-protocol.c
+ ivi-wm-server-protocol.h
${BUFFER_SHARING_SRC_FILES}
)
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
add_dependencies(${PROJECT_NAME}
- ivi-extension-protocol
${WAYLAND_SERVER_LIBRARIES}
${PIXMAN_LIBRARIES}
)
set(LIBS
${LIBS}
- ivi-extension-protocol
${WAYLAND_SERVER_LIBRARIES}
)