mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
766e62bc89
The `pkg_use_module` was doing magic we used to use, but no longer need.
31 lines
1.1 KiB
CMake
31 lines
1.1 KiB
CMake
# Helpful code for tests and other utilities
|
|
set(misc_tools_SOURCES
|
|
misc_tools.c
|
|
misc_tools.h)
|
|
add_library(misc_tools STATIC ${misc_tools_SOURCES})
|
|
if(TARGET toxcore_static)
|
|
target_link_libraries(misc_tools PRIVATE toxcore_static)
|
|
else()
|
|
target_link_libraries(misc_tools PRIVATE toxcore_shared)
|
|
endif()
|
|
target_link_libraries(misc_tools PRIVATE ${LIBSODIUM_LIBRARIES})
|
|
target_link_directories(misc_tools PUBLIC ${LIBSODIUM_LIBRARY_DIRS})
|
|
target_include_directories(misc_tools SYSTEM PRIVATE ${LIBSODIUM_INCLUDE_DIRS})
|
|
target_compile_options(misc_tools PRIVATE ${LIBSODIUM_CFLAGS_OTHER})
|
|
|
|
################################################################################
|
|
#
|
|
# :: Test programs
|
|
#
|
|
################################################################################
|
|
|
|
if(BUILD_MISC_TESTS)
|
|
add_executable(Messenger_test Messenger_test.c)
|
|
target_link_libraries(Messenger_test PRIVATE misc_tools)
|
|
if(TARGET toxcore_static)
|
|
target_link_libraries(Messenger_test PRIVATE toxcore_static)
|
|
else()
|
|
target_link_libraries(Messenger_test PRIVATE toxcore_shared)
|
|
endif()
|
|
endif()
|