diff --git a/CMakeLists.txt b/CMakeLists.txt index c75b02288..65ac4bdd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -448,6 +448,11 @@ endif() # check whether the used version of lensfun has lfDatabase::LoadDirectory include(CheckCXXSourceCompiles) set(CMAKE_REQUIRED_INCLUDES ${LENSFUN_INCLUDE_DIRS}) +set(CMAKE_REQUIRED_LIBRARIES) +foreach(l ${LENSFUN_LIBRARIES}) + find_library(_l ${l} PATHS ${LENSFUN_LIBRARY_DIRS} NO_DEFAULT_PATH) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${_l}) +endforeach() check_cxx_source_compiles( "#include int main() diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 3212c3bb4..2f47ec1a3 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -285,7 +285,7 @@ bool LFDatabase::init(const Glib::ustring &dbdir) bool LFDatabase::LoadDirectory(const char *dirname) { #if RT_LENSFUN_HAS_LOAD_DIRECTORY - instance_.data_->LoadDirectory(dirname); + return instance_.data_->LoadDirectory(dirname); #else // backported from lensfun 0.3.x bool database_found = false;