diff options
author | Julien Dessaux | 2019-03-28 08:50:59 +0100 |
---|---|---|
committer | Julien Dessaux | 2019-04-01 13:39:41 +0200 |
commit | a6f8d1da2a50c6d86054a22dec39070af6028bf3 (patch) | |
tree | 497e7cc4c90f70ad511fed93e31fe1c44f008bcf | |
parent | Removed mysql dependency and fetch all configuration from configuration file. (diff) | |
download | bastion-a6f8d1da2a50c6d86054a22dec39070af6028bf3.tar.gz bastion-a6f8d1da2a50c6d86054a22dec39070af6028bf3.tar.bz2 bastion-a6f8d1da2a50c6d86054a22dec39070af6028bf3.zip |
Fixed session recording that was broken, and install the session player from the termrec project
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | bastion/CMakeLists.txt | 4 | ||||
-rw-r--r-- | external/CMakeLists.txt | 19 |
3 files changed, 24 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 34ead63..0432691 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(bastion LANGUAGES C VERSION 0.1.1) +project(bastion LANGUAGES C VERSION 0.1.2) set(CMAKE_VERBOSE_MAKEFILE FALSE) if(EXISTS "${CMAKE_SOURCE_DIR}/.git") @@ -22,6 +22,10 @@ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -ggdb3 -pg") option(LIBSSH_VERBOSE_OUTPUT "whether or not verbose output for libssh mode is activated" OFF) option(SESSION_RECORDING "whether or not recording feature based on lib termrec is activated" ON) +if(SESSION_RECORDING) + add_definitions(-DSESSION_RECORDING) +endif() + configure_file("common/config.h.in" "common/config.h") include_directories("${CMAKE_CURRENT_BINARY_DIR}") include_directories("${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/bastion/CMakeLists.txt b/bastion/CMakeLists.txt index 9fd4212..4f622e0 100644 --- a/bastion/CMakeLists.txt +++ b/bastion/CMakeLists.txt @@ -4,10 +4,10 @@ file(GLOB_RECURSE SOURCES *.c) add_executable(bastion ${SOURCES}) target_link_libraries(bastion common) -if (${SESSION_RECORDING}) +if (SESSION_RECORDING) target_link_libraries(bastion libtty) endif() -target_link_libraries(bastion bz2 config lzma ssh z) +target_link_libraries(bastion bz2 config curl lzma ssh z) install(TARGETS bastion DESTINATION bin) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 3b2edd4..9aa3ee0 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,4 +1,4 @@ -if (${SESSION_RECORDING}) +if (SESSION_RECORDING) # Build libtty from the termrec project if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/termrec/) message("Unable to find termrec, running git submodule update --init") @@ -12,10 +12,25 @@ if (${SESSION_RECORDING}) message("Unable to find config.h file for termrec, running configure script") execute_process(COMMAND ./configure WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/termrec) endif() - file(GLOB_RECURSE LIBTTY_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/termrec/libtty/*.c) + file(GLOB_RECURSE LIBTTY_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/termrec/libtty/*.c + ${CMAKE_CURRENT_SOURCE_DIR}/termrec/libstream/*.c) include_directories("${CMAKE_CURRENT_SOURCE_DIR}/termrec/") + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/termrec/common") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/termrec/libtty") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/termrec/sys") ADD_LIBRARY(libtty STATIC ${LIBTTY_SOURCES}) SET_TARGET_PROPERTIES(libtty PROPERTIES COMPILE_FLAGS "-Wno-all -Wno-error -Wno-extra -Wno-pedantic") + + # Build termplay from the termrec project + file(GLOB TERMPLAY_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/termrec/common/*.c + ${CMAKE_CURRENT_SOURCE_DIR}/termrec/play/*.c + ${CMAKE_CURRENT_SOURCE_DIR}/termrec/sys/*.c + ${CMAKE_CURRENT_SOURCE_DIR}/termrec/sys/unix/*.c) + add_executable(termplay ${TERMPLAY_SOURCES}) + SET_TARGET_PROPERTIES(termplay PROPERTIES COMPILE_FLAGS "-Wno-all -Wno-error -Wno-extra -Wno-pedantic") + target_link_libraries(termplay libtty) + target_link_libraries(termplay bz2 curl lzma pthread z) + install(TARGETS termplay DESTINATION bin) endif() |