aboutsummaryrefslogtreecommitdiff
path: root/external/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'external/CMakeLists.txt')
-rw-r--r--external/CMakeLists.txt19
1 files changed, 17 insertions, 2 deletions
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()