blob: 36148064d39af57aeeb5e6c6f0928e4ab5819728 [file] [log] [blame]
Mathias Raoul2e452382021-01-19 14:02:34 +00001diff --git a/CMakeLists.txt b/CMakeLists.txt
2index f5478d3..156df4c 100644
3--- a/CMakeLists.txt
4+++ b/CMakeLists.txt
5@@ -65,6 +65,8 @@ IF (WITH_DTRACE)
6 ENDIF ()
7 ENDIF ()
8
9+SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
10+
11 ADD_LIBRARY(quicly ${QUICLY_LIBRARY_FILES})
12
13 ADD_CUSTOM_COMMAND(
14@@ -84,6 +86,16 @@ TARGET_LINK_LIBRARIES(examples-echo 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} WITH_DTRACE=${WITH_DTRACE} prove --exec "sh -c" -v ${CMAKE_CURRENT_BINARY_DIR}/*.t t/*.t
29 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
30 DEPENDS cli test.t)
31Submodule deps/picotls contains untracked content
32Submodule deps/picotls contains modified content
33diff --git a/deps/picotls/CMakeLists.txt b/deps/picotls/CMakeLists.txt
34index 874b9be..14411e2 100644
35--- a/deps/picotls/CMakeLists.txt
36+++ b/deps/picotls/CMakeLists.txt
37@@ -12,6 +12,7 @@ IF (WITH_DTRACE)
38 MESSAGE(STATUS "Enabling USDT support")
39 ENDIF ()
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(
44 deps/cifra/src/ext
45@@ -131,6 +132,15 @@ ELSE ()
46 MESSAGE(WARNING "Disabling OpenSSL support (requires 1.0.1 or newer)")
47 ENDIF ()
48
49+INSTALL (DIRECTORY ${CMAKE_SOURCE_DIR}/include/
50+ DESTINATION include
51+ FILES_MATCHING PATTERN "*.h")
52+
53+INSTALL(TARGETS picotls-core picotls-openssl
54+ RUNTIME DESTINATION bin
55+ LIBRARY DESTINATION lib
56+ ARCHIVE DESTINATION lib)
57+
58 ADD_CUSTOM_TARGET(check env BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} prove --exec '' -v ${CMAKE_CURRENT_BINARY_DIR}/*.t t/*.t WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${TEST_EXES} cli)
59
60 IF (CMAKE_SYSTEM_NAME STREQUAL "Linux")