From aaa9488c5681a2d3dd12cc1a5275164ae6d5ab63 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Mon, 14 Mar 2011 12:08:10 +0100 Subject: Make dummy camera optional --- src/CMakeLists.txt | 13 +++++++++++-- src/config.h.in | 2 ++ src/uca.c | 5 +++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7a69ed4..55cc2af 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,14 +9,12 @@ set(uca_SRCS uca.c uca-cam.c uca-grabber.c - cameras/dummy.c ) set(uca_HDRS uca.h uca-cam.h uca-grabber.h - cameras/dummy.h ) set(uca_LIBS "") @@ -38,6 +36,10 @@ find_package(SWIG) find_package(PythonLibs) +# --- Build options ----------------------------------------------------------- +option(HAVE_DUMMY_CAMERA "Build a dummy camera model" OFF) + + # --- Add sources if camera/framegrabber access sources are available --------- if (PF_FOUND) set(HAVE_PHOTON_FOCUS TRUE) @@ -116,6 +118,13 @@ if(CLSERME4_FOUND AND FGLIB5_FOUND) ) endif() +if(HAVE_DUMMY_CAMERA) + set(uca_SRCS + ${uca_SRCS} + cameras/dummy.c + ) +endif() + # --- Configure step configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) diff --git a/src/config.h.in b/src/config.h.in index 5bd20c1..58d975d 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -5,3 +5,5 @@ #cmakedefine HAVE_PHOTON_FOCUS #cmakedefine HAVE_PHOTRON_FASTCAM #cmakedefine HAVE_IPE_CAMERA + +#cmakedefine HAVE_DUMMY_CAMERA diff --git a/src/uca.c b/src/uca.c index 6662f3d..cf6e5ec 100644 --- a/src/uca.c +++ b/src/uca.c @@ -5,7 +5,10 @@ #include "uca.h" #include "uca-cam.h" #include "uca-grabber.h" + +#ifdef HAVE_DUMMY_CAMERA #include "cameras/dummy.h" +#endif #ifdef HAVE_ME4 #include "grabbers/me4.h" @@ -108,7 +111,9 @@ struct uca_t *uca_init(void) #ifdef HAVE_PH uca_photron_init, #endif +#ifdef HAVE_DUMMY_CAMERA uca_dummy_init, +#endif NULL }; -- cgit v1.2.3