Correct a cmake linking error discovered when working in a mips qemu environment.
@@ -18,8 +18,13 @@ IF(ENABLE_BYTERANGE)
ENDIF(ENABLE_BYTERANGE)
add_library(dispatch OBJECT ${libdispatch_SOURCES})
+IF(MPI_C_INCLUDE_PATH)
target_include_directories(dispatch PUBLIC ${MPI_C_INCLUDE_PATH})
+ENDIF(MPI_C_INCLUDE_PATH)
+
+IF(MPI_C_LIBRARIES)
target_link_libraries(dispatch PUBLIC ${MPI_C_LIBRARIES})
+ENDIF(MPI_C_LIBRARIES)
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
