Resolved! The solution was to set CMAKE_EXE_LINKER_FLAGS using "-Wl,--as-needed".
CMakeLists.txt: ========================================== cmake_minimum_required (VERSION 2.6) project(galinette) set(GALINETTE_VERSION "1.1" CACHE STRING "Software version" FORCE) set(bindir "bin" CACHE FILEPATH "bin directory" FORCE) set(libdir "lib" CACHE FILEPATH "lib directory" FORCE) set(sharedir "share/galinette" CACHE FILEPATH "share directory" FORCE) set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--no-undefined ${CMAKE_EXE_LINKER_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_SHARED_LINKER_FLAGS}") add_definitions (-Wall) add_subdirectory (libgalinette) add_subdirectory (galinette-cli) add_subdirectory (galinette-gtk) ========================================== Many thanks for all your help. Regards, Paul. _______________________________________________ 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