aboutsummaryrefslogtreecommitdiff
path: root/external/CMakeLists.txt
diff options
context:
space:
mode:
authorJulien Dessaux2019-03-14 16:44:11 +0100
committerJulien Dessaux2019-03-14 16:44:11 +0100
commitefb8b7c3ae208d5bd45a1a030ccb6f6d61b112c9 (patch)
tree7154b7cfb98bac4eb124117ecc70a41dad7597c2 /external/CMakeLists.txt
parentAdded README and LICENSE (diff)
downloadbastion-efb8b7c3ae208d5bd45a1a030ccb6f6d61b112c9.tar.gz
bastion-efb8b7c3ae208d5bd45a1a030ccb6f6d61b112c9.tar.bz2
bastion-efb8b7c3ae208d5bd45a1a030ccb6f6d61b112c9.zip
Fixed build problem with SESSION_RECORDING flag set to OFF and updated the readme
Diffstat (limited to 'external/CMakeLists.txt')
-rw-r--r--external/CMakeLists.txt38
1 files changed, 20 insertions, 18 deletions
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 7697b9b..3b2edd4 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -1,19 +1,21 @@
-# Build libtty from the termrec project
-if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/termrec/)
- message("Unable to find termrec, running git submodule update --init")
- execute_process(COMMAND git submodule update --init -- termrec WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+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")
+ execute_process(COMMAND git submodule update --init -- termrec WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+ endif()
+ if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/termrec/configure)
+ message("Unable to find configure file for termrec, running autogen.sh")
+ execute_process(COMMAND ./autogen.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/termrec)
+ endif()
+ if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/termrec/config.h)
+ 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)
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/termrec/")
+ 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")
endif()
-if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/termrec/configure)
- message("Unable to find configure file for termrec, running autogen.sh")
- execute_process(COMMAND ./autogen.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/termrec)
-endif()
-if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/termrec/config.h)
- 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)
-include_directories("${CMAKE_CURRENT_SOURCE_DIR}/termrec/")
-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")