Use modern target-based dependency for MPI

This commit is contained in:
Rodrigo Arias 2021-11-15 17:29:26 +01:00
parent 77adb27cb9
commit 5fed28bad8

View File

@ -87,9 +87,7 @@ endif()
find_package(MPI REQUIRED)
add_executable(ovnisync ovnisync.c)
target_include_directories(ovnisync PRIVATE ${MPI_C_INCLUDE_PATH})
target_compile_options(ovnisync PRIVATE ${MPI_C_COMPILE_FLAGS})
target_link_libraries(ovnisync m ${MPI_C_LIBRARIES} ${MPI_C_LINK_FLAGS})
target_link_libraries(ovnisync m MPI::MPI_C)
install(TARGETS ovni LIBRARY)
install(TARGETS emu dump ovni2prv ovnisync RUNTIME)