diff --git a/GuidedTutorials/HeatEquation/Exec/CMakeLists.txt b/GuidedTutorials/HeatEquation/Exec/CMakeLists.txt index 33706d03..74921ca2 100644 --- a/GuidedTutorials/HeatEquation/Exec/CMakeLists.txt +++ b/GuidedTutorials/HeatEquation/Exec/CMakeLists.txt @@ -71,7 +71,8 @@ else() # Add mpi find_package(MPI REQUIRED) - target_link_libraries(AMReX::amrex INTERFACE ${MPI_LIBRARIES}) + get_target_property(AMReX_ALIASED AMReX::amrex ALIASED_TARGET) + target_link_libraries(${AMReX_ALIASED} INTERFACE ${MPI_LIBRARIES}) endif() diff --git a/GuidedTutorials/HeatEquation_Simple/CMakeLists.txt b/GuidedTutorials/HeatEquation_Simple/CMakeLists.txt index 0aee75e7..e8dc1065 100644 --- a/GuidedTutorials/HeatEquation_Simple/CMakeLists.txt +++ b/GuidedTutorials/HeatEquation_Simple/CMakeLists.txt @@ -63,7 +63,8 @@ else() # Add mpi find_package(MPI REQUIRED) - target_link_libraries(AMReX::amrex INTERFACE ${MPI_LIBRARIES}) + get_target_property(AMReX_ALIASED AMReX::amrex ALIASED_TARGET) + target_link_libraries(${AMReX_ALIASED} INTERFACE ${MPI_LIBRARIES}) endif() diff --git a/GuidedTutorials/HelloWorld/CMakeLists.txt b/GuidedTutorials/HelloWorld/CMakeLists.txt index 3a4c8849..2a960b2e 100644 --- a/GuidedTutorials/HelloWorld/CMakeLists.txt +++ b/GuidedTutorials/HelloWorld/CMakeLists.txt @@ -67,7 +67,8 @@ else() # Add mpi find_package(MPI REQUIRED) - target_link_libraries(AMReX::amrex INTERFACE ${MPI_LIBRARIES}) + get_target_property(AMReX_ALIASED AMReX::amrex ALIASED_TARGET) + target_link_libraries(${AMReX_ALIASED} INTERFACE ${MPI_LIBRARIES}) endif() diff --git a/GuidedTutorials/MultiFab/CMakeLists.txt b/GuidedTutorials/MultiFab/CMakeLists.txt index b5b3cbf8..b485ea69 100644 --- a/GuidedTutorials/MultiFab/CMakeLists.txt +++ b/GuidedTutorials/MultiFab/CMakeLists.txt @@ -67,7 +67,8 @@ else() # Add mpi find_package(MPI REQUIRED) - target_link_libraries(AMReX::amrex INTERFACE ${MPI_LIBRARIES}) + get_target_property(AMReX_ALIASED AMReX::amrex ALIASED_TARGET) + target_link_libraries(${AMReX_ALIASED} INTERFACE ${MPI_LIBRARIES}) endif()