Am Sonntag 03 Oktober 2010, 14:15:41 schrieb Paul McEnery: > The solution was to set CMAKE_EXE_LINKER_FLAGS using "-Wl,--as-needed".
That is actually only a work-around. Pkg-config can handle the difference between static linking and dynamic linking but you have to tell it what is what. However, not all upstream developers that emit pkg-config files make proper use of that. OTOH, some APIs import types from other libraries so that linking to those is necessary to avoid problems when upgrading. That's where -Wl,--as-needed is not the proper solution (as the linker cannot know this). HS _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
