-
Notifications
You must be signed in to change notification settings - Fork 1
/
CmakeLists.txt
29 lines (24 loc) · 1 KB
/
CmakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required(VERSION 3.11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
PROJECT(photo-fingerprint)
# ImageMagick stuff
find_package(PkgConfig REQUIRED)
pkg_search_module(MAGICK REQUIRED Magick++)
include_directories(${MAGICK_INCLUDEDIR})
link_directories(${MAGICK_LIBDIR})
set(CMAKE_C_FLAGS ${MAGICK_CFLAGS})
# ImageMagick requires some settings to be defined at compile time
add_compile_definitions(MAGICKCORE_QUANTUM_DEPTH=8)
add_compile_definitions(MAGICKCORE_HDRI_ENABLE=0)
# Boost Filesystem
#set(Boost_DEBUG ON)
# https://stackoverflow.com/questions/58081084/target-boostlibrary-already-has-an-imported-location-link-errors
set(Boost_NO_BOOST_CMAKE ON)
set(Boost_USE_MULTITHREADED ON)
find_package(Boost 1.71.0 REQUIRED COMPONENTS filesystem)
include_directories(${Boost_INCLUDE_DIRS})
# Linking
set(SOURCE main.cpp DirectoryWalker.cpp FingerprintStore.cpp Util.cpp)
add_executable(${PROJECT_NAME} ${SOURCE})
target_link_libraries(${PROJECT_NAME} ${MAGICK_LIBRARIES} ${Boost_LIBRARIES})