diff --git a/gmdsConfig.cmake.in b/gmdsConfig.cmake.in index e37877286..b858ab2eb 100644 --- a/gmdsConfig.cmake.in +++ b/gmdsConfig.cmake.in @@ -1,6 +1,10 @@ include(CMakeFindDependencyMacro) find_dependency(Eigen3 REQUIRED NO_MODULE) +if (@WITH_LIMA@) # WITH_LIMA + find_dependency(Lima REQUIRED) +endif() + @PACKAGE_INIT@ set_and_check(GMDS_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") diff --git a/io/CMakeLists.txt b/io/CMakeLists.txt index e87890496..73f5a5d53 100644 --- a/io/CMakeLists.txt +++ b/io/CMakeLists.txt @@ -73,22 +73,16 @@ generate_export_header(${GMDS_LIB} include(GNUInstallDirs) #LIBRARY TO INSTALL +target_link_libraries(${GMDS_LIB} PUBLIC + ${LIB_GMDS_IG}) + if(WITH_LIMA) target_link_libraries(${GMDS_LIB} PUBLIC - ${LIB_GMDS_IG} - ${LIB_GMDS_SOFIANE} Lima::Lima) -elseif(WITH_MESHB) - target_link_libraries(${GMDS_LIB} PUBLIC - ${LIB_GMDS_IG} - ${LIB_GMDS_SOFIANE} - PRIVATE +endif() +if(WITH_MESHB) + target_link_libraries(${GMDS_LIB} PRIVATE ${libMeshb_LIBRARIES}) -else() - target_link_libraries(${GMDS_LIB} PUBLIC - ${LIB_GMDS_IG} - ${LIB_GMDS_IGALGO} - ${LIB_GMDS_SOFIANE}) endif()