2023-12-27 12:37:22 +01:00
|
|
|
function(target_link_toxcore target)
|
|
|
|
if(TARGET toxcore_static)
|
|
|
|
target_link_libraries(${target} PRIVATE toxcore_static)
|
|
|
|
else()
|
|
|
|
target_link_libraries(${target} PRIVATE toxcore_shared)
|
|
|
|
endif()
|
|
|
|
endfunction()
|
|
|
|
|
2023-07-25 11:53:09 +02:00
|
|
|
add_executable(save-generator save-generator.c)
|
2023-12-27 12:37:22 +01:00
|
|
|
target_link_libraries(save-generator PRIVATE misc_tools)
|
|
|
|
target_link_toxcore(save-generator)
|
2023-07-25 11:53:09 +02:00
|
|
|
|
|
|
|
add_executable(strkey strkey.c)
|
2023-12-27 12:37:22 +01:00
|
|
|
target_link_libraries(strkey PRIVATE ${LIBSODIUM_LIBRARIES})
|
|
|
|
target_link_toxcore(strkey)
|
2023-07-25 11:53:09 +02:00
|
|
|
|
|
|
|
add_executable(create_bootstrap_keys create_bootstrap_keys.c)
|
2023-12-27 12:37:22 +01:00
|
|
|
target_link_libraries(create_bootstrap_keys PRIVATE ${LIBSODIUM_LIBRARIES})
|
|
|
|
target_link_toxcore(create_bootstrap_keys)
|
2023-07-25 11:53:09 +02:00
|
|
|
|
|
|
|
add_executable(create_minimal_savedata create_minimal_savedata.c)
|
2023-12-27 12:37:22 +01:00
|
|
|
target_link_libraries(create_minimal_savedata PRIVATE ${LIBSODIUM_LIBRARIES})
|
2023-07-25 11:53:09 +02:00
|
|
|
|
|
|
|
add_executable(create_savedata create_savedata.c)
|
2023-12-27 12:37:22 +01:00
|
|
|
target_link_libraries(create_savedata PRIVATE ${LIBSODIUM_LIBRARIES})
|
|
|
|
target_link_toxcore(create_savedata)
|
2023-07-25 11:53:09 +02:00
|
|
|
|
|
|
|
add_executable(sign sign.c)
|
2023-12-27 12:37:22 +01:00
|
|
|
target_link_libraries(sign PRIVATE ${LIBSODIUM_LIBRARIES} misc_tools)
|
2023-07-25 11:53:09 +02:00
|
|
|
|
|
|
|
add_executable(cracker_simple cracker_simple.c)
|
2023-12-27 12:37:22 +01:00
|
|
|
target_link_libraries(cracker_simple ${LIBSODIUM_LIBRARIES} misc_tools)
|
2023-07-25 11:53:09 +02:00
|
|
|
|
|
|
|
# MSVC doesn't support OpenMP
|
|
|
|
if(NOT MSVC)
|
|
|
|
find_package(OpenMP)
|
|
|
|
if(OpenMP_C_FOUND)
|
|
|
|
add_executable(cracker cracker.c)
|
2023-12-27 12:37:22 +01:00
|
|
|
target_link_libraries(cracker PRIVATE OpenMP::OpenMP_C ${LIBSODIUM_LIBRARIES})
|
2023-07-25 11:53:09 +02:00
|
|
|
endif()
|
|
|
|
endif()
|