Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check the location of spinnaker headers and change the path accordingly.
This builds on the suggestion in
rjdmoore#13 by @tlmohren, but provides
a fallback for earlier spinnaker versions.
  • Loading branch information
floesche committed Jan 18, 2023
1 parent 0370819 commit 1c1d2d5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ if(PGR_USB2 OR PGR_USB3)
if(PGR_USB2)
include_directories(${PGR_DIR}/include/flycapture) # for ubuntu default install dir
elseif(PGR_USB3)
include_directories(${PGR_DIR}/include/spinnaker) # for ubuntu default install dir
if (EXISTS "${PGR_DIR}/include/spinnaker/Spinnaker.h")
message(STATUS "Found PGR headers at ${PGR_DIR}/include/spinnaker/")
include_directories(${PGR_DIR}/include/spinnaker) # for old spinnaker versions and ubuntu default install dir
elseif (EXISTS "${PGR_DIR}/include/Spinnaker.h")
message(STATUS "Found PGR headers at ${PGR_DIR}/include/")
include_directories(${PGR_DIR}/include) # https://github.com/rjdmoore/fictrac/issues/13
else()
message(FATAL_ERROR "Error: cannot find Spinnaker.h at expected locations within ${PGR_DIR}")
endif()
endif()
endif()
elseif(BASLER_USB3)
Expand Down

0 comments on commit 1c1d2d5

Please sign in to comment.