From 97beed20c148f7ac35ca4d42719d93210aed9cdb Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Thu, 31 Mar 2016 14:54:34 -0400 Subject: [PATCH] Fix fallback finding of ccd 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. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f237ee12..cbd7dec2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)