CMakeLists.txt 2.54 KB
Newer Older
schultezub's avatar
schultezub committed
1
2
3
4
5
6
7
8
9
10
11
12
################################################################################
# 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:
#
schultezub's avatar
schultezub committed
13
FIND_PACKAGE(Qt4 ${CampvisRequiredQtVersion} REQUIRED QtCore QtGui QtOpenGL)
schultezub's avatar
schultezub committed
14
15
16
17
INCLUDE(${QT_USE_FILE})

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

# headers
24
FILE(GLOB TGT_HEADERS *.h event/*.h navigation/*.h qt/*.h)
schultezub's avatar
schultezub committed
25
26
27

# sources
SET(TGT_SOURCES
schultezub's avatar
schultezub committed
28
29
30
	assert.cpp
	bounds.cpp
	bspline.cpp
31
	buffer.cpp
schultezub's avatar
schultezub committed
32
33
34
35
36
37
38
39
40
	camera.cpp
	catmullromspline.cpp
	curve.cpp
	exception.cpp
	filesystem.cpp
	font.cpp
	framebufferobject.cpp
	frustum.cpp
	glcanvas.cpp
41
	glcontextmanager.cpp
schultezub's avatar
schultezub committed
42
43
44
45
46
47
48
	gpucapabilities.cpp
	gpucapabilitieswindows.cpp
	guiapplication.cpp
	init.cpp
	light.cpp
	logmanager.cpp
	naturalcubicspline.cpp
49
	openglgarbagecollector.cpp
schultezub's avatar
schultezub committed
50
51
52
53
54
55
56
57
58
59
60
61
62
	painter.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
63
	vertexarrayobject.cpp
schultezub's avatar
schultezub committed
64
#event
schultezub's avatar
schultezub committed
65
66
67
68
69
	event/eventhandler.cpp
	event/eventlistener.cpp
	event/keyevent.cpp
	event/mouseevent.cpp
	event/timeevent.cpp
schultezub's avatar
schultezub committed
70
#navigation 
schultezub's avatar
schultezub committed
71
72
	navigation/navigation.cpp
	navigation/trackball.cpp
schultezub's avatar
schultezub committed
73
#qt
schultezub's avatar
schultezub committed
74
75
	qt/qtapplication.cpp
	qt/qtcanvas.cpp
76
	qt/qtcontextmanager.cpp
77
	qt/qtthreadedcanvas.cpp
schultezub's avatar
schultezub committed
78
	qt/qttimer.cpp
schultezub's avatar
schultezub committed
79
80
81
82
83
84
)

################################################################################
# define library target
################################################################################
ADD_LIBRARY(tgt ${TGT_SOURCES} ${TGT_HEADERS})
schultezub's avatar
schultezub committed
85
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${QT_DEFINITIONS})
schultezub's avatar
schultezub committed
86
IF(CAMPVIS_SHARED_LIBS AND MSVC)
schultezub's avatar
schultezub committed
87
	ADD_DEFINITIONS("-DTGT_BUILD_DLL")
schultezub's avatar
schultezub committed
88
ENDIF()
schultezub's avatar
schultezub committed
89
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
schultezub's avatar
schultezub committed
90
TARGET_LINK_LIBRARIES(tgt ${CampvisGlobalExternalLibs} ${QT_LIBRARIES})
schultezub's avatar
schultezub committed
91
92
93
94

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