diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-22 10:08:11 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-22 10:08:11 +0100 |
commit | 1bd51b02d016260772da443c0ada990f3b2e21c8 (patch) | |
tree | 43472154428eb0a8929b0307b61eccf91c039d63 | |
parent | 7031f10aee0714f02ea3df2203730eb02584ccfc (diff) | |
download | uca-1bd51b02d016260772da443c0ada990f3b2e21c8.tar.gz uca-1bd51b02d016260772da443c0ada990f3b2e21c8.tar.bz2 uca-1bd51b02d016260772da443c0ada990f3b2e21c8.tar.xz uca-1bd51b02d016260772da443c0ada990f3b2e21c8.zip |
Enable/disable camera models on build time
-rw-r--r-- | src/CMakeLists.txt | 87 |
1 files changed, 32 insertions, 55 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index df1ed43..a9d38ae 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,83 +33,60 @@ find_package(Threads) # --- Build options ----------------------------------------------------------- -option(HAVE_DUMMY_CAMERA "Build a dummy camera model" OFF) +option(HAVE_DUMMY_CAMERA "Camera: Dummy" OFF) # --- Add sources if camera/framegrabber access sources are available --------- if (PF_FOUND) - set(HAVE_PHOTON_FOCUS TRUE) + option(HAVE_PHOTON_FOCUS "Camera: Photon Focus MV2-D1280-640-CL-8" ON) - set(uca_SRCS - ${uca_SRCS} - cameras/pf.c - ) - - set(uca_LIBS - ${uca_LIBS} - ${PF_LIBRARIES} - ) + if (HAVE_PHOTON_FOCUS) + set(uca_SRCS ${uca_SRCS} cameras/pf.c) + set(uca_LIBS ${uca_LIBS} ${PF_LIBRARIES}) - include_directories(${PF_INCLUDE_DIRS}) + include_directories(${PF_INCLUDE_DIRS}) + endif() endif() if (PCO_FOUND) - set(HAVE_PCO_EDGE TRUE) + option(HAVE_PCO_EDGE "Camera: pco.edge" ON) - set(uca_SRCS - ${uca_SRCS} - cameras/pco.c - ) + if (HAVE_PCO_EDGE) + set(uca_SRCS ${uca_SRCS} cameras/pco.c) + set(uca_LIBS ${uca_LIBS} ${PCO_LIBRARIES}) - set(uca_LIBS - ${uca_LIBS} - ${PCO_LIBRARIES} - ) - - include_directories(${PCO_INCLUDE_DIRS}) + include_directories(${PCO_INCLUDE_DIRS}) + endif() endif() if (IPE_FOUND) - set(HAVE_IPE_CAMERA TRUE) - - set(uca_SRCS - ${uca_SRCS} - cameras/ipe.c - ) + option(HAVE_IPE_CAMERA "Camera: Custom IPE based on Xilinx FPGA" ON) - set(uca_LIBS - ${uca_LIBS} - ${IPE_LIBRARIES} - ) + if (HAVE_IPE_CAMERA) + set(uca_SRC ${uca_SRCS} cameras/ipe.c) + set(uca_LIB ${uca_LIBS} ${IPE_LIBRARIES}) - include_directories(${IPE_INCLUDE_DIRS}) + include_directories(${IPE_INCLUDE_DIRS}) + endif() endif() if (CLSERME4_FOUND AND FGLIB5_FOUND) - set(HAVE_ME4 TRUE) - - set(uca_SRCS - ${uca_SRCS} - grabbers/me4.c - ) - - set(uca_LIBS - ${uca_LIBS} - ${CLSERME4_LIBRARY} - ${FGLIB5_LIBRARY} - ) - - include_directories( - ${CLSERME4_INCLUDE_DIR} - ${FGLIB5_INCLUDE_DIR} - ) + option(HAVE_ME4 "Grabber: Silicon Software microEnable IV" ON) + + if (HAVE_ME4) + set(uca_SRCS ${uca_SRCS} grabbers/me4.c) + set(uca_LIBS ${uca_LIBS} + ${CLSERME4_LIBRARY} + ${FGLIB5_LIBRARY}) + + include_directories( + ${CLSERME4_INCLUDE_DIR} + ${FGLIB5_INCLUDE_DIR}) + endif() endif() if (HAVE_DUMMY_CAMERA) - set(uca_SRCS - ${uca_SRCS} - cameras/dummy.c - ) + set(uca_SRCS ${uca_SRCS} cameras/dummy.c) endif() if (Threads_FOUND) |