-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFindSOIL.cmake
More file actions
50 lines (46 loc) · 1.09 KB
/
FindSOIL.cmake
File metadata and controls
50 lines (46 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# Try to find SOIL library and include path.
# Once done this will define
#
# SOIL_FOUND
# SOIL_INCLUDE_PATH
# SOIL_LIBRARY
#
IF(WIN32)
FIND_PATH( SOIL_INCLUDE_PATH SOIL/SOIL.h
$ENV{PROGRAMFILES}/SOIL/include
${SOIL_ROOT_DIR}/include
DOC "The directory where SOIL/SOIL.h resides")
FIND_LIBRARY( SOIL_LIBRARY
NAMES libSOIL.a SOIL
PATHS
$ENV{PROGRAMFILES}/SOIL/lib
${SOIL_ROOT_DIR}/lib
DOC "The SOIL library")
ELSE(WIN32)
FIND_PATH( SOIL_INCLUDE_PATH SOIL/SOIL.h
/usr/include
/usr/local/include
/sw/include
/opt/local/include
${SOIL_ROOT_DIR}/include
DOC "The directory where SOIL/SOIL.h resides")
# Prefer the static library.
FIND_LIBRARY( SOIL_LIBRARY
NAMES libSOIL.a SOIL
PATHS
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
${SOIL_ROOT_DIR}/lib
DOC "The SOIL library")
ENDIF(WIN32)
SET(SOIL_FOUND "NO")
IF(SOIL_INCLUDE_PATH AND SOIL_LIBRARY)
SET(SOIL_LIBRARIES ${SOIL_LIBRARY})
SET(SOIL_FOUND "YES")
message(STATUS "Found SOIL")
ENDIF(SOIL_INCLUDE_PATH AND SOIL_LIBRARY)