Hi,
On Mon, Oct 22, 2012 at 5:35 PM, 张峰 <[email protected]> wrote:
>
> 1.if i put "TARGET_LINK_LIBRARIES(fan test)" before ADD_EXECUTABLE
> command,this does not work ,why??
>
Because until yout call add_executable(), the target name doesn't exist.
You have to use the target name as first parameter of
target_link_libraries().
>
> 2. but if i ADD_LIBRARY(test STATIC ${LIBTEST_SRC} ${LIBHELLO_SRC}) ,it
> is ok,why ??
>
I don't understand the question.
>
> 3.if i put "TARGET_LINK_LIBRARIES(fan test)" after ADD_EXECUTABLE
> command,it works ,why ??
>
>
For the reason I explained in 1.
Joel Lamotte
--
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