Blame view

FindSTIM.cmake 933 Bytes
f043d1fa   David Mayerich   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  # 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)