CMakeLists.txt 2.48 KB
Newer Older
schultezub's avatar
schultezub committed
1
################################################################################
2
# Project file for the cgt library
schultezub's avatar
schultezub committed
3
################################################################################
4
PROJECT(cgt)
schultezub's avatar
schultezub committed
5
6
INCLUDE(../../cmake/commonconf.cmake)

7
MESSAGE(STATUS "Configuring cgt Library")
schultezub's avatar
schultezub committed
8
9

# configuration
10
11
IF(CGT_WITH_WMI)
	ADD_DEFINITIONS("-DCGT_WITH_WMI")
schultezub's avatar
schultezub committed
12
	ADD_DEFINITIONS("-D_WIN32_DCOM") #< for CoInitializeSecurity() to be defined
schultezub's avatar
schultezub committed
13
	LIST(APPEND CampvisGlobalExternalLibs "WbemUuid")
14
ENDIF(CGT_WITH_WMI)
15

16

schultezub's avatar
schultezub committed
17
# headers
18
FILE(GLOB CGT_HEADERS *.h event/*.h navigation/*.h)
schultezub's avatar
schultezub committed
19
20

# sources
21
SET(CGT_SOURCES
schultezub's avatar
schultezub committed
22
23
	assert.cpp
	bounds.cpp
24
	buffer.cpp
schultezub's avatar
schultezub committed
25
26
27
28
29
30
	camera.cpp
	exception.cpp
	filesystem.cpp
	framebufferobject.cpp
	frustum.cpp
	glcanvas.cpp
31
	glcontextmanager.cpp
schultezub's avatar
schultezub committed
32
33
34
35
	gpucapabilities.cpp
	gpucapabilitieswindows.cpp
	init.cpp
	logmanager.cpp
36
37
	job.cpp
	opengljobprocessor.cpp
schultezub's avatar
schultezub committed
38
	painter.cpp
39
	runnable.cpp
schultezub's avatar
schultezub committed
40
41
42
43
44
45
	shadermanager.cpp
	stopwatch.cpp
	texture.cpp
	texturereader.cpp
	texturereadertga.cpp
	textureunit.cpp
46
	cgt_gl.cpp
schultezub's avatar
schultezub committed
47
	timer.cpp
48
	vertexarrayobject.cpp
schultezub's avatar
schultezub committed
49
#event
schultezub's avatar
schultezub committed
50
51
52
53
54
	event/eventhandler.cpp
	event/eventlistener.cpp
	event/keyevent.cpp
	event/mouseevent.cpp
	event/timeevent.cpp
schultezub's avatar
schultezub committed
55
#navigation 
schultezub's avatar
schultezub committed
56
57
	navigation/navigation.cpp
	navigation/trackball.cpp
schultezub's avatar
schultezub committed
58
59
)

60
61

# Qt related stuff:
62
63
IF(CGT_WITH_QT)
	LIST(APPEND CGT_HEADERS 
64
65
66
67
		qt/qtcanvas.h
		qt/qtthreadedcanvas.h
		qt/qttimer.h)
	
68
	LIST(APPEND CGT_SOURCES 
69
70
71
		qt/qtcanvas.cpp
		qt/qtthreadedcanvas.cpp
		qt/qttimer.cpp)
72
ENDIF(CGT_WITH_QT)
73
74


schultezub's avatar
schultezub committed
75
76
77
################################################################################
# define library target
################################################################################
78
ADD_LIBRARY(cgt ${CGT_SOURCES} ${CGT_HEADERS})
79
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions})
schultezub's avatar
schultezub committed
80
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
81
TARGET_LINK_LIBRARIES(cgt ${CampvisGlobalExternalLibs} Qt5::Widgets Qt5::OpenGL)
schultezub's avatar
schultezub committed
82

83
# if CGT is built as a shared library, CMake will define the following flag to instruct the code to
84
# export DLL symbols
85
SET_TARGET_PROPERTIES(cgt PROPERTIES DEFINE_SYMBOL "CGT_BUILD_DLL")
86
87


schultezub's avatar
schultezub committed
88
89
90
################################################################################
# deployment
################################################################################
schultezub's avatar
schultezub committed
91
IF(CAMPVIS_ADD_INSTALL_TARGET)
92
	INSTALL(TARGETS cgt 
schultezub's avatar
schultezub committed
93
94
		RUNTIME DESTINATION .
	)
schultezub's avatar
schultezub committed
95
96
ENDIF()

97
98

INSTALL(TARGETS cgt DESTINATION exports EXPORT campvis-targets)