forked from bergstr11/three.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (32 loc) · 1.16 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
cmake_minimum_required(VERSION 3.7)
project(Three.pp)
set(CMAKE_DEBUG_POSTFIX d)
set(THREE_VERSION 0.9)
set(THREE_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
message("path: ${CMAKE_PREFIX_PATH}")
if(WIN32)
add_definitions(-DNOMINMAX)
if(${ASSIMP_PATH})
set(ASSIMP_PREFIX ${ASSIMP_PATH})
else()
set(ASSIMP_PREFIX $ENV{ASSIMP_PATH})
endif(${ASSIMP_PATH})
if(NOT IS_DIRECTORY ${ASSIMP_PREFIX})
message(FATAL_ERROR "ASSIMP_PATH variable (CMake or env) must point to a valid directory")
endif(NOT IS_DIRECTORY ${ASSIMP_PREFIX})
set(CMAKE_PREFIX_PATH "${ASSIMP_PREFIX};${CMAKE_PREFIX_PATH}")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if(${THREEPP_DEST})
set(THREEPP_DEST ${THREEPP_DEST})
else()
set(THREEPP_DEST $ENV{THREEPP_DEST})
endif(${THREEPP_DEST})
if(NOT IS_DIRECTORY ${THREEPP_DEST})
message(FATAL_ERROR "THREEPP_DEST variable (CMake or env) must point to a valid directory")
endif(NOT IS_DIRECTORY ${THREEPP_DEST})
set(CMAKE_INSTALL_PREFIX "${THREEPP_DEST}" CACHE PATH "..." FORCE)
endif()
endif(WIN32)
add_subdirectory(threepp)
add_subdirectory(examples)
add_subdirectory(3rdparty/tinyxml2)