Skip to content
Snippets Groups Projects
Commit a28885bc authored by Stephen Hurd's avatar Stephen Hurd
Browse files

Move things around a bit

This looks more like what people expect
parent 90d4ba94
Branches
No related tags found
No related merge requests found
Showing
with 21 additions and 63 deletions
cmake_minimum_required(VERSION 3.14)
project (SyncTERM C)
include("FetchContent")
FetchContent_Declare(
XPDevPlus
GIT_REPOSITORY https://gitlab.synchro.net/Deuce/xpdevplus.git
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/xpdevplus
)
FetchContent_MakeAvailable(XPDevPlus)
FetchContent_Declare(
CryptlibBuild
GIT_REPOSITORY https://gitlab.synchro.net/Deuce/cryptlib.git
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/cryptlib
)
FetchContent_MakeAvailable(CryptlibBuild)
add_subdirectory(src)
# CPack stuff...
set(CPACK_PACKAGE_NAME SyncTERM)
......@@ -34,56 +20,11 @@ set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Stephen Hurd")
INCLUDE(CPack)
######
set(SOURCE
bbslist.c
uifcinit.c
fonts.c
rlogin.c
telnet_io.c
conn_telnet.c
conn.c
term.c
window.c
menu.c
ssh.c
st_crypt.c
syncterm.c
telnet.c
telnets.c
ooii.c
ooii_logons.c
ooii_cmenus.c
ooii_bmenus.c
ooii_sounds.c
modem.c
xmodem.c
zmodem.c
conn_pty.c
ripper.c
)
configure_file(syncterm.man.in syncterm.man)
configure_file(docs/syncterm.man.in syncterm.man)
file(ARCHIVE_CREATE OUTPUT syncterm.1.gz FORMAT raw COMPRESSION GZip PATHS syncterm.man)
add_executable(syncterm ${SOURCE})
target_link_libraries(syncterm cryptlib xpdevplus)
target_include_directories(syncterm PRIVATE ${CMAKE_BINARY_DIR})
target_compile_definitions(syncterm PRIVATE STATIC_CRYPTLIB)
check_library_exists(util forkpty "" HAS_FORKPTY)
if(HAS_FORKPTY)
target_link_libraries(syncterm util)
else()
target_compile_definitions(syncterm PRIVATE NEEDS_FORKPTY)
endif()
check_library_exists(c daemon "" HAS_DAEMON)
if(NOT HAS_FORKPTY)
target_compile_definitions(syncterm PRIVATE NEEDS_DAEMON)
endif()
install(TARGETS syncterm RUNTIME)
if(UNIX)
install(FILES syncterm.desktop DESTINATION share/applications)
install(FILES syncterm.png DESTINATION share/icons/hicolor/64x64/apps)
install(FILES data/install/syncterm.desktop DESTINATION share/applications)
install(FILES data/install/syncterm.png DESTINATION share/icons/hicolor/64x64/apps)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncterm.1.gz DESTINATION man/man1)
endif()
# the name of the target operating system
set(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
set(CMAKE_C_COMPILER mingw32-gcc)
set(CMAKE_CXX_COMPILER mingw32-g++)
# where is the target environment located
set(CMAKE_FIND_ROOT_PATH /usr/local/mingw32)
# search headers and libraries in the target environment
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
#
set(CROSS_MAKE_ENV AR=mingw32-ar RANLIB=mingw32-ranlib RELEASE=1 CC=mingw32-gcc CXX=mingw32-g++ WINDRES=mingw32-windres)
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment