From 469a84c10ba60fba4a513c1b1a0eea600cd7b22f Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Wed, 10 May 2017 18:44:51 +0500 Subject: 2017-05-10 --- cmake_modules/FindSOIL.cmake | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 cmake_modules/FindSOIL.cmake (limited to 'cmake_modules/FindSOIL.cmake') diff --git a/cmake_modules/FindSOIL.cmake b/cmake_modules/FindSOIL.cmake new file mode 100644 index 0000000..60eba06 --- /dev/null +++ b/cmake_modules/FindSOIL.cmake @@ -0,0 +1,28 @@ +# Find SOIL +# Find the SOIL includes and library +# +# SOIL_INCLUDE_DIRS - where to find SOIL.h, etc. +# SOIL_LIBRARIES - List of libraries when using SOIL. +# SOIL_FOUND - True if SOIL found. +# +# Based on the FindZLIB.cmake module. + +IF (SOIL_INCLUDE_DIR) + # Already in cache, be silent + SET(SOIL_FIND_QUIETLY TRUE) +ENDIF (SOIL_INCLUDE_DIR) + +FIND_PATH(SOIL_INCLUDE_DIR SOIL.h PATH_SUFFIXES include/SOIL include) + +SET(SOIL_NAMES SOIL Soil soil) +FIND_LIBRARY(SOIL_LIBRARY NAMES ${SOIL_NAMES} ) +MARK_AS_ADVANCED( SOIL_LIBRARY SOIL_INCLUDE_DIR ) + +# Per-recommendation +SET(SOIL_INCLUDE_DIRS "${SOIL_INCLUDE_DIR}") +SET(SOIL_LIBRARIES "${SOIL_LIBRARY}") + +# handle the QUIETLY and REQUIRED arguments and set SOIL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(SOIL DEFAULT_MSG SOIL_LIBRARIES SOIL_INCLUDE_DIRS) \ No newline at end of file -- cgit v1.2.3