-
Notifications
You must be signed in to change notification settings - Fork 51
/
CMakeLists.txt
69 lines (53 loc) · 1.57 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
cmake_minimum_required(VERSION 2.8)
project(inpainting)
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS} "inc")
if(CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
endif()
else()
set(CMAKE_CXX_STANDARD 11)
endif()
if (WIN32)
add_definitions("-D_SCL_SECURE_NO_WARNINGS")
endif()
# Library
add_library(inpaint
inc/inpaint/stats.h
inc/inpaint/patch.h
inc/inpaint/gradient.h
inc/inpaint/integral.h
inc/inpaint/timer.h
inc/inpaint/criminisi_inpainter.h
inc/inpaint/template_match_candidates.h
inc/inpaint/patch_match.h
src/criminisi_inpainter.cpp
src/template_match_candidates.cpp
src/patch_match.cpp
)
target_link_libraries(inpaint ${OpenCV_LIBRARIES})
# Samples
add_executable(inpaint_image_criminisi examples/inpaint_image_criminisi.cpp)
target_link_libraries(inpaint_image_criminisi inpaint ${OpenCV_LIBRARIES})
add_executable(patch_match examples/patch_match.cpp)
target_link_libraries(patch_match inpaint ${OpenCV_LIBRARIES})
# Tests
include_directories("tests")
add_executable(inpaint_tests
tests/catch.hpp
tests/gradient.cpp
tests/patch.cpp
tests/integral.cpp
tests/criminisi_inpainter.cpp
tests/template_match_candidates.cpp
tests/patch_match.cpp
)
target_link_libraries (inpaint_tests inpaint ${OpenCV_LIBRARIES})
# Benchmarks
include_directories("benchmarks")
add_executable(inpaint_benchmarks
benchmarks/catch.hpp
benchmarks/patch.cpp
)
target_link_libraries (inpaint_benchmarks inpaint ${OpenCV_LIBRARIES})