-
Notifications
You must be signed in to change notification settings - Fork 78
/
CMakeLists.txt
41 lines (29 loc) · 1.08 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
cmake_minimum_required(VERSION 2.8)
project(poissonblend)
if (WIN32)
#set(OpenCV_STATIC true)
add_definitions("-D_SCL_SECURE_NO_WARNINGS")
endif()
set(EIGEN_INCLUDE_DIR "../eigen" CACHE PATH "Where is the include directory of Eigen located")
set(BLEND_TESTS_VERBOSE 0 CACHE BOOL "Tests will show visualizations when enabled")
find_package(OpenCV REQUIRED)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${OpenCV_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIR} "inc")
# Library
add_library(blend
inc/blend/poisson_solver.h
inc/blend/clone.h
inc/blend/blend.h
src/poisson_solver.cpp
src/clone.cpp
src/blend.cpp
)
target_link_libraries(blend ${OpenCV_LIBRARIES})
# Samples
add_executable(seamless_cloning examples/seamless_cloning.cpp)
target_link_libraries(seamless_cloning blend ${OpenCV_LIBRARIES})
add_executable(seamless_blending examples/seamless_blending.cpp)
target_link_libraries(seamless_blending blend ${OpenCV_LIBRARIES})
# Tests
configure_file(tests/config.h.in test_config.h)
add_executable(tests tests/catch.hpp tests/poisson.cpp)
target_link_libraries(tests blend ${OpenCV_LIBRARIES})