[cmake-developers] GCC link options

Brad King brad.king at kitware.com
Wed Jul 25 08:03:28 EDT 2012


On 07/24/2012 05:24 PM, J Decker wrote:
> CMake Error at eltanin/sdlgui/src/eltanin_sdl/CMakeLists.txt:68
> (target_link_libraries):
>   Cannot specify link libraries for target "advapi32" which is not built by
>   this project.

If that library is not built by you why does it have a dependency
on a symbol you provide such that your library must come after it?

> Is there something I can do to make sure this specific library is
> last?  That maybe someone needs to update the cmake scripts?

There was some discussion of this a few years ago:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/18883

>> Alternatively, don't specify any target_link_libraries calls
>> so that there are no indirect dependencies.
> Where would I put the libraries then? as part of the sources?

One giant target_link_libraries line for the final target that
lists exactly the link line you want.

-Brad



More information about the cmake-developers mailing list