aboutsummaryrefslogtreecommitdiffstats
path: root/core/CMakeLists.txt
blob: 4105b354924bbf001bae65af06a910849d092532 (plain) (blame)
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
set(PLATFORM_SRC unknown_platform.c)
message(STATUS "system name ${CMAKE_SYSTEM_NAME}")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
	if(ANDROID)
		set(PLATFORM_SRC android.cpp)
	else()
		set(PLATFORM_SRC unix.c)
	endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
	set(PLATFORM_SRC android.cpp)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
	set(PLATFORM_SRC macos.c)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
	set(PLATFORM_SRC windows.c)
elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
	set(PLATFORM_SRC unix.c)
endif()

if(FTDISUPPORT)
	set(SERIAL_FTDI serial_ftdi.c)
endif()

if(BTSUPPORT)
	add_definitions(-DBT_SUPPORT)
	set(BT_SRC_FILES desktop-widgets/btdeviceselectiondialog.cpp)
	set(BT_CORE_SRC_FILES qtserialbluetooth.cpp btdiscovery.cpp)
endif()

if(BLESUPPORT)
	add_definitions(-DBLE_SUPPORT)
	set(BT_CORE_SRC_FILES ${BT_CORE_SRC_FILES} qt-ble.cpp)
endif()

# compile the core library part in C, part in C++
set(SUBSURFACE_CORE_LIB_SRCS
	checkcloudconnection.cpp
	cloudstorage.cpp
	cochran.c
	color.cpp
	configuredivecomputer.cpp
	configuredivecomputerthreads.cpp
	connectionlistmodel.cpp
	datatrak.c
	deco.c
	device.c
	devicedetails.cpp
	dive.c
	divecomputer.cpp
	divelogexportlogic.cpp
	divesite.c
	divesitehelpers.cpp
	divesite-helper.cpp
	divelist.c
	downloadfromdcthread.cpp
	equipment.c
	errorhelper.c
	exif.cpp
	file.c
	format.cpp
	gaspressures.c
	gas-model.c
	gettextfromc.cpp
	git-access.c
	gpslocation.cpp
	imagedownloader.cpp
	isocialnetworkintegration.cpp
	libdivecomputer.c
	liquivision.c
	load-git.c
	membuffer.c
	metadata.cpp
	metrics.cpp
	ostctools.c
	parse-xml.c
	parse.c
	import-suunto.c
	import-shearwater.c
	import-cobalt.c
	import-divinglog.c
	import-csv.c
	planner.c
	plannernotes.c
	pluginmanager.cpp
	profile.c
	qthelper.cpp
	qt-init.cpp
	save-git.c
	save-xml.c
	save-html.c
	sha1.c
	statistics.c
	strtod.c
	subsurfacestartup.c
	subsurfacesysinfo.cpp
	taxonomy.c
	time.c
	uemis.c
	uemis-downloader.c
	version.c
	videoframeextractor.cpp
	windowtitleupdate.cpp
	worldmap-save.c

	# classes to manage struct preferences for QWidget and QML
	settings/qPref.cpp
	settings/qPrefAnimations.cpp
	settings/qPrefCloudStorage.cpp
	settings/qPrefDisplay.cpp
	settings/qPrefDiveComputer.cpp
	settings/qPrefDivePlanner.cpp
	settings/qPrefFacebook.cpp
	settings/qPrefGeocoding.cpp
	settings/qPrefLanguage.cpp
	settings/qPrefLocationService.cpp
	settings/qPrefPartialPressureGas.cpp
	settings/qPrefPrivate.cpp
	settings/qPrefProxy.cpp
	settings/qPrefTechnicalDetails.cpp
	settings/qPrefUnit.cpp
	settings/qPrefUpdateManager.cpp

	#Subsurface Qt have the Subsurface structs QObjectified for easy access via QML.
	subsurface-qt/DiveObjectHelper.cpp
	subsurface-qt/CylinderObjectHelper.cpp
	subsurface-qt/SettingsObjectWrapper.cpp

	${SERIAL_FTDI}
	${PLATFORM_SRC}
	${BT_CORE_SRC_FILES}
)
source_group("Subsurface Core" FILES ${SUBSURFACE_CORE_LIB_SRCS})

add_library(subsurface_corelib STATIC ${SUBSURFACE_CORE_LIB_SRCS} )
target_link_libraries(subsurface_corelib ${QT_LIBRARIES})