Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k stars 93 forks source link

When using RESTINIO_FIND_DEPS=ON and RESTINIO_FMT_HEADER_ONLY=OFF cmake fails on configure step #159

Closed jonboh closed 2 years ago

jonboh commented 2 years ago

restinio target is defined as an INTERFACE library in https://github.com/Stiffstream/restinio/blob/v.0.6.14/dev/restinio/CMakeLists.txt#L9 however when RESTINIO_FIND_DEPS=ON and RESTINIO_FMT_HEADER_ONLY=OFF fmt::fmt is linked with PUBLIC which is not allowed https://github.com/Stiffstream/restinio/blob/v.0.6.14/dev/restinio/CMakeLists.txt#L56

I get the following error:

[build] CMake Error at C:/Dev/trunk/src_thirdparty/build/restinio/dev/restinio/CMakeLists.txt:56 (TARGET_LINK_LIBRARIES):
[build]   INTERFACE library can only be used with the INTERFACE keyword of
[build]   target_link_libraries
[build] 
[build] 
[build] -- Configuring incomplete, errors occurred!
eao197 commented 2 years ago

Hi, thanks for reporting.

The fix is in issue-159 branch.

I hope I can merge it into the master at the beginning of the next week. But I don't know when I can release a new version of RESTinio as tag.

eao197 commented 2 years ago

Hi!

The fix is a part of 0.6.15 release now.