Skip to content

cmake: better error messages when libsodium is not found - #185

Merged
jedisct1 merged 1 commit into
jedisct1:masterfrom
Andrej730:cmake-libsodium-error
Oct 11, 2026
Merged

jedisct1 merged 1 commit into
jedisct1:masterfrom
Andrej730:cmake-libsodium-error

Conversation

@Andrej730

@Andrej730 Andrej730 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Hi! A small improvement for users building minisign from scratch - added SEND_ERROR error messages that make configuration stage fail, so it never get to generation stage where these errors get more obscure.

Before:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/root/minisign/SODIUM_INCLUDE_DIR
   used as include directory in directory /root/minisign
SODIUM_LIBRARY
    linked by target "minisign" in directory /root/minisign

CMake Generate step failed.  Build files cannot be regenerated correctly.

After:

CMake Error at CMakeLists.txt:65 (message):
  Could not find libsodium headers (sodium.h).  Install libsodium or set
  SODIUM_INCLUDE_DIR.

CMake Error at CMakeLists.txt:68 (message):
  Could not find libsodium library.  Install libsodium or set SODIUM_LIBRARY.

@jedisct1

Copy link
Copy Markdown
Owner

Thank you!

I don't know much about cmake so I trust you :)

@jedisct1
jedisct1 merged commit b6de4fe into jedisct1:master Oct 11, 2026
1 check passed
@Andrej730
Andrej730 deleted the cmake-libsodium-error branch October 11, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants