-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
CMakeLists.txt
43 lines (36 loc) · 1.06 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
cmake_policy(SET CMP0091 NEW)
project(libsavitar)
cmake_minimum_required(VERSION 3.20)
find_package(standardprojectsettings REQUIRED)
find_package(pugixml REQUIRED)
set(savitar_SRCS
src/Namespace.cpp
src/ThreeMFParser.cpp
src/SceneNode.cpp
src/Scene.cpp
src/MeshData.cpp
src/Vertex.cpp
src/Face.cpp
)
if(BUILD_SHARED_LIBS)
add_library(Savitar SHARED ${savitar_SRCS})
if(WIN32)
set_target_properties(Savitar PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
else()
add_library(Savitar STATIC ${savitar_SRCS})
endif()
set_project_warnings(Savitar)
target_link_libraries(Savitar PUBLIC pugixml::pugixml)
target_include_directories(Savitar
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
)
option(ENABLE_TESTING "Enable unit-testing" OFF)
if (ENABLE_TESTING)
enable_testing()
add_subdirectory(tests)
endif()