CMakeLists.txt 2.53 KB
Newer Older
schultezub's avatar
schultezub committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
################################################################################
# Project file for the tgt library
################################################################################
PROJECT(tgt)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
INCLUDE(../../cmake/commonconf.cmake)

MESSAGE(STATUS "Configuring tgt Library")

#
# Qt related stuff:
#
FIND_PACKAGE(Qt4 ${TUMVIS_REQUIRED_QT_VERSION} REQUIRED QtCore QtGui QtOpenGL)
INCLUDE(${QT_USE_FILE})

# configuration
IF(TGT_WITH_WMI)
schultezub's avatar
schultezub committed
18
19
20
	ADD_DEFINITIONS("-DTGT_WITH_WMI")
	ADD_DEFINITIONS("-D_WIN32_DCOM") #< for CoInitializeSecurity() to be defined
	LIST(APPEND TUMVIS_EXTERNAL_LIBRARIES "WbemUuid")
schultezub's avatar
schultezub committed
21
22
23
24
25
26
27
ENDIF(TGT_WITH_WMI)    

# headers
FILE(GLOB TGT_HEADERS *.h event/*.h navigation/*.h qt/*.qt)

# sources
SET(TGT_SOURCES
schultezub's avatar
schultezub committed
28
29
30
31
32
33
34
35
36
37
38
39
40
	assert.cpp
	bounds.cpp
	bspline.cpp
	buffer.cpp
	camera.cpp
	catmullromspline.cpp
	curve.cpp
	exception.cpp
	filesystem.cpp
	font.cpp
	framebufferobject.cpp
	frustum.cpp
	glcanvas.cpp
41
	glcontext.cpp
schultezub's avatar
schultezub committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
	gpucapabilities.cpp
	gpucapabilitieswindows.cpp
	guiapplication.cpp
	init.cpp
	light.cpp
	logmanager.cpp
	naturalcubicspline.cpp
	painter.cpp
	quadrenderer.cpp
	shadermanager.cpp
	spline.cpp
	stopwatch.cpp
	tesselator.cpp
	texture.cpp
	texturemanager.cpp
	texturereader.cpp
	texturereaderdevil.cpp
	texturereadertga.cpp
	textureunit.cpp
	tgt_gl.cpp
	timer.cpp
schultezub's avatar
schultezub committed
63
#event
schultezub's avatar
schultezub committed
64
65
66
67
68
	event/eventhandler.cpp
	event/eventlistener.cpp
	event/keyevent.cpp
	event/mouseevent.cpp
	event/timeevent.cpp
schultezub's avatar
schultezub committed
69
#navigation 
schultezub's avatar
schultezub committed
70
71
	navigation/navigation.cpp
	navigation/trackball.cpp
schultezub's avatar
schultezub committed
72
#qt
schultezub's avatar
schultezub committed
73
74
	qt/qtapplication.cpp
	qt/qtcanvas.cpp
75
76
77
	qt/qtglcontext.cpp
	qt/qtthreadedcanvas.cpp
	qt/qtthreadedpainter.cpp
schultezub's avatar
schultezub committed
78
	qt/qttimer.cpp
schultezub's avatar
schultezub committed
79
80
81
82
83
84
85
86
)

################################################################################
# define library target
################################################################################
ADD_LIBRARY(tgt ${TGT_SOURCES} ${TGT_HEADERS})
ADD_DEFINITIONS(${TUMVIS_DEFINITIONS} ${TUMVIS_MODULE_DEFINITIONS} ${QT_DEFINITIONS})
IF(TUMVIS_SHARED_LIBS AND MSVC)
schultezub's avatar
schultezub committed
87
	ADD_DEFINITIONS("-DTGT_BUILD_DLL")
schultezub's avatar
schultezub committed
88
89
90
91
92
93
94
95
ENDIF()
INCLUDE_DIRECTORIES(${TUMVIS_INCLUDE_DIRECTORIES} ${TUMVIS_MODULE_INCLUDE_DIRECTORIES})
TARGET_LINK_LIBRARIES(tgt ${TUMVIS_EXTERNAL_LIBRARIES} ${QT_LIBRARIES})

################################################################################
# deployment
################################################################################
IF(TUMVIS_ADD_INSTALL_TARGET)
schultezub's avatar
schultezub committed
96
97
98
	INSTALL(TARGETS tgt 
		RUNTIME DESTINATION .
	)
schultezub's avatar
schultezub committed
99
100
ENDIF()