wolfssl
wolfssl copied to clipboard
Add liboqs integration to CMake build system
Description
Currently, compiling WolfSSL with liboqs is only possible with the configure system.
I've created this PR to add liboqs support to the CMake build system. Now, CMake can detect liboqs and link to it when building with WOLFSSL_OQS on.
I've added a new CMake option: WOLFSSL_OQS, which is disabled by default. When enabled, CMake will look for the liboqs library, and, if found, will link and include it to the wolfssl library. This matches the behavior of the configure system.
Testing
I've tested this option with multiple configurations:
- WOLFSSL_OQS off, no liboqs installed on system --> nothing happens
- WOLFSSL_OQS on, no liboqs installed on system --> nothing happens
- WOLFSSL_OQS on, liboqs installed on system as shared library --> liboqs is successfully linked to wolfssl dynamically
- WOLFSSL_OQS on, liboqs installed on system as static library --> liboqs is successfully linked to wolfssl statically
Checklist
- [ ] added tests
- [ ] updated/added doxygen
- [ ] updated appropriate READMEs
- [ ] Updated manual and documentation
Can one of the wolfSSL admins verify this patch?
Hi @darktohka !
This is excellent work! In order for us to make use of it you will have to agree to our contributor agreement. Can you please mail [email protected] requesting a contributor agreement? Please mention that Anthony Hu (me) has asked you to do so.
Warm regards, Anthony
Thank you @anhu! I've e-mailed the address you've given me and will update this thread when I hear back.
On-hold until contributor agreement has been approved.
Approved as contributor.
retest this please
retest this please
Hi @darktohka ,
The failing test indicates that you will need to add an entry into cmake/include.am for the new file that you created.
Warm regards, Anthony
Thank you @anhu, I have made the requested change.
Excellent! Once the tests pass, I will squash and merge your changes.