Aloys Augustin | 7cae003 | 2019-04-01 16:43:29 +0200 | [diff] [blame^] | 1 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 2 | index 202cc52..b5c2bee 100644 |
| 3 | --- a/CMakeLists.txt |
| 4 | +++ b/CMakeLists.txt |
| 5 | @@ -40,6 +40,8 @@ SET(UNITTEST_SOURCE_FILES |
| 6 | t/stream-concurrency.c |
| 7 | t/test.c) |
| 8 | |
| 9 | +SET(CMAKE_POSITION_INDEPENDENT_CODE ON) |
| 10 | + |
| 11 | ADD_LIBRARY(quicly ${QUICLY_LIBRARY_FILES}) |
| 12 | |
| 13 | ADD_EXECUTABLE(cli ${PICOTLS_OPENSSL_FILES} src/cli.c) |
| 14 | @@ -50,6 +52,16 @@ TARGET_LINK_LIBRARIES(test.t quicly ${OPENSSL_LIBRARIES} ${CMAKE_DL_LIBS}) |
| 15 | |
| 16 | ADD_EXECUTABLE(udpfw t/udpfw.c) |
| 17 | |
| 18 | +INSTALL ( |
| 19 | + DIRECTORY ${CMAKE_SOURCE_DIR}/include/ |
| 20 | + DESTINATION include |
| 21 | + FILES_MATCHING PATTERN "*.h") |
| 22 | + |
| 23 | +INSTALL(TARGETS quicly |
| 24 | + RUNTIME DESTINATION bin |
| 25 | + LIBRARY DESTINATION lib |
| 26 | + ARCHIVE DESTINATION lib) |
| 27 | + |
| 28 | ADD_CUSTOM_TARGET(check env BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} prove --exec "sh -c" -v ${CMAKE_CURRENT_BINARY_DIR}/*.t t/*.t |
| 29 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
| 30 | DEPENDS cli test.t) |
| 31 | Submodule deps/picotls contains untracked content |
| 32 | Submodule deps/picotls contains modified content |
| 33 | diff --git a/deps/picotls/CMakeLists.txt b/deps/picotls/CMakeLists.txt |
| 34 | index cda6aad..62b23b7 100644 |
| 35 | --- a/deps/picotls/CMakeLists.txt |
| 36 | +++ b/deps/picotls/CMakeLists.txt |
| 37 | @@ -5,6 +5,7 @@ PROJECT(picotls) |
| 38 | |
| 39 | FIND_PACKAGE(PkgConfig REQUIRED) |
| 40 | |
| 41 | +SET(CMAKE_POSITION_INDEPENDENT_CODE ON) |
| 42 | SET(CMAKE_C_FLAGS "-std=c99 -Wall -O2 -g ${CC_WARNING_FLAGS} ${CMAKE_C_FLAGS}") |
| 43 | INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR} deps/cifra/src/ext deps/cifra/src deps/micro-ecc deps/picotest include) |
| 44 | SET(MINICRYPTO_LIBRARY_FILES |
| 45 | @@ -97,3 +98,12 @@ IF (BUILD_FUZZER) |
| 46 | |
| 47 | |
| 48 | ENDIF() |
| 49 | + |
| 50 | +INSTALL (DIRECTORY ${CMAKE_SOURCE_DIR}/include/ |
| 51 | + DESTINATION include |
| 52 | + FILES_MATCHING PATTERN "*.h") |
| 53 | + |
| 54 | +INSTALL(TARGETS picotls-core picotls-openssl |
| 55 | + RUNTIME DESTINATION bin |
| 56 | + LIBRARY DESTINATION lib |
| 57 | + ARCHIVE DESTINATION lib) |