File tree Expand file tree Collapse file tree 4 files changed +10
-13
lines changed
Expand file tree Collapse file tree 4 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ CPMAddPackage(
2020 GIT_TAG 0.20250114.0
2121 OPTIONS "BUILD_SHARED_LIBS OFF" "BUILD_TESTING OFF"
2222)
23- message (STATUS "BoringSSL source dir: ${boringssl_SOURCE_DIR} " )
23+ add_subdirectory (src)
24+ add_library (ncrypto::ncrypto ALIAS ncrypto)
25+
2426include_directories (${boringssl_SOURCE_DIR} /include )
2527
2628if (NCRYPTO_TESTING)
@@ -36,9 +38,6 @@ if (NCRYPTO_TESTING)
3638 add_subdirectory (tests)
3739endif ()
3840
39- add_subdirectory (src)
40- add_library (ncrypto::ncrypto ALIAS ncrypto)
41-
4241install (
4342 FILES include /ncrypto.h
4443 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} "
Original file line number Diff line number Diff line change 11option (NCRYPTO_DEVELOPMENT_CHECKS "development checks (useful for debugging)" OFF )
22option (NCRYPTO_TESTING "Build tests" ON )
33
4+ set (CMAKE_POSITION_INDEPENDENT_CODE ON )
45set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
56set (CMAKE_CXX_STANDARD 20)
67set (CMAKE_CXX_STANDARD_REQUIRED ON )
Original file line number Diff line number Diff line change 11add_library (ncrypto ncrypto.cpp engine.cpp)
2- target_link_libraries (ncrypto boringssl )
3-
2+ add_dependencies (ncrypto crypto ssl )
3+ target_link_libraries (ncrypto PUBLIC ssl crypto)
44target_include_directories (ncrypto
55 PUBLIC
66 $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include >
Original file line number Diff line number Diff line change 11include (GoogleTest)
2- include (CTest)
32add_executable (basic basic.cpp)
4- target_link_libraries (
5- basic
6- GTest::gtest_main
7- )
8- target_link_libraries (basic ncrypto)
9- add_test (basic_test basic)
3+ target_link_libraries (basic PRIVATE ncrypto GTest::gtest_main)
104gtest_discover_tests(basic)
5+ if (MSVC OR MINGW)
6+ target_compile_definitions (basic PRIVATE _CRT_SECURE_NO_WARNINGS)
7+ endif ()
You can’t perform that action at this time.
0 commit comments