-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindIrrlicht.cmake
76 lines (65 loc) · 1.92 KB
/
FindIrrlicht.cmake
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# - Try to find Irrlicht
# Once done this will define
#
# IRRLICHT_FOUND - system has Irrlicht
# IRRLICHT_INCLUDE_DIRS - the Irrlicht include directory
# IRRLICHT_LIBRARIES - Link these to use Irrlicht
# IRRLICHT_DEFINITIONS - Compiler switches required for using Irrlicht
#
# Copyright (c) 2006 Andreas Schneider <[email protected]>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (IRRLICHT_LIBRARIES AND IRRLICHT_INCLUDE_DIRS)
# in cache already
set(IRRLICHT_FOUND TRUE)
else (IRRLICHT_LIBRARIES AND IRRLICHT_INCLUDE_DIRS)
find_path(IRRLICHT_INCLUDE_DIR
NAMES
irrlicht.h
PATHS
/usr/include
/usr/include/irrlicht
/usr/local/include
/usr/local/include/irrlicht
/opt/local/include
/sw/include
)
find_library(IRRLICHT_LIBRARY
NAMES
Irrlicht
PATHS
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
)
if (IRRLICHT_LIBRARY)
set(IRRLICHT_FOUND TRUE)
endif (IRRLICHT_LIBRARY)
set(IRRLICHT_INCLUDE_DIRS
${IRRLICHT_INCLUDE_DIR}
)
if (IRRLICHT_FOUND)
set(IRRLICHT_LIBRARIES
${IRRLICHT_LIBRARIES}
${IRRLICHT_LIBRARY}
)
endif (IRRLICHT_FOUND)
if (IRRLICHT_INCLUDE_DIRS AND IRRLICHT_LIBRARIES)
set(IRRLICHT_FOUND TRUE)
endif (IRRLICHT_INCLUDE_DIRS AND IRRLICHT_LIBRARIES)
if (IRRLICHT_FOUND)
if (NOT IRRLICHT_FIND_QUIETLY)
message(STATUS "Found Irrlicht: ${IRRLICHT_LIBRARIES}")
endif (NOT IRRLICHT_FIND_QUIETLY)
else (IRRLICHT_FOUND)
if (IRRLICHT_FIND_REQUIRED)
message(FATAL_ERROR "Could not find Irrlicht")
endif (IRRLICHT_FIND_REQUIRED)
endif (IRRLICHT_FOUND)
# show the IRRLICHT_INCLUDE_DIRS and IRRLICHT_LIBRARIES variables only in the advanced view
mark_as_advanced(IRRLICHT_INCLUDE_DIRS IRRLICHT_LIBRARIES)
endif (IRRLICHT_LIBRARIES AND IRRLICHT_INCLUDE_DIRS)