fix toxcore cmake (for the most part)

This commit is contained in:
Green Sky 2025-01-12 16:13:46 +01:00
parent f160ad1e0b
commit 7f07b90a79
No known key found for this signature in database

View File

@ -18,13 +18,14 @@ if (NOT TARGET toxcore)
FetchContent_Declare(toxcore FetchContent_Declare(toxcore
GIT_REPOSITORY https://github.com/TokTok/c-toxcore.git GIT_REPOSITORY https://github.com/TokTok/c-toxcore.git
GIT_TAG v0.2.19 GIT_TAG v0.2.20
EXCLUDE_FROM_ALL EXCLUDE_FROM_ALL
) )
FetchContent_GetProperties(toxcore) FetchContent_GetProperties(toxcore)
if(NOT toxcore_POPULATED) if(NOT toxcore_POPULATED)
FetchContent_Populate(toxcore) # pupulates and adds cmake subdir
FetchContent_MakeAvailable(toxcore)
# TODO: should this all be in the populated if?? # TODO: should this all be in the populated if??
@ -74,7 +75,7 @@ if (NOT TARGET toxcore)
# @ONLY # @ONLY
#) #)
target_include_directories(toxcore INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include/) target_include_directories(toxcore INTERFACE ${toxcore_BINARY_DIR}/include/)
find_package(sodium QUIET) find_package(sodium QUIET)
if(unofficial-sodium_FOUND) # vcpkg if(unofficial-sodium_FOUND) # vcpkg