forked from assimp/assimp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
47 lines (39 loc) · 1.4 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.1)
project(Assimp CXX C)
find_package(MBCMakeTools REQUIRED)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-fPIC)
add_definitions(-fvisibility=hidden)
set(CMAKE_CXX_STANDARD 11)
endif()
include_directories(
include
${CMAKE_CURRENT_BINARY_DIR}/include
)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
set(ENABLE_BOOST_WORKAROUND OFF CACHE BOOL
"If a simple implementation of the used Boost functions is used.
Slightly reduces functionality,
but enables builds without Boost available.")
if(ENABLE_BOOST_WORKAROUND)
include_directories(code/BoostWorkaround)
add_definitions(-DASSIMP_BUILD_BOOST_WORKAROUND)
message(STATUS "Building a non-boost version of Assimp.")
else()
set(Boost_DETAILED_FAILURE_MSG ON)
find_package(Boost REQUIRED MODULE)
if(NOT Boost_FOUND)
message(FATAL_ERROR
"Boost libraries(http://www.boost.org/) not found. "
"You can build a non-boost version of Assimp with slightly reduced "
"functionality by specifying -DENABLE_BOOST_WORKAROUND=ON.")
endif()
include_directories(${Boost_INCLUDE_DIRS})
endif()
set(NO_EXPORT OFF CACHE BOOL
"Disable Assimp's export functionality.")
if(NO_EXPORT)
add_definitions(-DASSIMP_BUILD_NO_EXPORT)
message(STATUS "Build an import-only version of Assimp.")
endif()
add_subdirectory(code/)