open-quantum-safe / oqs-provider

OpenSSL 3 provider containing post-quantum algorithms
https://openquantumsafe.org
MIT License
238 stars 91 forks source link

Target install does nothing with static oqsprovider.a library #439

Closed maroueneboubakri closed 4 months ago

maroueneboubakri commented 4 months ago

Hello,

The provider could be used as standalone library to be statically linked with a binary. Therefore, it makes sense that cmake --install or cmake --build . --target install installs the static library into lib folder. While nothing happens when those are invoked.

-- Install configuration: ""

Kindly consider this use case.

Br Maro

maroueneboubakri commented 4 months ago

Also kindly keep consider naming liboqsprovider.a for static library to ease linking against it with gcc -loqsprovider instead of providing path to to oqsprovider.a.

ghost commented 4 months ago

Hi @maroueneboubakri, thank you for raising that issue.

Actually, you should be able to get your oqsprovider.a installed under your ${CMAKE_INSTALL_PREFIX} by using Debug or Release build type:

https://github.com/open-quantum-safe/oqs-provider/blob/bfaf29819e8e7679eb7b440c20312449d311e86a/oqsprov/CMakeLists.txt#L89-L92

With an empty ${CMAKE_BUILD_TYPE} it installs nothing though.

I fixed this odd behavior, and I renamed oqsprovider.a to liboqsprovider.a (only if you build it statically) in https://github.com/open-quantum-safe/oqs-provider/pull/441.

I also added a CI test for it.