diff --git a/cmake/FindSTIM.cmake b/cmake/FindSTIM.cmake index 919f33c..a83481a 100644 --- a/cmake/FindSTIM.cmake +++ b/cmake/FindSTIM.cmake @@ -1,9 +1,22 @@ -include(FindPackageHandleStandardArgs) - -set(STIM_INCLUDE_DIR $ENV{STIMLIB_PATH}) - -find_package_handle_standard_args(STIM DEFAULT_MSG STIM_INCLUDE_DIR) - -if(STIM_FOUND) - set(STIM_INCLUDE_DIRS ${STIM_INCLUDE_DIR}) -endif() \ No newline at end of file +# 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_INCLUDE_DIR $ENV{STIMLIB_PATH}) + +find_package_handle_standard_args(STIM DEFAULT_MSG STIM_INCLUDE_DIR) + +if(STIM_FOUND) + set(STIM_INCLUDE_DIRS ${STIM_INCLUDE_DIR}) +elseif(STIM_FOUND) + #if the STIM library isn't found, download it + #file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/stimlib) #remove the stimlib directory if it exists + #set(STIM_GIT "https://git.stim.ee.uh.edu/codebase/stimlib.git") + #execute_process(COMMAND git clone --depth 1 ${STIM_GIT} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + #set(STIM_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/stimlib" CACHE TYPE PATH) + message("STIM library not found. Set the STIMLIB_PATH environment variable to the STIMLIB 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_DIR) diff --git a/stim/envi/agilent_binary.h b/stim/envi/agilent_binary.h index 95a38c5..87662d1 100644 --- a/stim/envi/agilent_binary.h +++ b/stim/envi/agilent_binary.h @@ -4,6 +4,7 @@ #include #include +#include //CUDA //#ifdef CUDA_FOUND diff --git a/stim/image/image.h b/stim/image/image.h index 235be8a..abea2e8 100644 --- a/stim/image/image.h +++ b/stim/image/image.h @@ -10,6 +10,7 @@ #include #include #include +#include namespace stim{ /// This static class provides the STIM interface for loading, saving, and storing 2D images. -- libgit2 0.21.4