Nick Hutchinson <nshutchin...@gmail.com> writes: > target_link_libraries() is supposed to work for linker flags as well: > > cmake version 2.8.12 > target_link_libraries > Link a target to given libraries. > > target_link_libraries(<target> [item1 [item2 [...]]] > [[debug|optimized|general] <item>] ...) > > Specify libraries or flags to use when linking a given target. The > named <target> must have been created in the current directory by a > command such as add_executable or add_library. The remaining > arguments specify library names or flags.
Exactly, and the next paragraph is: If a library name matches that of another target in the project a dependency will automatically be added in the build system to make sure the library being linked is up-to-date before the target links. Item names starting with '-', but not '-l' or '-framework', are treated as linker flags. This all works with earlier versions of CMake. Did 2.8.12 intentionally break compatibility and forget to document it?
pgpOuyec4TPPZ.pgp
Description: PGP signature
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake