diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-14 12:08:10 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-14 12:08:10 +0100 |
commit | aaa9488c5681a2d3dd12cc1a5275164ae6d5ab63 (patch) | |
tree | cfea503e374b0bc80e0dc7dcd8e3a80ad2713aa8 /src | |
parent | 0e40d8791f5fa2081a76fa9a03bef6e189dbec0e (diff) | |
download | uca-aaa9488c5681a2d3dd12cc1a5275164ae6d5ab63.tar.gz uca-aaa9488c5681a2d3dd12cc1a5275164ae6d5ab63.tar.bz2 uca-aaa9488c5681a2d3dd12cc1a5275164ae6d5ab63.tar.xz uca-aaa9488c5681a2d3dd12cc1a5275164ae6d5ab63.zip |
Make dummy camera optional
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 13 | ||||
-rw-r--r-- | src/config.h.in | 2 | ||||
-rw-r--r-- | 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 @@ -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 }; |