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)
|
2015-09-02 23:52:34 +00:00
|
|
|
set(BT_CORE_SRC_FILES qtserialbluetooth.cpp)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# compile the core library, in C.
|
|
|
|
set(SUBSURFACE_CORE_LIB_SRCS
|
|
|
|
cochran.c
|
|
|
|
datatrak.c
|
|
|
|
deco.c
|
|
|
|
device.c
|
|
|
|
dive.c
|
|
|
|
divesite.c
|
|
|
|
divesite.cpp
|
|
|
|
divelist.c
|
|
|
|
equipment.c
|
|
|
|
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
|
|
|
|
planner.c
|
|
|
|
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
|
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
|
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})
|
|
|
|
|