mirror of
https://github.com/triqs/dft_tools
synced 2024-11-18 12:03:50 +01:00
11d394fd5b
* moved the plovasp C++ code to c++/triqs_dft_tools/converters/vasp * added global header triqs_dft_tools/triqs_dft_tools.hpp * python dir based on single cmakelist file * registered C++ tests for plovasp * corrected imports for py3 tests for plovasp * corrected block order in sigma_from_file and srvo3_Gloc * exchanged ref files for sigma_from_file, srvo3_Gloc, SrVO3.ref.h5 * moved vasp converter bash scripts from dir shells to bin dir
26 lines
1.1 KiB
CMake
26 lines
1.1 KiB
CMake
# Configure the version
|
|
configure_file(version.py.in version.py)
|
|
|
|
# All Python files. Copy them in the build dir to have a complete package for the tests.
|
|
file(GLOB_RECURSE python_sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py)
|
|
file(GLOB_RECURSE wrap_generators RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *_desc.py)
|
|
list(REMOVE_ITEM python_sources "${wrap_generators}")
|
|
foreach(file ${python_sources})
|
|
configure_file(${file} ${file} COPYONLY)
|
|
endforeach()
|
|
|
|
# Build any python modules
|
|
foreach(gen ${wrap_generators})
|
|
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()
|
|
|
|
# Install python modules to proper location
|
|
set(PYTHON_LIB_DEST ${TRIQS_PYTHON_LIB_DEST_ROOT}/${PROJECT_NAME})
|
|
get_property(CPP2PY_MODULES_LIST GLOBAL PROPERTY CPP2PY_MODULES_LIST)
|
|
install(TARGETS ${CPP2PY_MODULES_LIST} DESTINATION ${PYTHON_LIB_DEST})
|
|
install(FILES ${python_sources} ${CMAKE_CURRENT_BINARY_DIR}/version.py DESTINATION ${PYTHON_LIB_DEST})
|