summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>2014-01-31 12:33:57 +0100
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>2014-01-31 13:36:20 +0100
commit70833645706d167b351e1b0f65bfe8ec3da1efe9 (patch)
tree1f60966769a8cd45738cd802587b787812195250
parentc09f77106e85cd48478912443d7e4f53665abb6e (diff)
downloadwayland-ivi-extension-70833645706d167b351e1b0f65bfe8ec3da1efe9.tar.gz
detecting location of wayland-scanner binary
Signed-off-by: Timo Lotterbach <timo.lotterbach@bmw-carit.de>
-rw-r--r--ivi-layermanagement-api/ilmCommon/CMakeLists.txt10
-rw-r--r--weston-ivi-shell/CMakeLists.txt10
2 files changed, 12 insertions, 8 deletions
diff --git a/ivi-layermanagement-api/ilmCommon/CMakeLists.txt b/ivi-layermanagement-api/ilmCommon/CMakeLists.txt
index 19c98f2..92a4ee6 100644
--- a/ivi-layermanagement-api/ilmCommon/CMakeLists.txt
+++ b/ivi-layermanagement-api/ilmCommon/CMakeLists.txt
@@ -27,24 +27,26 @@ find_package(Threads)
find_package(PkgConfig REQUIRED)
pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED)
+find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
+
add_custom_command(
OUTPUT ivi-application-client-protocol.h
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner client-header <${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml> ${CMAKE_SOURCE_DIR}/ivi-layermanagement-api/ilmCommon/include/ivi-application-client-protocol.h
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header <${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml> ${CMAKE_SOURCE_DIR}/ivi-layermanagement-api/ilmCommon/include/ivi-application-client-protocol.h
)
add_custom_command(
OUTPUT ivi-application-protocol.c
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner code <${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml> ${CMAKE_SOURCE_DIR}/ivi-layermanagement-api/ilmCommon/src/ivi-application-protocol.c
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code <${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml> ${CMAKE_SOURCE_DIR}/ivi-layermanagement-api/ilmCommon/src/ivi-application-protocol.c
)
add_custom_command(
OUTPUT ivi-controller-client-protocol.h
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner client-header <${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml> ${CMAKE_SOURCE_DIR}/ivi-layermanagement-api/ilmCommon/include/ivi-controller-client-protocol.h
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header <${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml> ${CMAKE_SOURCE_DIR}/ivi-layermanagement-api/ilmCommon/include/ivi-controller-client-protocol.h
)
add_custom_command(
OUTPUT ivi-controller-protocol.c
- COMMAND ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner code <${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml> ${CMAKE_SOURCE_DIR}/ivi-layermanagement-api/ilmCommon/src/ivi-controller-protocol.c
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code <${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml> ${CMAKE_SOURCE_DIR}/ivi-layermanagement-api/ilmCommon/src/ivi-controller-protocol.c
)
add_custom_target(
diff --git a/weston-ivi-shell/CMakeLists.txt b/weston-ivi-shell/CMakeLists.txt
index e071747..fb39dfa 100644
--- a/weston-ivi-shell/CMakeLists.txt
+++ b/weston-ivi-shell/CMakeLists.txt
@@ -28,24 +28,26 @@ 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 ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner server-header <${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/include/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 ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner code <${CMAKE_SOURCE_DIR}/protocol/ivi-application.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/src/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 ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner server-header <${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/include/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 ${CMAKE_INSTALL_PREFIX}/bin/wayland-scanner code <${CMAKE_SOURCE_DIR}/protocol/ivi-controller.xml> ${CMAKE_SOURCE_DIR}/weston-ivi-shell/src/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(