# finds the STIM library (downloads it if it isn't present) # set STIMLIB_PATH to the directory containing the stim subdirectory (the stim repository) include(FindPackageHandleStandardArgs) set(STIM_ROOT $ENV{STIM_ROOT}) IF(NOT UNIX) IF(NOT STIM_ROOT) MESSAGE("ERROR: STIM_ROOT environment variable must be set!") ENDIF(NOT STIM_ROOT) FIND_PATH(STIM_INCLUDE_DIRS DOC "Path to GLFW include directory." NAMES stim/image/image.h PATHS ${STIM_ROOT}) ENDIF(NOT UNIX) find_package_handle_standard_args(STIM DEFAULT_MSG STIM_INCLUDE_DIRS) if(STIM_FOUND) set(STIM_INCLUDE_DIRS ${STIM_INCLUDE_DIRS}) elseif(STIM_FOUND) message("STIM library not found. Set the STIM_ROOT environment variable to the STIM location.") message("STIMLIB can be found here: https://git.stim.ee.uh.edu/codebase/stimlib") endif(STIM_FOUND) find_package_handle_standard_args(STIM DEFAULT_MSG STIM_INCLUDE_DIRS)