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)
|
|
|
|
set(BT_SRC_FILES qt-ui/btdeviceselectiondialog.cpp)
|
|
|
|
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
|
|
|
|
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-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})
|
|
|
|
|