2015-09-02 23:52:34 +00:00
|
|
|
set(PLATFORM_SRC unknown_platform.c)
|
2015-11-05 15:57:47 +00:00
|
|
|
message(STATUS "system name ${CMAKE_SYSTEM_NAME}")
|
2015-09-02 23:52:34 +00:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
2015-11-05 15:57:47 +00:00
|
|
|
if(ANDROID)
|
|
|
|
set(PLATFORM_SRC android.cpp)
|
|
|
|
else()
|
|
|
|
set(PLATFORM_SRC linux.c)
|
|
|
|
endif()
|
2015-11-07 00:51:31 +00:00
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
|
|
|
set(PLATFORM_SRC android.cpp)
|
2015-09-02 23:52:34 +00:00
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
|
|
set(PLATFORM_SRC macos.c)
|
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|
|
|
set(PLATFORM_SRC windows.c)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(FTDISUPPORT)
|
|
|
|
set(SERIAL_FTDI serial_ftdi.c)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(BTSUPPORT)
|
|
|
|
add_definitions(-DBT_SUPPORT)
|
2015-11-16 09:49:58 +00:00
|
|
|
set(BT_SRC_FILES desktop-widgets/btdeviceselectiondialog.cpp)
|
2017-10-06 14:52:17 +00:00
|
|
|
set(BT_CORE_SRC_FILES qtserialbluetooth.cpp btdiscovery.cpp)
|
2015-09-02 23:52:34 +00:00
|
|
|
endif()
|
|
|
|
|
2017-06-13 02:47:50 +00:00
|
|
|
if(BLESUPPORT)
|
|
|
|
add_definitions(-DBLE_SUPPORT)
|
2017-10-06 14:52:17 +00:00
|
|
|
set(BT_CORE_SRC_FILES ${BT_CORE_SRC_FILES} qt-ble.cpp)
|
2017-06-13 02:47:50 +00:00
|
|
|
endif()
|
|
|
|
|
2015-09-02 23:52:34 +00:00
|
|
|
# compile the core library, in C.
|
|
|
|
set(SUBSURFACE_CORE_LIB_SRCS
|
|
|
|
cochran.c
|
|
|
|
datatrak.c
|
|
|
|
deco.c
|
|
|
|
device.c
|
|
|
|
dive.c
|
|
|
|
divesite.c
|
2017-12-08 14:13:08 +00:00
|
|
|
divesite-helper.cpp
|
2015-09-02 23:52:34 +00:00
|
|
|
divelist.c
|
|
|
|
equipment.c
|
2017-10-26 12:33:02 +00:00
|
|
|
errorhelper.c
|
2015-09-02 23:52:34 +00:00
|
|
|
file.c
|
2016-03-02 21:49:59 +00:00
|
|
|
gas-model.c
|
2015-09-02 23:52:34 +00:00
|
|
|
git-access.c
|
|
|
|
libdivecomputer.c
|
|
|
|
liquivision.c
|
|
|
|
load-git.c
|
|
|
|
membuffer.c
|
|
|
|
ostctools.c
|
|
|
|
parse-xml.c
|
2017-11-27 17:41:10 +00:00
|
|
|
parse.c
|
2017-11-28 19:24:53 +00:00
|
|
|
import-suunto.c
|
2017-11-28 19:31:27 +00:00
|
|
|
import-shearwater.c
|
2017-11-28 19:34:37 +00:00
|
|
|
import-cobalt.c
|
2017-11-28 19:36:57 +00:00
|
|
|
import-divinglog.c
|
2015-09-02 23:52:34 +00:00
|
|
|
planner.c
|
2017-05-25 10:57:06 +00:00
|
|
|
plannernotes.c
|
2015-09-02 23:52:34 +00:00
|
|
|
profile.c
|
|
|
|
gaspressures.c
|
|
|
|
worldmap-save.c
|
|
|
|
save-git.c
|
|
|
|
save-xml.c
|
|
|
|
save-html.c
|
|
|
|
sha1.c
|
|
|
|
statistics.c
|
|
|
|
strtod.c
|
|
|
|
subsurfacestartup.c
|
|
|
|
time.c
|
|
|
|
uemis.c
|
|
|
|
uemis-downloader.c
|
|
|
|
version.c
|
|
|
|
# gettextfrommoc should be added because we are using it on the c-code.
|
|
|
|
gettextfromc.cpp
|
|
|
|
# dirk ported some core functionality to c++.
|
|
|
|
qthelper.cpp
|
|
|
|
divecomputer.cpp
|
|
|
|
exif.cpp
|
|
|
|
subsurfacesysinfo.cpp
|
|
|
|
devicedetails.cpp
|
|
|
|
configuredivecomputer.cpp
|
|
|
|
configuredivecomputerthreads.cpp
|
|
|
|
divesitehelpers.cpp
|
|
|
|
taxonomy.c
|
|
|
|
checkcloudconnection.cpp
|
|
|
|
windowtitleupdate.cpp
|
|
|
|
divelogexportlogic.cpp
|
|
|
|
qt-init.cpp
|
|
|
|
qtserialbluetooth.cpp
|
2015-09-03 17:20:19 +00:00
|
|
|
metrics.cpp
|
|
|
|
color.cpp
|
2015-10-09 22:18:45 +00:00
|
|
|
pluginmanager.cpp
|
2015-11-06 18:39:59 +00:00
|
|
|
imagedownloader.cpp
|
2015-11-09 20:14:20 +00:00
|
|
|
isocialnetworkintegration.cpp
|
2015-11-19 02:30:55 +00:00
|
|
|
gpslocation.cpp
|
2016-01-26 14:24:27 +00:00
|
|
|
cloudstorage.cpp
|
2017-04-18 17:14:03 +00:00
|
|
|
downloadfromdcthread.cpp
|
2017-10-06 14:51:30 +00:00
|
|
|
connectionlistmodel.cpp
|
2016-01-07 18:01:24 +00:00
|
|
|
|
|
|
|
#Subsurface Qt have the Subsurface structs QObjectified for easy access via QML.
|
|
|
|
subsurface-qt/DiveObjectHelper.cpp
|
2016-07-31 21:27:07 +00:00
|
|
|
subsurface-qt/CylinderObjectHelper.cpp
|
2016-01-22 20:37:18 +00:00
|
|
|
subsurface-qt/SettingsObjectWrapper.cpp
|
2017-04-18 17:14:03 +00:00
|
|
|
|
2015-09-02 23:52:34 +00:00
|
|
|
${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})
|
|
|
|
|