From 8886118518a1e6eea204bd13d0ba74125b6b2a6a Mon Sep 17 00:00:00 2001 From: Olivier Schonken Date: Sun, 23 Apr 2017 20:58:21 +0200 Subject: [PATCH] Fix CMake building of MMAL driver for RaspberryPi Added libraries, include directories and extra source files to enable a succesfull cross-compile with CMake. Signed-off-by: Olivier Schonken --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b201105..3b6e3517 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,11 @@ if(WITH_SQLITE3) endif(WITH_SQLITE3) if(WITH_MMAL) find_package(MMAL REQUIRED) - list(APPEND SRC_FILES mmalcam.c) + include_directories(${MMAL_INCLUDE_DIRS}) + list(APPEND SRC_FILES mmalcam.c raspicam/RaspiCamControl.c raspicam/RaspiCLI.c) + list(APPEND LINK_LIBRARIES ${MMAL_LIBRARIES}) + list(APPEND LINK_LIBRARIES vcos vchostif vcilcs) + endif(WITH_MMAL) message("-- Configuration: " )