forked from fperazzi-zz/davis-2017
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathCMakeLists.txt
40 lines (30 loc) · 1.3 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
# ----------------------------------------------------------------------------
# A Benchmark Dataset and Evaluation Methodology for Video Object Segmentation
#-----------------------------------------------------------------------------
# Copyright (c) 2016 Federico Perazzi
# Licensed under the BSD License [see LICENSE for details]
# Written by Federico Perazzi
# ----------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
project( davis )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
add_definitions(-std=c++11)
if(APPLE)
add_definitions(-Wno-return-type)
endif()
# Finding python and boost-python
find_package(NumPy REQUIRED)
find_package(Boost COMPONENTS python)
find_package(PythonInterp 2.7.6 REQUIRED)
find_package(PythonLibs 2.7.6 REQUIRED)
include_directories( ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}
${NUMPY_INCLUDE_DIRS} cpp cpp/Boost.NumPy cpp/polycont)
link_directories( ${Boost_LIBRARY_DIR} )
add_subdirectory(cpp)
# Create python library
add_library(tstab SHARED cpp/polycont/python.cpp cpp/clipper/clipper.cpp)
target_link_libraries( tstab boost_numpy ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} )
set_target_properties( tstab PROPERTIES PREFIX "")
if(APPLE)
set_target_properties( tstab PROPERTIES SUFFIX ".so" )
endif()