CMakeLists.txt 2.34 KB
Newer Older
deuce's avatar
deuce committed
1 2 3 4
project (SyncTERM C)

cmake_minimum_required(VERSION 2.8.11)

deuce's avatar
deuce committed
5 6 7
# CPack stuff...
set(CPACK_PACKAGE_NAME SyncTERM)
set(CPACK_PACKAGE_VENDOR Deuce)
deuce's avatar
deuce committed
8
set(CPACK_PACKAGE_VERSION_MAJOR 1)
deuce's avatar
deuce committed
9
set(CPACK_PACKAGE_VERSION_MINOR 2)
deuce's avatar
deuce committed
10
set(CPACK_PACKAGE_VERSION_PATCH beta)
deuce's avatar
deuce committed
11 12 13 14 15 16 17
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SyncTERM is a Telnet/RLogin/SSH BBS Client")
set(CPACK_PACKAGE_INSTALL_DIRECTORY SyncTERM)
#set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_LIST_DIR}/syncterm.png)
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_LIST_DIR}/LICENCE)
set(CPACK_MONOLITHIC_INSTALL TRUE)
set(CPACK_PACKAGE_EXECUTABLES "syncterm;SyncTERM")
set(CPACK_DEBIAN_PACKAGE_NAME syncterm)
18
set(CPACK_DEBIAN_PACKAGE_VERSION 1.2b)
deuce's avatar
deuce committed
19 20 21 22
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Stephen Hurd")
INCLUDE(CPack)
######

deuce's avatar
deuce committed
23
INCLUDE (../build/SynchronetMacros.cmake)
24 25
INCLUDE (CheckIncludeFiles)

deuce's avatar
deuce committed
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
set(SOURCE
	uifc32.c
	uifcx.c
)

set(SOURCE
	bbslist.c
	uifcinit.c
	../uifc/filepick.c
	fonts.c
	rlogin.c
	telnet_io.c
	conn_telnet.c
	conn.c
	../sbbs3/telnet.c
	term.c
	window.c
	menu.c
	../smblib/crc16.c
	../smblib/crc32.c
	../sbbs3/zmodem.c
	../sbbs3/xmodem.c
	st_crypt.c
	syncterm.c
	ooii.c
	ooii_logons.c
	ooii_cmenus.c
	ooii_bmenus.c
	ooii_sounds.c
	modem.c
	conn_pty.c
)

if(WIN32)
60
	list(APPEND CMAKE_REQUIRED_INCLUDES ${CMAKE_CURRENT_LIST_DIR}/../../3rdp/win32.release/cryptlib/include)
deuce's avatar
deuce committed
61 62
endif()

63 64 65 66 67
CHECK_INCLUDE_FILES(cryptlib.h HAS_CRYPTLIB_H)
if(HAS_CRYPTLIB_H)
	list(APPEND SOURCE ssh.c)
endif()

deuce's avatar
deuce committed
68
add_executable(syncterm ${SOURCE})
69
require_libs(syncterm xpdev ciolib uifc comio)
deuce's avatar
deuce committed
70 71 72

target_include_directories(syncterm PRIVATE ../sbbs3)
target_include_directories(syncterm PRIVATE ../smblib)
deuce's avatar
deuce committed
73

74 75
if(NOT HAS_CRYPTLIB_H)
    target_compile_definitions(syncterm PRIVATE WITHOUT_CRYPTLIB)
76 77 78 79
else()
	if(WIN32)
		target_include_directories(syncterm PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../../3rdp/win32.release/cryptlib/include)
	endif()
80
endif()
deuce's avatar
deuce committed
81 82 83 84 85 86 87 88 89 90 91 92

if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
	target_link_libraries(syncterm util)
elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
	target_link_libraries(syncterm util)
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
	target_link_libraries(syncterm util)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
	target_link_libraries(syncterm util)
endif()

install(TARGETS syncterm DESTINATION bin)
deuce's avatar
deuce committed
93 94 95 96
if(UNIX)
	install(FILES syncterm.desktop DESTINATION share/applications)
        install(FILES syncterm.png DESTINATION share/icons/hicolor/64x64/apps)
endif()