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
	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
	gpucapabilities.cpp
	gpucapabilitieswindows.cpp
	guiapplication.cpp
	init.cpp
	light.cpp
	logmanager.cpp
	naturalcubicspline.cpp
	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
62
	vertexarrayobject.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
	qt/qtcontextmanager.cpp
76
77
	qt/qtglcontext.cpp
	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} ${CAMPVIS_MODULE_DEFINITIONS} ${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
90
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CAMPVIS_MODULE_INCLUDE_DIRECTORIES})
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()