-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
143 lines (124 loc) · 4.35 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
###############################################################################
# Ugurcan Sari
###############################################################################
# minimal version of cmake
cmake_minimum_required (VERSION 2.8)
project(Sceneography)
set(synch_DIR "${CMAKE_CURRENT_SOURCE_DIR}/home/ugurcan/Desktop/vorlesung_vr_projekte-master/libs/synchInstalled/cmake" CACHE PATH "Installation directory of synch library")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/modules/")
# include the general cmake settings
include (../general.cmake)
option (CAVE "Using CAVE configurations" OFF ) # Also forcing it to be always on
if(CAVE)
add_definitions(-DCAVE)
endif()
option (BUILD_SCENEGRAPH_TESTS "Build SceneGraph Tests" OFF)
# FIND LIBRARIES !
message(STATUS "Using Glfw")
find_package(Magnum REQUIRED
GL
GlfwApplication
MeshTools
Primitives
Shaders
DebugTools
SceneGraph
Trade)
find_package(synch REQUIRED)
find_package(MagnumIntegration REQUIRED ImGui)
# VTK
find_package(VTK)
# BOOST
FIND_PACKAGE( Boost 1.40 REQUIRED serialization system )
# INCLUDE STUFF
include(${VTK_USE_FILE})
#INCLUDE DIRECTORIES
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/tinyxml2)
include_directories(${CMAKE_SOURCE_DIR}/include)
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
include_directories(${CMAKE_SOURCE_DIR}/../pv_plugin/eafdata)
# SET STUFF
set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)
corrade_add_resource(Texture_Floor src/node/resources.conf)
# FILE STUFF
FILE(GLOB_RECURSE TINY_XML2
#3rdparty/tinyxml2/*.h
3rdparty/tinyxml2/*.cpp)
FILE(GLOB SOURCE_FILES
src/*.cpp)
FILE(GLOB SOURCE_MASTER
src/master/*.cpp)
FILE(GLOB SOURCE_NODE
src/node/*.cpp)
###################################################################
# Master Executable
###################################################################
set(EXECUTABLE_OUTPUT_PATH ../bin/)
add_executable(scene_master
${SOURCE_MASTER}
src/GUI/ImGui_interface.cpp
)
target_link_libraries(scene_master PRIVATE
Magnum::Application
Magnum::GL
Magnum::GlfwApplication
Magnum::DebugTools
Magnum::Magnum
Magnum::MeshTools
Magnum::Primitives
Magnum::SceneGraph
Magnum::Shaders
Magnum::Trade
MagnumIntegration::ImGui # bunlari 18 nisanda ekledim
synch
${FLUID_BASENAME}Lib ${ADDITIONAL_FLUID_LIBRARIES}
${Boost_LIBRARIES} )
###################################################################
# Node Executable
###################################################################
set(EXECUTABLE_OUTPUT_PATH ../bin/)
add_executable(scene
${SOURCE_NODE}
${Texture_Floor}
../pv_plugin/eafdata/vtkEAFWriter.cxx
src/GUI/ImGui_interface.cpp
)
target_link_libraries(scene PRIVATE
Magnum::Application
Magnum::GL
Magnum::GlfwApplication
Magnum::Magnum
Magnum::MeshTools
Magnum::DebugTools
Magnum::Primitives
Magnum::SceneGraph
Magnum::Shaders
Magnum::Trade
MagnumIntegration::ImGui
synch
${FLUID_BASENAME}Lib ${ADDITIONAL_FLUID_LIBRARIES} ${Boost_LIBRARIES} )
install(TARGETS scene DESTINATION bin/scenograph)
install(TARGETS scene_master DESTINATION bin/scenograph)
FILE(GLOB scenenograph_files "${CMAKE_CURRENT_SOURCE_DIR}/scenograph_starters/*")
install(FILES ${scenenograph_files} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ DESTINATION bin)
####################################################################
# Build Tests
####################################################################
if(BUILD_SCENEGRAPH_TESTS)
# BOOST
FIND_PACKAGE( Boost 1.40 REQUIRED unit_test_framework)
#INCLUDE DIRECTORIES
include_directories(${CMAKE_SOURCE_DIR}/../include)
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
FILE(GLOB TESTSOURCES tests/*.cpp)
set(EXECUTABLE_OUTPUT_PATH ../bin/)
add_executable(tests
${TESTSOURCES}
)
target_link_libraries(tests PRIVATE
${FLUID_BASENAME}Lib ${ADDITIONAL_FLUID_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
endif(BUILD_SCENEGRAPH_TESTS)
FILE(GLOB geofiles "${CMAKE_CURRENT_SOURCE_DIR}/geometry_files/*.eaf")
install(FILES ${geofiles} DESTINATION geo_examples)
#FILE(GLOB configurations "${CMAKE_CURRENT_SOURCE_DIR}/geometry_configurations/*")
#install(FILES ${configurations} DESTINATION geometry_configurations)