PATH_SUFFIXES lib
)
-find_path(HAVE_MSG_H msg.h
+find_path(SIMGRID_INCLUDES msg.h
HINTS
$ENV{SIMGRID_ROOT}
PATH_SUFFIXES include
endif(HAVE_SIMGRID_LIB)
message(STATUS "Looking for msg.h")
-if(HAVE_MSG_H)
-message(STATUS "Looking for msg.h - found")
-else(HAVE_MSG_H)
-message(STATUS "Looking for msg.h - not found")
-endif(HAVE_MSG_H)
+if(SIMGRID_INCLUDES)
+ message(STATUS "Looking for msg.h - found")
+else(SIMGRID_INCLUDES)
+ message(STATUS "Looking for msg.h - not found")
+endif(SIMGRID_INCLUDES)
-if(HAVE_SIMGRID_LIB AND HAVE_MSG_H)
-else(HAVE_SIMGRID_LIB AND HAVE_MSG_H)
- message(FATAL_ERROR "You need to install simgrid and set environment variable SIMGRID_ROOT!")
-endif(HAVE_SIMGRID_LIB AND HAVE_MSG_H)
\ No newline at end of file
+if(HAVE_SIMGRID_LIB AND SIMGRID_INCLUDES)
+else(HAVE_SIMGRID_LIB AND SIMGRID_INCLUDES)
+ message(FATAL_ERROR "Unable to find both the library and the include files. Setting the environment variable SIMGRID_ROOT may help.")
+endif(HAVE_SIMGRID_LIB AND SIMGRID_INCLUDES)
\ No newline at end of file