CMakeLists.txt 1.6 KB

1234567891011121314151617181920212223242526
  1. cmake_minimum_required(VERSION 3.16)
  2. project(postprocessd C CXX)
  3. set(CMAKE_C_STANDARD 11)
  4. include(FindPkgConfig)
  5. find_package(PkgConfig REQUIRED)
  6. pkg_check_modules(RAW REQUIRED libraw)
  7. pkg_check_modules(DNG REQUIRED libdng)
  8. pkg_check_modules(JPEG REQUIRED libjpeg)
  9. pkg_check_modules(EXIF REQUIRED libexif)
  10. pkg_check_modules(CV REQUIRED opencv4)
  11. pkg_check_modules(LENSFUN REQUIRED lensfun)
  12. add_compile_options(-Wall -Wextra -pedantic)
  13. add_executable(postprocessd main.c postprocess.c postprocess.h util.c util.h stacker.cpp stacker.h stackercpp.cpp stackercpp.h)
  14. target_link_libraries(postprocessd ${RAW_LIBRARIES} ${DNG_LIBRARIES} ${LENSFUN_LIBRARIES} ${JPEG_LIBRARIES} ${EXIF_LIBRARIES} ${CV_LIBRARIES})
  15. target_include_directories(postprocessd PUBLIC ${RAW_INCLUDE_DIRS} ${DNG_INCLUDE_DIRS} ${LENSFUN_INCLUDE_DIRS} ${JPEG_INCUDE_DIRS} ${EXIF_INCUDE_DIRS} ${CV_INCLUDE_DIRS})
  16. target_compile_options(postprocessd PUBLIC ${RAW_CFLAGS_OTHER} ${DNG_CFLAGS_OTHER} ${LENSFUN_CFLAGS_OTHER} ${JPEG_CFLAGS_OTHER} ${EXIF_CFLAGS_OTHER} ${CV_CFLAGS_OTHER})
  17. add_executable(postprocess-single single.c postprocess.c postprocess.h util.c util.h stacker.cpp stacker.h stackercpp.cpp stackercpp.h)
  18. target_link_libraries(postprocess-single ${RAW_LIBRARIES} ${DNG_LIBRARIES} ${LENSFUN_LIBRARIES} ${JPEG_LIBRARIES} ${EXIF_LIBRARIES} ${CV_LIBRARIES})
  19. target_include_directories(postprocess-single PUBLIC ${RAW_INCLUDE_DIRS} ${DNG_INCLUDE_DIRS} ${LENSFUN_INCLUDE_DIRS} ${JPEG_INCUDE_DIRS} ${EXIF_INCUDE_DIRS} ${CV_INCLUDE_DIRS})
  20. target_compile_options(postprocess-single PUBLIC ${RAW_CFLAGS_OTHER} ${DNG_CFLAGS_OTHER} ${LENSFUN_CFLAGS_OTHER} ${JPEG_CFLAGS_OTHER} ${EXIF_CFLAGS_OTHER} ${CV_CFLAGS_OTHER})