mirror of
https://github.com/triqs/dft_tools
synced 2024-09-27 03:50:51 +02:00
[cmake] Generalize desc file detection to allow for modules in subdirectories
This commit is contained in:
parent
c98b36140a
commit
e059d403c1
@ -11,8 +11,10 @@ endforeach()
|
|||||||
|
|
||||||
# Build any python modules
|
# Build any python modules
|
||||||
foreach(gen ${wrap_generators})
|
foreach(gen ${wrap_generators})
|
||||||
string(REPLACE "_desc.py" "" module_name ${gen})
|
string(REPLACE "_desc.py" "" gen ${gen})
|
||||||
add_cpp2py_module(${module_name})
|
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)
|
target_link_libraries(${module_name} ${PROJECT_NAME}_c triqs_py)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user