Blame view

FindSTIM.cmake 933 Bytes
190d5b42   David Mayerich   Updated for chang...
1
2
3
  # finds the STIM library (downloads it if it isn't present)
  # set STIMLIB_PATH to the directory containing the stim subdirectory (the stim repository)
  
8d8c3ebd   David Mayerich   initial commit tr...
4
5
  include(FindPackageHandleStandardArgs)
  
190d5b42   David Mayerich   Updated for chang...
6
7
8
9
10
11
  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)
8d8c3ebd   David Mayerich   initial commit tr...
12
  
190d5b42   David Mayerich   Updated for chang...
13
14
15
16
17
18
      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)
8d8c3ebd   David Mayerich   initial commit tr...
19
20
  
  if(STIM_FOUND)
190d5b42   David Mayerich   Updated for chang...
21
22
23
24
25
26
27
      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)