[CMake] cmake trouble
张峰
fangler2012 at 126.com
Mon Oct 22 11:35:45 EDT 2012
Hello:
I am using cmake for three months now.
but was trouble in a situation 。for details bellow: (in Windows,using Microsoft Visual Studio 2008)
ADD_LIBRARY(test SHARED ${LIBTEST_SRC} ${LIBHELLO_SRC})
#ADD_LIBRARY(test STATIC ${LIBTEST_SRC} ${LIBHELLO_SRC})
#add executable
AUX_SOURCE_DIRECTORY(. FAN_SRC)
TARGET_LINK_LIBRARIES(fan test)
ADD_EXECUTABLE(fan ${FAN_SRC})
1.if i put "TARGET_LINK_LIBRARIES(fan test)" before ADD_EXECUTABLE command,this does not work ,why??
2. but if i ADD_LIBRARY(test STATIC ${LIBTEST_SRC} ${LIBHELLO_SRC}) ,it is ok,why ??
3.if i put "TARGET_LINK_LIBRARIES(fan test)" after ADD_EXECUTABLE command,it works ,why ??
I am waiting for your help !!
With best wishes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121022/ab7f3a31/attachment-0001.htm>
More information about the CMake
mailing list