-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (24 loc) · 918 Bytes
/
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
project(priows)
cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/config)
find_package(Numpy REQUIRED)
find_package(Vigra REQUIRED)
find_package(Boost COMPONENTS python)
find_package(PythonLibs REQUIRED)
include_directories(
${VIGRA_INCLUDE_DIR}
${PYTHON_INCLUDE_DIR}
${PYTHON_NUMPY_INCLUDE_DIR}
${Boost_INCLUDE_DIR}
)
add_library(priows SHARED
python_svs.cpp)
target_link_libraries(priows ${Boost_LIBRARIES} ${VIGRA_NUMPY_CORE_LIBRARY} ${PYTHON_LIBRARIES})
IF(WIN32)
SET_TARGET_PROPERTIES(priows PROPERTIES OUTPUT_NAME "priows" PREFIX "" SUFFIX ".pyd")
ELSEIF(APPLE)
SET_TARGET_PROPERTIES(priows PROPERTIES OUTPUT_NAME "priows" PREFIX "" SUFFIX ".so")
ELSE()
SET_TARGET_PROPERTIES(priows PROPERTIES OUTPUT_NAME "priows" PREFIX "")
ENDIF()
install(TARGETS priows LIBRARY DESTINATION ${VIGRA_NUMPY_MODULE_DIR})