1@PACKAGE_INIT@ 2 3include(${CMAKE_CURRENT_LIST_DIR}/libigl-export.cmake) 4 5# Check if Eigen3 target is avaiable, if not try to locate it 6# with find_package. 7message(STATUS "[libigl] Looking for Eigen3") 8if (NOT TARGET Eigen3::Eigen) 9 # Try if Eigen3 can be found with find_package 10 find_package(Eigen3 CONFIG REQUIRED) 11endif() 12 13 14if (TARGET igl::core) 15 if (TARGET Eigen3::Eigen) 16 # Inject dependency 17 set_target_properties(igl::core PROPERTIES INTERFACE_LINK_LIBRARIES Eigen3::Eigen) 18 set(libigl_core_FOUND TRUE) 19 endif() 20endif() 21 22if (TARGET igl::common) 23 if (TARGET Eigen3::Eigen) 24 # Inject dependency 25 set_target_properties(igl::common PROPERTIES INTERFACE_LINK_LIBRARIES Eigen3::Eigen) 26 set(libigl_common_FOUND TRUE) 27 endif() 28endif() 29 30check_required_components(libigl) 31 32