-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindASSIMP.cmake
52 lines (46 loc) · 1.3 KB
/
FindASSIMP.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
# - Try to find Assimp
# Once done, this will define
#
# ASSIMP_FOUND - system has Assimp
# ASSIMP_INCLUDE_DIR - the Assimp include directories
# ASSIMP_LIBRARIES - link these to use Assimp
FIND_PATH( ASSIMP_INCLUDE_DIR assimp/mesh.h
${ASSIMP_ROOT_DIR}/include
/usr/include
/usr/local/include
/opt/local/include
)
FIND_LIBRARY( ASSIMP_LIBRARY assimp
${ASSIMP_ROOT_DIR}/lib
/usr/lib64
/usr/lib
/usr/local/lib
/opt/local/lib
)
# fix for static linking of assimp in windows
IF( WIN32 )
FIND_LIBRARY( ZLIB_LIBRARY zlibstatic
${ASSIMP_ROOT_DIR}/lib
/usr/lib64
/usr/lib
/usr/local/lib
/opt/local/lib
)
IF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY AND ZLIB_LIBRARY)
SET( ASSIMP_FOUND TRUE )
SET( ASSIMP_LIBRARIES ${ZLIB_LIBRARY} )
ENDIF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY AND ZLIB_LIBRARY)
ENDIF( WIN32 )
IF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY)
SET( ASSIMP_FOUND TRUE )
SET( ASSIMP_LIBRARIES ${ASSIMP_LIBRARIES} ${ASSIMP_LIBRARY} )
ENDIF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY)
IF(ASSIMP_FOUND)
IF(NOT ASSIMP_FIND_QUIETLY)
MESSAGE(STATUS "Found ASSIMP: ${ASSIMP_LIBRARY}")
ENDIF(NOT ASSIMP_FIND_QUIETLY)
ELSE(ASSIMP_FOUND)
IF(ASSIMP_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find libASSIMP")
ENDIF(ASSIMP_FIND_REQUIRED)
ENDIF(ASSIMP_FOUND)