diff --git a/CMakeLists.txt b/CMakeLists.txt index 3240ce7..3f6cc93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,9 @@ if( USE_MPI ) # Use MPI add_definitions( -DUSE_MPI ) + + target_include_directories(ASYNC SYSTEM INTERFACE ${MPI_CXX_INCLUDE_PATH}) + target_link_libraries(ASYNC INTERFACE MPI::MPI_C) endif( USE_MPI ) # Threads @@ -55,9 +58,9 @@ find_package( Threads REQUIRED ) enable_testing() # Make sure we find the header files -include_directories( ${CMAKE_SOURCE_DIR} ) +target_include_directories(ASYNC PUBLIC ${CMAKE_SOURCE_DIR} ) # Submodules -include_directories( ${CMAKE_SOURCE_DIR}/submodules ) +target_include_directories(ASYNC PUBLIC ${CMAKE_SOURCE_DIR}/submodules ) add_subdirectory( tests )