aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2018-02-10 15:19:40 +0100
committerpacien2018-02-10 15:19:40 +0100
commit2be958c3d6a7f07dfdff28c9b4bbc9bb697f3bb2 (patch)
treebb8fea9eea0bfa8dadddba9e277cf3d9e013c204
parent0f2afcc01c26fc1b0e52e570cebac7dd3f514762 (diff)
downloadtincapp-2be958c3d6a7f07dfdff28c9b4bbc9bb697f3bb2.tar.gz
Reformat CMakeLists
-rw-r--r--app/CMakeLists.txt84
1 files changed, 42 insertions, 42 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index d46b88b..7347b85 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -2,54 +2,54 @@ cmake_minimum_required(VERSION 3.4.1)
2include(ExternalProject) 2include(ExternalProject)
3 3
4set(xCONFIG 4set(xCONFIG
5 "CC=${CMAKE_C_COMPILER} \ 5 "CC=${CMAKE_C_COMPILER} \
6 ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN} \ 6 ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN} \
7 ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET} \ 7 ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET} \
8 ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}" 8 ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}"
9 "LD=${CMAKE_LINKER}" 9 "LD=${CMAKE_LINKER}"
10 "AR=${CMAKE_AR}" 10 "AR=${CMAKE_AR}"
11 "RANLIB=${CMAKE_RANLIB}" 11 "RANLIB=${CMAKE_RANLIB}"
12 "CFLAGS=${CMAKE_C_FLAGS}" 12 "CFLAGS=${CMAKE_C_FLAGS}"
13 "LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}" 13 "LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}"
14 "--host=${CMAKE_C_COMPILER_TARGET}" 14 "--host=${CMAKE_C_COMPILER_TARGET}"
15) 15)
16 16
17ExternalProject_Add( lzo 17ExternalProject_Add(lzo
18 URL http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz 18 URL http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz
19 URL_HASH SHA1=4924676a9bae5db58ef129dc1cebce3baa3c4b5d 19 URL_HASH SHA1=4924676a9bae5db58ef129dc1cebce3baa3c4b5d
20 CONFIGURE_COMMAND <SOURCE_DIR>/configure ${xCONFIG} --disable-shared 20 CONFIGURE_COMMAND <SOURCE_DIR>/configure ${xCONFIG} --disable-shared
21 BUILD_COMMAND make -j8 21 BUILD_COMMAND make -j8
22 INSTALL_COMMAND make install DESTDIR=${CMAKE_CURRENT_BINARY_DIR} && 22 INSTALL_COMMAND make install DESTDIR=${CMAKE_CURRENT_BINARY_DIR} &&
23 rm -r <BINARY_DIR> 23 rm -r <BINARY_DIR>
24) 24)
25 25
26ExternalProject_Add( libressl 26ExternalProject_Add(libressl
27 URL https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.6.4.tar.gz 27 URL https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.6.4.tar.gz
28 URL_HASH SHA256=638a20c2f9e99ee283a841cd787ab4d846d1880e180c4e96904fc327d419d11f 28 URL_HASH SHA256=638a20c2f9e99ee283a841cd787ab4d846d1880e180c4e96904fc327d419d11f
29 CONFIGURE_COMMAND <SOURCE_DIR>/configure ${xCONFIG} --disable-shared 29 CONFIGURE_COMMAND <SOURCE_DIR>/configure ${xCONFIG} --disable-shared
30 BUILD_COMMAND make -j8 -C crypto 30 BUILD_COMMAND make -j8 -C crypto
31 INSTALL_COMMAND make -C crypto install DESTDIR=${CMAKE_CURRENT_BINARY_DIR} && 31 INSTALL_COMMAND make -C crypto install DESTDIR=${CMAKE_CURRENT_BINARY_DIR} &&
32 make -C include install DESTDIR=${CMAKE_CURRENT_BINARY_DIR} && 32 make -C include install DESTDIR=${CMAKE_CURRENT_BINARY_DIR} &&
33 rm -r <BINARY_DIR> 33 rm -r <BINARY_DIR>
34) 34)
35 35
36ExternalProject_Add( tinc 36ExternalProject_Add(tinc
37 DEPENDS lzo libressl 37 DEPENDS lzo libressl
38 URL https://tinc-vpn.org/packages/tinc-1.1pre15.tar.gz 38 URL https://tinc-vpn.org/packages/tinc-1.1pre15.tar.gz
39 URL_HASH SHA256=41dc3e40c5f8be497b779acd6f59ef4572e1430d0d0f0436f2de5cb21a59ef18 39 URL_HASH SHA256=41dc3e40c5f8be497b779acd6f59ef4572e1430d0d0f0436f2de5cb21a59ef18
40 CONFIGURE_COMMAND autoreconf -fsi <SOURCE_DIR> && 40 CONFIGURE_COMMAND autoreconf -fsi <SOURCE_DIR> &&
41 <SOURCE_DIR>/configure ${xCONFIG} 41 <SOURCE_DIR>/configure ${xCONFIG}
42 --with-openssl=${CMAKE_CURRENT_BINARY_DIR}/usr/local 42 --with-openssl=${CMAKE_CURRENT_BINARY_DIR}/usr/local
43 --with-lzo=${CMAKE_CURRENT_BINARY_DIR}/usr/local 43 --with-lzo=${CMAKE_CURRENT_BINARY_DIR}/usr/local
44 --disable-curses 44 --disable-curses
45 --disable-readline 45 --disable-readline
46 BUILD_COMMAND make -j8 -C src 46 BUILD_COMMAND make -j8 -C src
47 INSTALL_COMMAND make -C src install DESTDIR=${CMAKE_CURRENT_BINARY_DIR} && 47 INSTALL_COMMAND make -C src install DESTDIR=${CMAKE_CURRENT_BINARY_DIR} &&
48 ${CMAKE_COMMAND} -E copy 48 ${CMAKE_COMMAND} -E copy
49 ${CMAKE_CURRENT_BINARY_DIR}/usr/local/sbin/tinc ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libtinc.so && 49 ${CMAKE_CURRENT_BINARY_DIR}/usr/local/sbin/tinc ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libtinc.so &&
50 ${CMAKE_COMMAND} -E copy 50 ${CMAKE_COMMAND} -E copy
51 ${CMAKE_CURRENT_BINARY_DIR}/usr/local/sbin/tincd ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libtincd.so && 51 ${CMAKE_CURRENT_BINARY_DIR}/usr/local/sbin/tincd ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libtincd.so &&
52 rm -r <BINARY_DIR> 52 rm -r <BINARY_DIR>
53) 53)
54 54
55add_library(exec SHARED src/main/c/exec.c) 55add_library(exec SHARED src/main/c/exec.c)