Skip to content

Instantly share code, notes, and snippets.

@dogukanarat
Created May 18, 2024 11:08
Show Gist options
  • Save dogukanarat/6f81e54320f974ab729eb5164a69f437 to your computer and use it in GitHub Desktop.
Save dogukanarat/6f81e54320f974ab729eb5164a69f437 to your computer and use it in GitHub Desktop.
FindSOIL cmake module
# FindSOIL - Find FindSSOILOIL library
# This module finds if SOIL is installed and determines where the include
# files and libraries are.
# This module defines the following variables:
# SOIL_FOUND, if false, do not try to link to SOIL
# SOIL_INCLUDE_DIRS, where to find SOIL.h
# SOIL_LIBRARY, the SOIL library to link to
find_library(
SOIL_LIBRARY
NAMES SOIL
PATHS
/usr/lib
/usr/local/lib
/opt/local/lib
)
find_path(
SOIL_INCLUDE_DIRS
NAMES SOIL/SOIL.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
)
if(SOIL_LIBRARY AND SOIL_INCLUDE_DIRS)
set(SOIL_FOUND TRUE)
message(STATUS "Found SOIL: ${SOIL_LIBRARY} ${SOIL_INCLUDE_DIRS}")
else()
set(SOIL_FOUND FALSE)
message(STATUS "SOIL not found")
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment