As specified in the docs, sodium_FOUND is set when all the required vars are found. Previously the code defined an incorrect sodium target even though the needed variables were not found. This prevents subsequent searches by other methods. This PR fixes the issue by an early return.
As specified in the docs,
sodium_FOUND
is set when all the required vars are found. Previously the code defined an incorrect sodium target even though the needed variables were not found. This prevents subsequent searches by other methods. This PR fixes the issue by an early return.https://cmake.org/cmake/help/latest/module/FindPackageHandleStandardArgs.html