hyperrealm / libconfig

C/C++ library for processing configuration files
https://hyperrealm.github.io/libconfig/
GNU Lesser General Public License v2.1
1.12k stars 366 forks source link

cmake: Fix broken static library build for c++ target #241

Closed Challanger524 closed 2 months ago

Challanger524 commented 7 months ago

PR for issue: #237

If you try to build C++ target with option(BUILD_SHARED_LIBS "Enable shared library" OFF) - it will fail coz C code being built in shared-lib manner, due to missing LIBCONFIG_STATIC definition.

This is the fix.

Challanger524 commented 2 months ago

I have issue #238 I'm not sure how the perfect fix might look like. Can create PR with patch given in the issue.