-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
48 lines (43 loc) · 1.32 KB
/
CMakeLists.txt
File metadata and controls
48 lines (43 loc) · 1.32 KB
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
47
48
########################################################################
## Build Pothos python module
########################################################################
set(MODULE_SOURCES
PothosModule.cpp
ProxyEnvironmentType.cpp
ProxyType.cpp
ProxyCallType.cpp
)
#warnings that are unavoidable with PyTypeObject
if (CMAKE_COMPILER_IS_GNUCXX)
add_compile_options(-Wno-missing-field-initializers)
add_compile_options(-fno-strict-aliasing)
endif()
include_directories(${Pothos_INCLUDE_DIRS})
add_library(PothosModule MODULE ${MODULE_SOURCES})
target_link_libraries(PothosModule ${Pothos_LIBRARIES} ${PYTHON_LIBRARIES})
#remove lib prefix and possible debug (d) postfix for importable module name
set_target_properties(PothosModule PROPERTIES
PREFIX ""
DEBUG_POSTFIX "${PYTHON_DEBUG_POSTFIX}"
)
#windows python expects pyd file extensions, dlls will not import
if (WIN32)
set_target_properties(PothosModule PROPERTIES
SUFFIX ".pyd"
)
endif()
#install the module and __init__.py importer script
install(TARGETS PothosModule DESTINATION ${POTHOS_PYTHON_DIR}/Pothos)
install(FILES
__init__.py
Block.py
Buffer.py
Label.py
InputPort.py
OutputPort.py
TestPothos.py
Topology.py
BlockRegistry.py
Logger.py
Packet.py
DESTINATION ${POTHOS_PYTHON_DIR}/Pothos)