mirror of
https://github.com/triqs/dft_tools
synced 2024-12-21 11:53:41 +01:00
Fixing install of python files after cmake changes
This commit is contained in:
parent
0f704272f0
commit
586958eea9
@ -5,16 +5,15 @@ set(PYTHON_LIB_DEST ${CPP2PY_PYTHON_LIB_DEST_ROOT}/triqs_dft_tools)
|
|||||||
set(package_name "triqs_dft_tools")
|
set(package_name "triqs_dft_tools")
|
||||||
|
|
||||||
# Create a temporary copy of the python modules so that we can run before installation with the test
|
# Create a temporary copy of the python modules so that we can run before installation with the test
|
||||||
FILE(GLOB_RECURSE PYTHON_SOURCES RELATIVE ${CMAKE_SOURCE_DIR}/python *.py )
|
FILE(GLOB PYTHON_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py )
|
||||||
foreach(f ${PYTHON_SOURCES})
|
foreach(f ${PYTHON_SOURCES})
|
||||||
configure_file(${f} ${f} COPYONLY)
|
configure_file(${f} ${f} COPYONLY)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# VASP converter
|
|
||||||
add_subdirectory(converters/plovasp)
|
|
||||||
|
|
||||||
# add version file
|
# add version file
|
||||||
configure_file(version.py.in version.py @ONLY)
|
configure_file(version.py.in version.py @ONLY)
|
||||||
|
|
||||||
# install files
|
# install files
|
||||||
install(FILES ${PYTHON_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/version.py DESTINATION ${PYTHON_LIB_DEST})
|
install(FILES ${PYTHON_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/version.py DESTINATION ${PYTHON_LIB_DEST})
|
||||||
|
|
||||||
|
add_subdirectory(converters)
|
||||||
|
10
python/converters/CMakeLists.txt
Normal file
10
python/converters/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Create a temporary copy of the python modules so that we can run before installation with the test
|
||||||
|
FILE(GLOB PYTHON_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py)
|
||||||
|
foreach(f ${PYTHON_SOURCES})
|
||||||
|
configure_file(${f} ${f} COPYONLY)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# install files
|
||||||
|
install(FILES ${PYTHON_SOURCES} DESTINATION ${PYTHON_LIB_DEST}/converters)
|
||||||
|
|
||||||
|
add_subdirectory(plovasp)
|
@ -1,14 +1,19 @@
|
|||||||
set(python_destination pytriqs/applications/dft/converters/plovasp)
|
# === Build and install atm module
|
||||||
|
|
||||||
add_cpp2py_module(atm)
|
add_cpp2py_module(atm)
|
||||||
target_link_libraries(atm atm_c triqs)
|
target_link_libraries(atm atm_c triqs)
|
||||||
#triqs_set_rpath_for_target(atm)
|
|
||||||
target_compile_options(atm PRIVATE -std=c++17)
|
target_compile_options(atm PRIVATE -std=c++17)
|
||||||
target_include_directories(atm PRIVATE ${CMAKE_SOURCE_DIR}/c++)
|
target_include_directories(atm PRIVATE ${CMAKE_SOURCE_DIR}/c++)
|
||||||
|
|
||||||
|
install(TARGETS atm DESTINATION ${PYTHON_LIB_DEST}/converters/plovasp)
|
||||||
|
|
||||||
|
# === Copy Python files to current build directory and register for install
|
||||||
|
set(PYTHON_SOURCES __init__.py converter.py elstruct.py inpconf.py plotools.py proj_group.py proj_shell.py sc_dmft.py vaspio.py)
|
||||||
|
foreach(f ${PYTHON_SOURCES})
|
||||||
|
configure_file(${f} ${f} COPYONLY)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# install files
|
||||||
|
install(FILES ${PYTHON_SOURCES} DESTINATION ${PYTHON_LIB_DEST}/converters/plovasp)
|
||||||
|
|
||||||
# This we need in order for tests to work
|
# This we need in order for tests to work
|
||||||
#add_custom_command(TARGET atm POST_BUILD COMMAND ln -fs ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}/atm.so ${CMAKE_BINARY_DIR}/python/dft/converters/plovasp)
|
#add_custom_command(TARGET atm POST_BUILD COMMAND ln -fs ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}/atm.so ${CMAKE_BINARY_DIR}/python/dft/converters/plovasp)
|
||||||
|
|
||||||
install (TARGETS atm DESTINATION ${PYTHON_LIB_DEST})
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user