File tree 4 files changed +10
-13
lines changed
4 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ CPMAddPackage(
20
20
GIT_TAG 0.20250114.0
21
21
OPTIONS "BUILD_SHARED_LIBS OFF" "BUILD_TESTING OFF"
22
22
)
23
- message (STATUS "BoringSSL source dir: ${boringssl_SOURCE_DIR} " )
23
+ add_subdirectory (src)
24
+ add_library (ncrypto::ncrypto ALIAS ncrypto)
25
+
24
26
include_directories (${boringssl_SOURCE_DIR} /include )
25
27
26
28
if (NCRYPTO_TESTING)
@@ -36,9 +38,6 @@ if (NCRYPTO_TESTING)
36
38
add_subdirectory (tests)
37
39
endif ()
38
40
39
- add_subdirectory (src)
40
- add_library (ncrypto::ncrypto ALIAS ncrypto)
41
-
42
41
install (
43
42
FILES include /ncrypto.h
44
43
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} "
Original file line number Diff line number Diff line change 1
1
option (NCRYPTO_DEVELOPMENT_CHECKS "development checks (useful for debugging)" OFF )
2
2
option (NCRYPTO_TESTING "Build tests" ON )
3
3
4
+ set (CMAKE_POSITION_INDEPENDENT_CODE ON )
4
5
set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
5
6
set (CMAKE_CXX_STANDARD 20)
6
7
set (CMAKE_CXX_STANDARD_REQUIRED ON )
Original file line number Diff line number Diff line change 1
1
add_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)
4
4
target_include_directories (ncrypto
5
5
PUBLIC
6
6
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include >
Original file line number Diff line number Diff line change 1
1
include (GoogleTest)
2
- include (CTest)
3
2
add_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)
10
4
gtest_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