Skip to content

Commit

Permalink
Fix fallback finding of ccd
Browse files Browse the repository at this point in the history
Fix finding include directory for ccd when falling back from using 
pkg-config. The old mechanism would find the include directory as e.g.
`prefix/include/ccd`, which fails when we try to include `ccd/ccd.h`. 
Drop the path suffix and instead search for the literal name 
`ccd/ccd.h`, which will produce the correct include path.
  • Loading branch information
mwoehlke-kitware committed Mar 31, 2016
1 parent bdb3488 commit 97beed2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ endif()
if(NOT CCD_FOUND)
# if pkfconfig is not installed, then fall back on more fragile detection
# of ccd
find_path(CCD_INCLUDE_DIRS ccd.h
PATH_SUFFIXES ccd)
find_path(CCD_INCLUDE_DIRS ccd/ccd.h)
find_library(CCD_LIBRARY
${CMAKE_SHARED_LIBRARY_PREFIX}ccd${CMAKE_SHARED_LIBRARY_SUFFIX})
if(CCD_INCLUDE_DIRS AND CCD_LIBRARY)
Expand Down

0 comments on commit 97beed2

Please # to comment.