-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
67 lines (55 loc) · 2.24 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
cmake_minimum_required(VERSION 3.13...3.21)
project(FbxStream)
include(cmake/utils.cmake)
#------------------------------------------------------------------------------
# options
#------------------------------------------------------------------------------
if( IS_MACOSX )
option(BUILD_UB2 "Build Universal Binary 2 (UB2) Intel64+arm64" ON)
endif()
#------------------------------------------------------------------------------
# utilities and compiler configuration
#-----------------------------------------------s-------------------------------
if( IS_MACOSX )
if (BUILD_UB2)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
else()
set(CMAKE_OSX_ARCHITECTURES "x86_64")
endif()
endif()
#------------------------------------------------------------------------------
# includes
#------------------------------------------------------------------------------
include(cmake/compiler_config.cmake)
include(cmake/fmt.cmake)
#------------------------------------------------------------------------------
# global options
#------------------------------------------------------------------------------
if( IS_LINUX )
# Use RUNPATH instead of RPATH for all shared libs and executables on Linux
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--enable-new-dtags")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--enable-new-dtags")
endif()
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
)
# enable assert in RelwithDebInfo
string( REPLACE "/DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
#------------------------------------------------------------------------------
# modules and definitions
#------------------------------------------------------------------------------
find_package(FBX REQUIRED)
if( IS_LINUX )
find_package(LibXml2 REQUIRED)
if(NOT LibXml2_FOUND)
message(STATUS "LibXml2 Library was not found!!!")
endif()
endif()
if( NOT FBX_FOUND )
message(STATUS "FBX Library was not found!!!")
endif()
#------------------------------------------------------------------------------
# subdirectories
#------------------------------------------------------------------------------
add_subdirectory(src)