-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
46 lines (37 loc) · 1.05 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
cmake_minimum_required( VERSION 2.8 )
project( cortex-ocean )
set( CORTEX_OCEAN_VERSION "1" )
find_package( PkgConfig REQUIRED )
pkg_check_modules( Cortex REQUIRED cortex )
include_directories(
${Cortex_INCLUDE_DIRS}
)
link_directories(
${Cortex_LIBRARY_DIRS}
)
add_library( CortexOceanBinding
SHARED
${CMAKE_SOURCE_DIR}/src/OceanOp.cpp
${CMAKE_SOURCE_DIR}/src/CortexOceanBinding.cpp
)
set_target_properties( CortexOceanBinding
PROPERTIES
OUTPUT_NAME "CortexOcean"
PREFIX ""
SUFFIX ".so"
)
target_link_libraries( CortexOceanBinding
${Cortex_LIBRARIES}
fftw3f
)
set( INSTALL_PATH ${Cortex_PREFIX}/ops/cortexOcean/ocean )
install( TARGETS CortexOceanBinding
DESTINATION ${INSTALL_PATH}
)
function(CORTEX_OP_STUB stub_path stub_cmd)
install( CODE "file( WRITE ${stub_path} \"import os, sys\nsys.path.append( os.path.dirname( __file__ ) )\n\n${stub_cmd}\n\")" )
endfunction(CORTEX_OP_STUB)
cortex_op_stub(
"${INSTALL_PATH}/ocean-${CORTEX_OCEAN_VERSION}.py"
"from CortexOcean import OceanOp as ocean"
)