[CMake] -fPIC flag on object build for static lib targets?
Brad King
brad.king at kitware.com
Mon Oct 2 10:38:17 EDT 2006
James Mansion wrote:
>> Are you trying to link object files compiled without -fPIC into a shared
>> library? That would never work; -fPIC is required for all objects in shared libraries.
>
> I'm guessing so - I want to do it too! Or rather, be able
> to make a static library containing objects that can be linked
> to create a shared library - I think some people call it a
> 'convenience library'.
[snip]
> It would be nice to be able to build (with CMake) the zlib,
> expat and pcre libraries so that they can be kept seperate,
> and yet built into the DLL without creating exports, as the
> PoCo build does now.
http://www.cmake.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F
-Brad
More information about the CMake
mailing list