The documentation for target_link_libraries has this description:

  target_link_libraries(<target>

                        <LINK_PRIVATE|LINK_PUBLIC>
                          [[debug|optimized|general] <lib>] ...
                        [<LINK_PRIVATE|LINK_PUBLIC>
                          [[debug|optimized|general] <lib>] ...])


>From my understanding I should be able to do this:

target_link_libraries(target LINK_PRIVATE lib1 LINK_PRIVATE lib2)

however CMake 2.8.11.2 returns:

CMake Error at prime/CMakeLists.txt:128 (target_link_libraries):
  The LINK_PUBLIC or LINK_PRIVATE option must appear as the second argument,
  just after the target name.

What is the correct thing to do here?

Thanks,
James
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to