Make LENSFUN_HAS_LOAD_DIRECTORY test actually succeed when it should
This commit is contained in:
parent
10a4c5f1de
commit
7ee485e89c
@ -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 <lensfun.h>
|
||||
int main()
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user