2023-03-08 13:33:16 +00:00
|
|
|
add_library(example INTERFACE)
|
|
|
|
target_include_directories(example INTERFACE
|
|
|
|
${PROJECT_SOURCE_DIR}/include
|
|
|
|
)
|
|
|
|
target_link_libraries(example INTERFACE
|
2023-03-14 21:15:35 +00:00
|
|
|
secp256k1
|
2023-03-08 13:33:16 +00:00
|
|
|
$<$<PLATFORM_ID:Windows>:bcrypt>
|
|
|
|
)
|
2023-03-14 21:15:35 +00:00
|
|
|
if(NOT BUILD_SHARED_LIBS AND MSVC)
|
|
|
|
target_link_options(example INTERFACE /IGNORE:4217)
|
2023-03-08 13:33:16 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_executable(ecdsa_example ecdsa.c)
|
|
|
|
target_link_libraries(ecdsa_example example)
|
|
|
|
add_test(ecdsa_example ecdsa_example)
|
|
|
|
|
|
|
|
if(SECP256K1_ENABLE_MODULE_ECDH)
|
|
|
|
add_executable(ecdh_example ecdh.c)
|
|
|
|
target_link_libraries(ecdh_example example)
|
|
|
|
add_test(ecdh_example ecdh_example)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(SECP256K1_ENABLE_MODULE_SCHNORRSIG)
|
|
|
|
add_executable(schnorr_example schnorr.c)
|
|
|
|
target_link_libraries(schnorr_example example)
|
|
|
|
add_test(schnorr_example schnorr_example)
|
|
|
|
endif()
|