Skip to content

Commit

Permalink
Only include capnp pyuda files when capnp is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
jholloc committed Feb 6, 2024
1 parent 2c30f60 commit 6e04681
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions source/wrappers/python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
file( GLOB CYTHON_FILES
pyuda/cpyuda/capnp.pxd
pyuda/cpyuda/capnp_tree.pyx
set( CYTHON_FILES
pyuda/cpyuda/client.pyx
pyuda/cpyuda/cpyuda.pyx
pyuda/cpyuda/dim.pyx
Expand All @@ -12,6 +10,12 @@ file( GLOB CYTHON_FILES
pyuda/cpyuda/types.pyx
pyuda/cpyuda/uda.pxd
)
set( CYTHON_SOURCES pyuda/cpyuda/cpyuda.pyx )

if( ENABLE_CAPNP )
list( APPEND CYTHON_FILES pyuda/cpyuda/capnp.pxd pyuda/cpyuda/capnp_tree.pyx )
list( APPEND CYTHON_SOURCES pyuda/cpyuda/capnp_tree.pyx )
endif( )

install( FILES ${CYTHON_FILES} DESTINATION python_installer/pyuda/cpyuda )

Expand Down
2 changes: 1 addition & 1 deletion source/wrappers/python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ else:

ext = Extension(
'cpyuda',
['pyuda/cpyuda/cpyuda.pyx', 'pyuda/cpyuda/capnp_tree.pyx'],
'@CYTHON_SOURCES@'.split(';'),
include_dirs=list(filter(None, [
'/usr/include/tirpc',
'@TIRPC_PYUDA_INCLUDE_DIR@',
Expand Down

0 comments on commit 6e04681

Please sign in to comment.