3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-29 16:34:53 +02:00

[cmake] Generalize desc file detection to allow for modules in subdirectories

This commit is contained in:
Nils Wentzell 2020-06-08 14:49:39 -04:00
parent c98b36140a
commit e059d403c1

View File

@ -11,8 +11,10 @@ endforeach()
# Build any python modules
foreach(gen ${wrap_generators})
string(REPLACE "_desc.py" "" module_name ${gen})
add_cpp2py_module(${module_name})
string(REPLACE "_desc.py" "" gen ${gen})
get_filename_component(module_name ${gen} NAME_WE)
get_filename_component(module_dir ${gen} DIRECTORY)
add_cpp2py_module(NAME ${module_name} DIRECTORY ${module_dir})
target_link_libraries(${module_name} ${PROJECT_NAME}_c triqs_py)
endforeach()