aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorJulien Dessaux2019-03-11 19:02:10 +0100
committerJulien Dessaux2019-03-11 19:02:10 +0100
commit0d5a0ca1a56612729b592758372bc56b5f6ae5fe (patch)
treed4eddad629438a88436e91923dd299903783f9df /external
parentCosmetics (diff)
downloadbastion-0d5a0ca1a56612729b592758372bc56b5f6ae5fe.tar.gz
bastion-0d5a0ca1a56612729b592758372bc56b5f6ae5fe.tar.bz2
bastion-0d5a0ca1a56612729b592758372bc56b5f6ae5fe.zip
Added cmake rules to build libtty from termrec submodule
Diffstat (limited to '')
-rw-r--r--external/CMakeLists.txt19
m---------external/termrec0
2 files changed, 19 insertions, 0 deletions
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
new file mode 100644
index 0000000..7697b9b
--- /dev/null
+++ b/external/CMakeLists.txt
@@ -0,0 +1,19 @@
+# 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")
diff --git a/external/termrec b/external/termrec
new file mode 160000
+Subproject 28567dbccfce08da038d7897355430b82bf2078