diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a95c13e7f1b79a2fe4c746a787757de1c97be01..14416f811ab0142ad5acb5eaa737ea11c0e336cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ if(COMMAND cmake_policy) endif(COMMAND cmake_policy) # The project name and the type of project -PROJECT(firewire) +PROJECT(firewire_camera) SET(CPACK_PACKAGE_VERSION "1.0.0") SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MINOR "0") diff --git a/Findfirewire.cmake b/Findfirewire.cmake deleted file mode 100644 index e9bc80bfb7af57d4e33dcd04fdaec58a72cde18a..0000000000000000000000000000000000000000 --- a/Findfirewire.cmake +++ /dev/null @@ -1,23 +0,0 @@ -FIND_PATH(firewire_INCLUDE_DIR firewirecamera.h firewireserver.h firewireexceptions.h /usr/include/iri/firewire /usr/local/include/iri/firewire) - -FIND_LIBRARY(firewire_LIBRARY - NAMES firewire - PATHS /usr/lib /usr/lib/iri/firewire /usr/local/lib /usr/local/lib/iri/firewire) - -SET(firewire_INCLUDE_DIRS ${firewire_INCLUDE_DIR}) -SET(firewire_LIBRARIES ${firewire_LIBRARY}) - -IF (firewire_INCLUDE_DIR AND firewire_LIBRARY) - SET(firewire_FOUND TRUE) -ENDIF (firewire_INCLUDE_DIR AND firewire_LIBRARY) - -IF (firewire_FOUND) - IF (NOT firewire_FIND_QUIETLY) - MESSAGE(STATUS "Found firewire camera driver: ${firewire_LIBRARY}") - ENDIF (NOT firewire_FIND_QUIETLY) -ELSE (firewire_FOUND) - IF (firewire_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find firewire camera driver") - ENDIF (firewire_FIND_REQUIRED) -ENDIF (firewire_FOUND) - diff --git a/Findfirewire_camera.cmake b/Findfirewire_camera.cmake new file mode 100644 index 0000000000000000000000000000000000000000..91da690e617aabf4a07e52143557be8863766632 --- /dev/null +++ b/Findfirewire_camera.cmake @@ -0,0 +1,22 @@ +FIND_PATH(firewire_camera_INCLUDE_DIRS firewirecamera.h firewireserver.h firewireexceptions.h /usr/include/iri/firewire_camera /usr/local/include/iri/firewire_camera) + +FIND_LIBRARY(firewire_camera_LIBRARIES + NAMES firewire_camera + PATHS /usr/lib /usr/lib/iri/firewire_camera /usr/local/lib /usr/local/lib/iri/firewire_camera) + +SET(firewire_camera_INCLUDE_DIR ${firewire_camera_INCLUDE_DIRS}) +SET(firewire_camera_LIBRARY ${firewire_camera_LIBRARIES}) + +IF (firewire_camera_INCLUDE_DIRS AND firewire_camera_LIBRARIES) + SET(firewire_camera_FOUND TRUE) +ENDIF (firewire_camera_INCLUDE_DIRS AND firewire_camera_LIBRARIES) + +IF (firewire_camera_FOUND) + IF (NOT firewire_camera_FIND_QUIETLY) + MESSAGE(STATUS "Found firewire_camera camera driver: ${firewire_camera_LIBRARIES}") + ENDIF (NOT firewire_camera_FIND_QUIETLY) +ELSE (firewire_camera_FOUND) + IF (firewire_camera_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find firewire_camera camera driver") + ENDIF (firewire_camera_FIND_REQUIRED) +ENDIF (firewire_camera_FOUND) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 90974a829c6e1983b1c4ea3f55e3ddea950ff73c..ff87686adfdae79501f2191700e5ff6e7c761c63 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,36 +23,36 @@ endif(OpenCV_FOUND) FIND_PACKAGE(iriutils REQUIRED) # try to find the raw1394 dc1394 2.0 library -FIND_PATH(raw1394_INCLUDE_DIR libraw1394/raw1394.h /usr/include /usr/local/include) -FIND_PATH(dc1394_INCLUDE_DIR dc1394/control.h /usr/include /usr/local/include) +FIND_PATH(raw1394_INCLUDE_DIRS libraw1394/raw1394.h /usr/include /usr/local/include) +FIND_PATH(dc1394_INCLUDE_DIRS dc1394/control.h /usr/include /usr/local/include) -FIND_LIBRARY(raw1394_LIBRARY +FIND_LIBRARY(raw1394_LIBRARIES NAMES raw1394 PATHS /usr/lib /usr/local/lib) -FIND_LIBRARY(dc1394_LIBRARY +FIND_LIBRARY(dc1394_LIBRARIES NAMES dc1394 PATHS /usr/lib /usr/local/lib) -IF (raw1394_INCLUDE_DIR AND raw1394_LIBRARY AND dc1394_INCLUDE_DIR AND dc1394_LIBRARY) - SET(firewire_ready TRUE) -ENDIF (raw1394_INCLUDE_DIR AND raw1394_LIBRARY AND dc1394_INCLUDE_DIR AND dc1394_LIBRARY) +IF (raw1394_INCLUDE_DIRS AND raw1394_LIBRARIES AND dc1394_INCLUDE_DIRS AND dc1394_LIBRARIES) + SET(firewire_camera_ready TRUE) +ENDIF (raw1394_INCLUDE_DIRS AND raw1394_LIBRARIES AND dc1394_INCLUDE_DIRS AND dc1394_LIBRARIES) -IF (firewire_ready) +IF (firewire_camera_ready) MESSAGE(STATUS "The system is libdc 2.0 capable") # add all the necessary include directories (project_name_INDLUDE_DIR) - INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIR} ${dc1394_INCLUDE_DIR} ${raw1394_INCLUDE_DIR} .) + INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIR} ${dc1394_INCLUDE_DIRS} ${raw1394_INCLUDE_DIRS} .) - ADD_LIBRARY(firewire SHARED ${sources}) + ADD_LIBRARY(firewire_camera SHARED ${sources}) #if CV then add the libraries if (USE_CV) - TARGET_LINK_LIBRARIES(firewire ${OpenCV_LIBS} ${iriutils_LIBRARY} ${dc1394_LIBRARY} ${raw1394_LIBRARY}) + TARGET_LINK_LIBRARIES(firewire_camera ${OpenCV_LIBS} ${iriutils_LIBRARY} ${dc1394_LIBRARIES} ${raw1394_LIBRARIES}) INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS}) else(USE_CV) - TARGET_LINK_LIBRARIES(firewire ${iriutils_LIBRARY} ${dc1394_LIBRARY} ${raw1394_LIBRARY}) + TARGET_LINK_LIBRARIES(firewire_camera ${iriutils_LIBRARY} ${dc1394_LIBRARIES} ${raw1394_LIBRARIES}) endif(USE_CV) - INSTALL(TARGETS firewire + INSTALL(TARGETS firewire_camera RUNTIME DESTINATION bin LIBRARY DESTINATION lib/iri/${PROJECT_NAME} ARCHIVE DESTINATION lib/iri/${PROJECT_NAME} @@ -60,10 +60,10 @@ IF (firewire_ready) INSTALL(FILES ${headers} DESTINATION include/iri/${PROJECT_NAME}) - INSTALL(FILES ../Findfirewire.cmake DESTINATION ${CMAKE_ROOT}/Modules/) + INSTALL(FILES ../Findfirewire_camera.cmake DESTINATION ${CMAKE_ROOT}/Modules/) ADD_SUBDIRECTORY(examples) -ELSE (firewire_ready) +ELSE (firewire_camera_ready) MESSAGE(FATAL_ERROR "The system is not libdc 2.0 capable") -ENDIF (firewire_ready) +ENDIF (firewire_camera_ready) diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt index 9912e94cb4022ff0ec6fbf01cf56e8f14173e61b..4e835e1489afc8565731ad428530586bbfee6757 100644 --- a/src/examples/CMakeLists.txt +++ b/src/examples/CMakeLists.txt @@ -3,41 +3,41 @@ # edit the following line to add the source code for the example and the name of the executable ADD_EXECUTABLE(firewire_console firewire_console.cpp) # edit the following line to add the necessary libraries -TARGET_LINK_LIBRARIES(firewire_console ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire pthread) +TARGET_LINK_LIBRARIES(firewire_console ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire_camera pthread) # edit the following line to add the source code for the example and the name of the executable ADD_EXECUTABLE(firewire_oneshot firewire_camera_oneshot.cpp) # edit the following line to add the necessary libraries -TARGET_LINK_LIBRARIES(firewire_oneshot ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire pthread) +TARGET_LINK_LIBRARIES(firewire_oneshot ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire_camera pthread) # edit the following line to add the source code for the example and the name of the executable ADD_EXECUTABLE(firewire_cont firewire_camera_cont.cpp) # edit the following line to add the necessary libraries -TARGET_LINK_LIBRARIES(firewire_cont ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire pthread) +TARGET_LINK_LIBRARIES(firewire_cont ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire_camera pthread) # edit the following line to add the source code for the example and the name of the executable ADD_EXECUTABLE(firewire_2camera firewire_2camera.cpp) # edit the following line to add the necessary libraries -TARGET_LINK_LIBRARIES(firewire_2camera ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire pthread) +TARGET_LINK_LIBRARIES(firewire_2camera ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire_camera pthread) # edit the following line to add the source code for the example and the name of the executable ADD_EXECUTABLE(bumblebee bumblebee.cpp) # edit the following line to add the necessary libraries -TARGET_LINK_LIBRARIES(bumblebee ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire pthread) +TARGET_LINK_LIBRARIES(bumblebee ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire_camera pthread) # edit the following line to add the source code for the example and the name of the executable ADD_EXECUTABLE(ptg_camera ptg_camera.cpp) # edit the following line to add the necessary libraries -TARGET_LINK_LIBRARIES(ptg_camera ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire pthread) +TARGET_LINK_LIBRARIES(ptg_camera ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire_camera pthread) # edit the following line to add the source code for the example and the name of the executable ADD_EXECUTABLE(ladybug ladybug.cpp) # edit the following line to add the necessary libraries -TARGET_LINK_LIBRARIES(ladybug ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire pthread) +TARGET_LINK_LIBRARIES(ladybug ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire_camera pthread) if (USE_CV) # edit the following line to add the source code for the example and the name of the executable ADD_EXECUTABLE(firewire_cont_CV firewire_camera_cont_CV.cpp) # edit the following line to add the necessary libraries - TARGET_LINK_LIBRARIES(firewire_cont_CV ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire pthread ${OpenCV_LIBS}) + TARGET_LINK_LIBRARIES(firewire_cont_CV ${iriutils_LIBRARY} ${raw1394_LIBRARY} ${dc1394_LIBRARY} firewire_camera pthread ${OpenCV_LIBS}) endif()