diff -urN a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt 2015-12-04 22:59:30.000000000 +0100 +++ b/CMakeLists.txt 2016-01-18 10:00:12.039030971 +0100 @@ -32,10 +32,10 @@ MESSAGE( STATUS "GEXIV2_INCLUDE_DIRS: " ${GEXIV2_INCLUDE_DIRS} ) MESSAGE( STATUS "GEXIV2_LIBRARY_DIRS: " ${GEXIV2_LIBRARY_DIRS} ) -#pkg_check_modules(LENSFUN lensfun) -#MESSAGE( STATUS "LENSFUN_INCLUDE_DIRS: " ${LENSFUN_INCLUDE_DIRS} ) -#MESSAGE( STATUS "LENSFUN_LIBRARY_DIRS: " ${LENSFUN_LIBRARY_DIRS} ) -#MESSAGE( STATUS "LENSFUN_LIBRARIES: " ${LENSFUN_LIBRARIES}) +pkg_check_modules(LENSFUN REQUIRED lensfun) +MESSAGE( STATUS "LENSFUN_INCLUDE_DIRS: " ${LENSFUN_INCLUDE_DIRS} ) +MESSAGE( STATUS "LENSFUN_LIBRARY_DIRS: " ${LENSFUN_LIBRARY_DIRS} ) +MESSAGE( STATUS "LENSFUN_LIBRARIES: " ${LENSFUN_LIBRARIES}) IF(NOT MINGW) diff -urN a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt 2015-12-04 22:59:30.000000000 +0100 +++ b/src/CMakeLists.txt 2016-01-18 10:01:28.622715365 +0100 @@ -55,11 +55,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/LibRaw) -#if(LENSFUN_FOUND) -# link_directories( ${LENSFUN_LIBRARY_DIRS} ) -# include_directories( ${LENSFUN_INCLUDE_DIRS} ) - set(CMAKE_CXX_FLAGS "-DPF_HAS_LENSFUN") -#endif() +if(LENSFUN_FOUND) + link_directories( ${LENSFUN_LIBRARY_DIRS} ) + include_directories( ${LENSFUN_INCLUDE_DIRS} ) + set(CMAKE_CXX_FLAGS "-DPF_HAS_LENSFUN") +endif() include_directories(${OPENEXR_INCLUDE_DIRS}) include_directories(${TIFF_INCLUDE_DIRS}) @@ -152,15 +152,6 @@ list(APPEND LIB_DEPS libraw_r) list(APPEND STATIC_LIBS libraw_static) -LIST(APPEND CMAKE_MODULE_PATH " ${CMAKE_SOURCE_DIR}/src/external/lensfun/cmake/modules ") -set(BUILD_STATIC "ON") -add_library(lensfun_static STATIC IMPORTED) -set_target_properties(lensfun_static PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/external/lensfun/libs/lensfun/liblensfun.a) -add_subdirectory(external/lensfun) -list(APPEND LIB_DEPS lensfun) -list(APPEND STATIC_LIBS lensfun_static) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/include) - #FILE(GLOB LibRawIncludes external/LibRaw/libraw/*.h) #set(LibRawSources external/LibRaw/internal/dcraw_common.cpp external/LibRaw/src/libraw_cxx.cpp external/LibRaw/internal/dcraw_fileio.cpp external/LibRaw/internal/demosaic_packs.cpp external/LibRaw/src/libraw_c_api.cpp external/LibRaw/src/libraw_datastream.cpp) @@ -221,7 +212,7 @@ ${EXIF_LIBRARIES} ${EXIV2_LIBRARIES} ${GEXIV2_LIBRARIES} - #${LENSFUN_LIBRARIES} + ${LENSFUN_LIBRARIES} ${SIGC2_LIBRARIES} ${PANGO_LIBRARIES} ${PANGOFT2_LIBRARIES} ${PIXMAN_LIBRARIES} @@ -258,7 +249,7 @@ ${EXIF_LIBRARIES} ${EXIV2_LIBRARIES} ${GEXIV2_LIBRARIES} - #${LENSFUN_LIBRARIES} + ${LENSFUN_LIBRARIES} ${SIGC2_LIBRARIES} ${PANGO_LIBRARIES} ${PANGOFT2_LIBRARIES} ${GLIBMM_LIBRARIES}