make sure liblinalg is built before linking phana

This commit is contained in:
Axel Kohlmeyer
2023-10-23 14:57:27 -04:00
parent 723dc17d80
commit c9aedf9df8

View File

@ -119,5 +119,9 @@ if(USE_SPGLIB)
target_link_libraries(phana PRIVATE SPGLIB::SYMSPG)
endif()
# add dependency when using local linear algebra lib
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND OR USE_INTERNAL_LINALG)
add_dependencies(phana linalg)
endif()
target_link_libraries(phana PRIVATE tricubic ${LAPACK_LIBRARIES})
install(TARGETS phana EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})