summaryrefslogtreecommitdiff
path: root/ivi-input-modules
diff options
context:
space:
mode:
authorEmre Ucan <eucan@de.adit-jv.com>2017-11-10 14:15:04 +0100
committerEmre Ucan <eucan@de.adit-jv.com>2017-11-10 15:34:25 +0100
commit9a4eabc1ee008f3dff8b75f1f302314f94ba813b (patch)
tree469e27d5055dc8a497abd80edd03c9bc8f6d9e7d /ivi-input-modules
parentc363946aa92bc04251d55fe8f79d438834bec4d0 (diff)
downloadwayland-ivi-extension-9a4eabc1ee008f3dff8b75f1f302314f94ba813b.tar.gz
ivi-input-module: don't link ivi-extension-protocol
We should not link the static library. It has source code for all wayland protocols. But we only need ivi-input protocol. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Diffstat (limited to 'ivi-input-modules')
-rw-r--r--ivi-input-modules/ivi-input-controller/CMakeLists.txt25
1 files changed, 21 insertions, 4 deletions
diff --git a/ivi-input-modules/ivi-input-controller/CMakeLists.txt b/ivi-input-modules/ivi-input-controller/CMakeLists.txt
index 5a3a96e..a1f2c9f 100644
--- a/ivi-input-modules/ivi-input-controller/CMakeLists.txt
+++ b/ivi-input-modules/ivi-input-controller/CMakeLists.txt
@@ -26,13 +26,30 @@ pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED)
pkg_check_modules(WESTON weston REQUIRED)
pkg_check_modules(PIXMAN pixman-1 REQUIRED)
-GET_TARGET_PROPERTY(IVI_EXTENSION_INCLUDE_DIRS ivi-extension-protocol INCLUDE_DIRECTORIES)
GET_TARGET_PROPERTY(ILM_COMMON_INCLUDE_DIRS ilmCommon INCLUDE_DIRECTORIES)
GET_TARGET_PROPERTY(IVI_CONTROLLER_INCLUDE_DIRS ivi-controller INCLUDE_DIRECTORIES)
+find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
+
+add_custom_command(
+ OUTPUT ivi-input-server-protocol.h
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header
+ < ${CMAKE_SOURCE_DIR}/protocol/ivi-input.xml
+ > ${CMAKE_CURRENT_BINARY_DIR}/ivi-input-server-protocol.h
+ DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-input.xml
+)
+
+add_custom_command(
+ OUTPUT ivi-input-protocol.c
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
+ < ${CMAKE_SOURCE_DIR}/protocol/ivi-input.xml
+ > ${CMAKE_CURRENT_BINARY_DIR}/ivi-input-protocol.c
+ DEPENDS ${CMAKE_SOURCE_DIR}/protocol/ivi-input.xml
+)
+
include_directories(
include
- ${IVI_EXTENSION_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_BINARY_DIR}
${ILM_COMMON_INCLUDE_DIRS}
${IVI_CONTROLLER_INCLUDE_DIRS}
${WAYLAND_SERVER_INCLUDE_DIRS}
@@ -49,12 +66,13 @@ link_directories(
add_library(${PROJECT_NAME} MODULE
src/ivi-input-controller.c
+ ivi-input-server-protocol.h
+ ivi-input-protocol.c
)
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
add_dependencies(${PROJECT_NAME}
- ivi-extension-protocol
ilmCommon
${WAYLAND_SERVER_LIBRARIES}
${WESTON_LIBRARIES}
@@ -63,7 +81,6 @@ add_dependencies(${PROJECT_NAME}
set(LIBS
${LIBS}
- ivi-extension-protocol
${WAYLAND_SERVER_LIBRARIES}
${WESTON_LIBRARIES}
)