mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cmake: add support to compile for Windows and Mac
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0a4444930e
commit
c41b1dc688
1 changed files with 14 additions and 1 deletions
|
@ -119,6 +119,19 @@ ADD_CUSTOM_TARGET(version ALL COMMAND
|
||||||
-P ${CMAKE_BINARY_DIR}/version.cmake
|
-P ${CMAKE_BINARY_DIR}/version.cmake
|
||||||
)
|
)
|
||||||
|
|
||||||
|
SET(PLATFORM_SRC unknown_platform.c)
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
SET(PLATFORM_SRC linux.c)
|
||||||
|
ENDIF()
|
||||||
|
IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
|
SET(PLATFORM_SRC macos.c)
|
||||||
|
ENDIF()
|
||||||
|
IF(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
|
SET(PLATFORM_SRC windows.c)
|
||||||
|
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lwsock32)
|
||||||
|
remove_definitions(-DUNICODE)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# compile the core library, in C.
|
# compile the core library, in C.
|
||||||
SET(SUBSURFACE_CORE_LIB_SRCS
|
SET(SUBSURFACE_CORE_LIB_SRCS
|
||||||
cochran.c
|
cochran.c
|
||||||
|
@ -151,7 +164,6 @@ SET(SUBSURFACE_CORE_LIB_SRCS
|
||||||
uemis.c
|
uemis.c
|
||||||
uemis-downloader.c
|
uemis-downloader.c
|
||||||
version.c
|
version.c
|
||||||
linux.c
|
|
||||||
#gettextfrommoc should be added because we are using it on the c-code.
|
#gettextfrommoc should be added because we are using it on the c-code.
|
||||||
gettextfromc.cpp
|
gettextfromc.cpp
|
||||||
#dirk ported some core functionality to c++.
|
#dirk ported some core functionality to c++.
|
||||||
|
@ -163,6 +175,7 @@ SET(SUBSURFACE_CORE_LIB_SRCS
|
||||||
configuredivecomputer.cpp
|
configuredivecomputer.cpp
|
||||||
configuredivecomputerthreads.cpp
|
configuredivecomputerthreads.cpp
|
||||||
divesitehelpers.cpp
|
divesitehelpers.cpp
|
||||||
|
${PLATFORM_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
#the interface, in C++
|
#the interface, in C++
|
||||||
|
|
Loading…
Add table
Reference in a new issue