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
|
# check whether the used version of lensfun has lfDatabase::LoadDirectory
|
||||||
include(CheckCXXSourceCompiles)
|
include(CheckCXXSourceCompiles)
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${LENSFUN_INCLUDE_DIRS})
|
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(
|
check_cxx_source_compiles(
|
||||||
"#include <lensfun.h>
|
"#include <lensfun.h>
|
||||||
int main()
|
int main()
|
||||||
|
@ -285,7 +285,7 @@ bool LFDatabase::init(const Glib::ustring &dbdir)
|
|||||||
bool LFDatabase::LoadDirectory(const char *dirname)
|
bool LFDatabase::LoadDirectory(const char *dirname)
|
||||||
{
|
{
|
||||||
#if RT_LENSFUN_HAS_LOAD_DIRECTORY
|
#if RT_LENSFUN_HAS_LOAD_DIRECTORY
|
||||||
instance_.data_->LoadDirectory(dirname);
|
return instance_.data_->LoadDirectory(dirname);
|
||||||
#else
|
#else
|
||||||
// backported from lensfun 0.3.x
|
// backported from lensfun 0.3.x
|
||||||
bool database_found = false;
|
bool database_found = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user