Blame view

cmake/FindSTIM.cmake 933 Bytes
b4cea01a   David Mayerich   removed automated...
1
2
3
4
5
  # 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)
  
6a53ac0c   David Mayerich   updated optics fi...
6
  set(STIM_ROOT $ENV{STIM_ROOT})
b4cea01a   David Mayerich   removed automated...
7
  
6a53ac0c   David Mayerich   updated optics fi...
8
9
10
11
12
13
14
15
16
17
18
  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)
b4cea01a   David Mayerich   removed automated...
19
20
  
  if(STIM_FOUND)
6a53ac0c   David Mayerich   updated optics fi...
21
      set(STIM_INCLUDE_DIRS ${STIM_INCLUDE_DIRS})
b4cea01a   David Mayerich   removed automated...
22
  elseif(STIM_FOUND)
6a53ac0c   David Mayerich   updated optics fi...
23
  	message("STIM library not found. Set the STIM_ROOT environment variable to the STIM location.")
b4cea01a   David Mayerich   removed automated...
24
25
26
  	message("STIMLIB can be found here: https://git.stim.ee.uh.edu/codebase/stimlib")
  endif(STIM_FOUND)
  
6a53ac0c   David Mayerich   updated optics fi...
27
  find_package_handle_standard_args(STIM DEFAULT_MSG STIM_INCLUDE_DIRS)