cmake: fix build issue on opensuse (exiv2 library not found)
Fixes #64 (cherry picked from commit 33ced3e42605fcc4f69a0be03aa4df3691fa66f9)
This commit is contained in:
parent
30e77ee96f
commit
41834c7007
@ -482,10 +482,17 @@ set(EXIV2_LIBRARIES "")
|
||||
foreach(l ${_exiv2_libs})
|
||||
set(_el "_el-NOTFOUND")
|
||||
if(EXIV2_LIBRARY_DIRS)
|
||||
message(STATUS "searching for library ${l} in ${EXIV2_LIBRARY_DIRS}")
|
||||
find_library(_el ${l} PATHS ${EXIV2_LIBRARY_DIRS} NO_DEFAULT_PATH)
|
||||
if(NOT _el)
|
||||
message(STATUS " NOT FOUND, searching again in default path")
|
||||
find_library(_el ${l})
|
||||
endif()
|
||||
else()
|
||||
find_library(_el ${l} PATHS ${EXIV2_LIBRARY_DIRS})
|
||||
message(STATUS "searching for library ${l}")
|
||||
find_library(_el ${l})# PATHS ${EXIV2_LIBRARY_DIRS})
|
||||
endif()
|
||||
message(STATUS " result: ${_el}")
|
||||
set(EXIV2_LIBRARIES ${EXIV2_LIBRARIES} ${_el})
|
||||
endforeach()
|
||||
|
||||
@ -771,14 +778,17 @@ foreach(l ${LENSFUN_LIBRARIES})
|
||||
# want, and not the system's one (e.g. if we have a custom version
|
||||
# installed in a non-standard location)
|
||||
set(_l "_l-NOTFOUND")
|
||||
message(STATUS "searching for library ${l} in ${LENSFUN_LIBRARY_DIRS}")
|
||||
find_library(_l ${l} PATHS ${LENSFUN_LIBRARY_DIRS} NO_DEFAULT_PATH)
|
||||
else()
|
||||
# LENSFUN_LIBRARY_DIRS can be empty if lensfun is installed in the
|
||||
# default path. In this case, adding NO_DEFAULT_PATH would make
|
||||
# find_library fail...
|
||||
set(_l "_l-NOTFOUND")
|
||||
message(STATUS "searching for library ${l}")
|
||||
find_library(_l ${l})
|
||||
endif()
|
||||
message(STATUS " result: ${_l}")
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${_l})
|
||||
endforeach()
|
||||
check_cxx_source_compiles(
|
||||
|
Loading…
x
Reference in New Issue
Block a user