List Archive


Thread Index


From: Thomas Klausner <>
To: Michał Janiszewski <>
Subject: Re: vcpkg support/static builds
Date: Mon, 14 Aug 2017 15:46:59 +0200

On Mon, Aug 14, 2017 at 01:02:06PM +0200, Michał Janiszewski wrote:
> thanks for the update.
> Since I posted the previous message, I've learned about CMake-3.0+ standard
> This allows user to set upon configuration whether they want a shared or
> static library, but only for `add_library` targets. All other things retain
> their linking mode.
> See it getting used here:
> Seeing how both your static and shared paths are the same, perhaps you may
> want to investigate using said option.

I've looked at the documentation and the example you pasted, but it's
not clear to me how to use it.

Just removing the type is not enough.

Removing it and adding

OPTION(BUILD_SHARED_LIBS "build shared libraries" ON)

in the main CMakeLists.txt file just builds static libraries.



in the main CMakeLists.txt builds shared libraries, but I can't turn
it off by running


so I don't really know how this is supposed to work. Any ideas?

Made by MHonArc.