From e47fc94ada8387416b166b3e5b7cbc9234adc8aa 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 d681a85c..92f6fe88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -274,3 +274,17 @@ IF (BUILD_FUZZER) TARGET_LINK_LIBRARIES(fuzz-client-hello picotls-core picotls-openssl ${OPENSSL_CRYPTO_LIBRARIES} ${AEGIS_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 9613369c3ca7819b11c4d112fbd48e56fff54439 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 92f6fe88..c07d3f21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,6 +196,10 @@ IF (WITH_FUSION) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPTLS_HAVE_FUSION=1") LIST(APPEND PTLSBENCH_LIBS picotls-fusion) + + INSTALL( + TARGETS picotls-fusion + ) ENDIF () IF (WITH_MBEDTLS) @@ -276,7 +280,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