From 9e556a6b8025f766ba8e5181daae988a0e19b2fb Mon Sep 17 00:00:00 2001 From: fherrero <fherrero@iri.upc.edu> Date: Tue, 5 Mar 2019 12:08:04 +0100 Subject: [PATCH] Install to subfolder. Add plural cmake variables. Add gitignore Modified the necessary files to save the headers, the library and all the related files on the subdirectory iri/<package_name> Add plural _INCLUDE_DIRS and _LIBRARIES find cmake variables. Add .gitignore file to ignore bin, build and lib directories --- .gitignore | 3 +++ Findfirewire.cmake | 7 +++++-- src/CMakeLists.txt | 6 +++--- src/firewirecamera.cpp | 1 + 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..638c8d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +bin +build +lib diff --git a/Findfirewire.cmake b/Findfirewire.cmake index cd16e98..e1a8caa 100644 --- a/Findfirewire.cmake +++ b/Findfirewire.cmake @@ -1,8 +1,11 @@ -FIND_PATH(firewire_INCLUDE_DIR firewirecamera.h firewireserver.h firewireexceptions.h /usr/include/iridrivers /usr/local/include/iridrivers) +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/iridrivers /usr/local/lib /usr/local/lib/iridrivers) + PATHS /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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 28eed98..90974a8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,11 +54,11 @@ IF (firewire_ready) INSTALL(TARGETS firewire RUNTIME DESTINATION bin - LIBRARY DESTINATION lib/iridrivers - ARCHIVE DESTINATION lib/iridrivers + LIBRARY DESTINATION lib/iri/${PROJECT_NAME} + ARCHIVE DESTINATION lib/iri/${PROJECT_NAME} ) - INSTALL(FILES ${headers} DESTINATION include/iridrivers) + INSTALL(FILES ${headers} DESTINATION include/iri/${PROJECT_NAME}) INSTALL(FILES ../Findfirewire.cmake DESTINATION ${CMAKE_ROOT}/Modules/) diff --git a/src/firewirecamera.cpp b/src/firewirecamera.cpp index a399a1c..e5441f1 100644 --- a/src/firewirecamera.cpp +++ b/src/firewirecamera.cpp @@ -217,6 +217,7 @@ void CFirewireCamera::set_mode(unsigned int left_off, unsigned int top_off,unsig for ( i = 0 ; i < supported_video_modes.num ; i++) if ( supported_video_modes.modes[i] == mode ) { + //std::cout << "video mode " << supported_video_modes.modes[i] << std::endl; error = dc1394_video_set_mode(this->camera_handle,mode); if ( error != DC1394_SUCCESS ) { -- GitLab