USER-SMD.cmake: use Eigen3 imported target
This commit is contained in:
@ -15,7 +15,7 @@ if(PKG_USER-SMD)
|
||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_get_property(Eigen3_build SOURCE_DIR)
|
||||
set(EIGEN3_INCLUDE_DIR ${SOURCE_DIR})
|
||||
target_include_directories(lammps ${SOURCE_DIR})
|
||||
add_dependencies(lammps Eigen3_build)
|
||||
else()
|
||||
find_package(Eigen3 NO_MODULE)
|
||||
@ -23,6 +23,6 @@ if(PKG_USER-SMD)
|
||||
if(NOT EIGEN3_FOUND)
|
||||
message(FATAL_ERROR "Eigen3 not found, help CMake to find it by setting EIGEN3_INCLUDE_DIR, or set DOWNLOAD_EIGEN3=ON to download it")
|
||||
endif()
|
||||
target_link_libraries(lammps PRIVATE Eigen3::Eigen)
|
||||
endif()
|
||||
include_directories(${EIGEN3_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user