add pk files to cmake, avoid some duplication, and update documentation

This commit is contained in:
Hubert Chathi 2018-10-12 16:15:16 -04:00
parent 4e94dfc7e0
commit 3da5b60823
4 changed files with 40 additions and 74 deletions

View file

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.1)
project(olm VERSION 2.2.2 LANGUAGES CXX C) project(olm VERSION 2.3.0 LANGUAGES CXX C)
option(OLM_TESTS "Build tests" ON) option(OLM_TESTS "Build tests" ON)
option(OLM_FUZZERS "Build fuzzers" ON) option(OLM_FUZZERS "Build fuzzers" ON)
@ -31,6 +31,7 @@ add_library(olm
src/ratchet.cpp src/ratchet.cpp
src/session.cpp src/session.cpp
src/utility.cpp src/utility.cpp
src/pk.cpp
src/ed25519.c src/ed25519.c
src/error.c src/error.c
@ -77,6 +78,7 @@ install(FILES
${CMAKE_SOURCE_DIR}/include/olm/olm.h ${CMAKE_SOURCE_DIR}/include/olm/olm.h
${CMAKE_SOURCE_DIR}/include/olm/outbound_group_session.h ${CMAKE_SOURCE_DIR}/include/olm/outbound_group_session.h
${CMAKE_SOURCE_DIR}/include/olm/inbound_group_session.h ${CMAKE_SOURCE_DIR}/include/olm/inbound_group_session.h
${CMAKE_SOURCE_DIR}/include/olm/pk.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/olm) DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/olm)
# Export the targets to a script. # Export the targets to a script.

View file

@ -58,9 +58,10 @@ To build olm as a static library (which still needs libstdc++ dynamically) run:
Release process Release process
--------------- ---------------
First: bump version numbers in ``common.mk``, ``javascript/package.json``, First: bump version numbers in ``common.mk``, ``CMakeLists.txt``,
``OLMKit.podspec``, and ``android/olm-sdk/build.gradle`` (``versionCode``, ``javascript/package.json``, ``OLMKit.podspec``, and
``versionName`` and ``version``). ``android/olm-sdk/build.gradle`` (``versionCode``, ``versionName`` and
``version``).
Also, ensure the changelog is up to date, and that everyting is committed to Also, ensure the changelog is up to date, and that everyting is committed to
git. git.

View file

@ -1,19 +1,11 @@
add_executable(fuzz_decode_message fuzz_decode_message.cpp) foreach(fuzz IN ITEMS
target_include_directories(fuzz_decode_message PRIVATE include) fuzz_decode_message
target_link_libraries(fuzz_decode_message Olm::Olm) fuzz_decrypt
fuzz_group_decrypt
add_executable(fuzz_decrypt fuzz_decrypt.cpp) fuzz_unpickle_account
target_include_directories(fuzz_decrypt PRIVATE include) fuzz_unpickle_session
target_link_libraries(fuzz_decrypt Olm::Olm) )
add_executable(${fuzz} ${fuzz}.cpp)
add_executable(fuzz_group_decrypt fuzz_group_decrypt.cpp) target_include_directories(${fuzz} PRIVATE include)
target_include_directories(fuzz_group_decrypt PRIVATE include) target_link_libraries(${fuzz} Olm::Olm)
target_link_libraries(fuzz_group_decrypt Olm::Olm) endforeach(fuzz)
add_executable(fuzz_unpickle_account fuzz_unpickle_account.cpp)
target_link_libraries(fuzz_unpickle_account Olm::Olm)
target_include_directories(fuzz_unpickle_account PRIVATE include)
add_executable(fuzz_unpickle_session fuzz_unpickle_session.cpp)
target_link_libraries(fuzz_unpickle_session Olm::Olm)
target_include_directories(fuzz_unpickle_session PRIVATE include)

View file

@ -1,66 +1,37 @@
enable_testing() enable_testing()
add_executable(test_base64 test_base64.cpp) foreach(test IN ITEMS
target_include_directories(test_base64 PRIVATE include) test_base64
target_link_libraries(test_base64 Olm::Olm) test_crypto
test_group_session
test_list
test_megolm
test_message
test_olm
test_olm_decrypt
test_olm_sha256
test_olm_signature
test_olm_using_malloc
test_ratchet
test_session
test_pk
)
add_executable(${test} ${test}.cpp)
target_include_directories(${test} PRIVATE include)
target_link_libraries(${test} Olm::Olm)
endforeach(test)
add_test(Base64 test_base64) add_test(Base64 test_base64)
add_executable(test_crypto test_crypto.cpp)
target_include_directories(test_crypto PRIVATE include)
target_link_libraries(test_crypto Olm::Olm)
add_test(Crypto test_crypto) add_test(Crypto test_crypto)
add_executable(test_group_session test_group_session.cpp)
target_include_directories(test_group_session PRIVATE include)
target_link_libraries(test_group_session Olm::Olm)
add_test(GroupSession test_group_session) add_test(GroupSession test_group_session)
add_executable(test_list test_list.cpp)
target_include_directories(test_list PRIVATE include)
target_link_libraries(test_list Olm::Olm)
add_test(List test_list) add_test(List test_list)
add_executable(test_megolm test_megolm.cpp)
target_include_directories(test_megolm PRIVATE include)
target_link_libraries(test_megolm Olm::Olm)
add_test(Megolm test_megolm) add_test(Megolm test_megolm)
add_executable(test_message test_message.cpp)
target_include_directories(test_message PRIVATE include)
target_link_libraries(test_message Olm::Olm)
add_test(Message test_message) add_test(Message test_message)
add_executable(test_olm test_olm.cpp)
target_include_directories(test_olm PRIVATE include)
target_link_libraries(test_olm Olm::Olm)
add_test(Olm test_olm) add_test(Olm test_olm)
add_executable(test_olm_decrypt test_olm_decrypt.cpp)
target_include_directories(test_olm_decrypt PRIVATE include)
target_link_libraries(test_olm_decrypt Olm::Olm)
add_test(OlmDecrypt test_olm_decrypt) add_test(OlmDecrypt test_olm_decrypt)
add_executable(test_olm_sha256 test_olm_sha256.cpp)
target_include_directories(test_olm_sha256 PRIVATE include)
target_link_libraries(test_olm_sha256 Olm::Olm)
add_test(OlmSha256 test_olm_sha256) add_test(OlmSha256 test_olm_sha256)
add_executable(test_olm_signature test_olm_signature.cpp)
target_include_directories(test_olm_signature PRIVATE include)
target_link_libraries(test_olm_signature Olm::Olm)
add_test(OlmSignature test_olm_signature) add_test(OlmSignature test_olm_signature)
add_executable(test_olm_using_malloc test_olm_using_malloc.cpp)
target_include_directories(test_olm_using_malloc PRIVATE include)
target_link_libraries(test_olm_using_malloc Olm::Olm)
add_test(OlmUsingMalloc test_olm_using_malloc) add_test(OlmUsingMalloc test_olm_using_malloc)
add_executable(test_ratchet test_ratchet.cpp)
target_include_directories(test_ratchet PRIVATE include)
target_link_libraries(test_ratchet Olm::Olm)
add_test(Ratchet test_ratchet) add_test(Ratchet test_ratchet)
add_executable(test_session test_session.cpp)
target_include_directories(test_session PRIVATE include)
target_link_libraries(test_session Olm::Olm)
add_test(Session test_session) add_test(Session test_session)
add_test(PublicKey test_session)