forked from iago-suarez/ELSED
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
38 lines (29 loc) · 1.27 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
cmake_minimum_required(VERSION 3.0)
project(pyelsed)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 14)
# Import OpenCV
find_package(OpenCV REQUIRED)
message(STATUS "OpenCV_FOUND: " ${OpenCV_FOUND})
message(STATUS "OpenCV_INCLUDE_DIRS: " ${OpenCV_INCLUDE_DIRS})
message(STATUS "OpenCV_LIBS: " ${OpenCV_LIBS})
include_directories(${OpenCV_INCLUDE_DIRS})
# Create the ELSED library
set(LIB_SOURCES "src/EdgeDrawer.cpp" "src/ELSED.cpp" "src/FullSegmentInfo.cpp")
include_directories(src)
add_library(elsed SHARED ${LIB_SOURCES})
target_link_libraries(elsed ${OpenCV_LIBS})
# ELSED executable demo
add_executable(elsed_main src/main.cpp)
target_link_libraries(elsed_main elsed ${OpenCV_LIBS})
# Create the python library using pybind11
# add_subdirectory(pybind11)
# pybind11_add_module(pyelsed src/PYAPI.cpp)
# target_link_libraries(pyelsed PRIVATE ${OpenCV_LIBS} elsed)
# target_compile_definitions(pyelsed PRIVATE VERSION_INFO=${EXAMPLE_VERSION_INFO})
FILE(GLOB HEADERS src/*.h)
message(STATUS "files " ${HEADERS} )
set(DEPENDENCY_DIR ${CMAKE_CURRENT_BINARY_DIR}/dependencies)
set(DEPENDENCY_INSTALL_DIR ${DEPENDENCY_DIR}/install)
install( TARGETS elsed DESTINATION lib)
install( FILES src/EdgeDrawer.h src/ELSED.h src/FullSegmentInfo.h src/Utils.h DESTINATION include/elsed )