From d3c7435fcc876292b270d3760029b969444195f5 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Mon, 3 Apr 2023 21:30:19 +1200 Subject: [PATCH 1/2] Add support for `make install`. --- CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ad42d82b..eac73efc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,3 +230,17 @@ IF (BUILD_FUZZER) TARGET_LINK_LIBRARIES(fuzz-client-hello picotls-core picotls-openssl ${OPENSSL_CRYPTO_LIBRARIES} ${LIB_FUZZER}) ENDIF() + +INSTALL( + TARGETS picotls-core picotls-openssl picotls-minicrypto picotls-fusion + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + INCLUDES DESTINATION include +) + +INSTALL( + DIRECTORY ${CMAKE_SOURCE_DIR}/include/ + DESTINATION include + FILES_MATCHING PATTERN "*.h*" +) From 05f8bf390e8de0baeb6796941658c3db6b20b0b4 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Tue, 18 Apr 2023 22:26:53 +1200 Subject: [PATCH 2/2] Conditional install fusion library. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eac73efc8..bda2adf6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,6 +172,10 @@ IF (WITH_FUSION) SET(TEST_EXES ${TEST_EXES} test-fusion.t) LIST(APPEND PTLSBENCH_LIBS picotls-fusion) + + INSTALL( + TARGETS picotls-fusion + ) ENDIF () ADD_EXECUTABLE(ptlsbench t/ptlsbench.c) @@ -232,7 +236,7 @@ IF (BUILD_FUZZER) ENDIF() INSTALL( - TARGETS picotls-core picotls-openssl picotls-minicrypto picotls-fusion + TARGETS picotls-core picotls-openssl picotls-minicrypto RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib