Re: [CMake] cmake trouble

2012-10-22 Thread Eric Clark
> -Original Message- > From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On > Behalf Of Rolf Eike Beer > Sent: Monday, October 22, 2012 12:51 PM > To: cmake@cmake.org > Subject: Re: [CMake] cmake trouble > > Eric Clark wrote: > > > -Origin

Re: [CMake] cmake trouble

2012-10-22 Thread Rolf Eike Beer
Eric Clark wrote: > > -Original Message- > > From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On > > Behalf Of Rolf Eike Beer > > Sent: Monday, October 22, 2012 12:48 PM > > To: cmake@cmake.org > > Subject: Re: [CMake] cmake trouble >

Re: [CMake] cmake trouble

2012-10-22 Thread Eric Clark
> -Original Message- > From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On > Behalf Of Rolf Eike Beer > Sent: Monday, October 22, 2012 12:48 PM > To: cmake@cmake.org > Subject: Re: [CMake] cmake trouble > > Eric Clark wrote: > > > From: And

Re: [CMake] cmake trouble

2012-10-22 Thread Rolf Eike Beer
Eric Clark wrote: > > Eric Clark wrote: > > > Hello, > > > > > > First off, you cannot call both add_executable and add_library in the > > > > > same CMakeLists file. Here is what I can say about your other questions: > > Of course you can. > > Yes, but only if you call project() twice, correct?

Re: [CMake] cmake trouble

2012-10-22 Thread Rolf Eike Beer
Eric Clark wrote: > > From: Andreas Pakulat [mailto:ap...@gmx.de] > > On Mon, Oct 22, 2012 at 6:04 PM, Eric Clark wrote: > > > First off, you cannot call both add_executable and add_library in the > > > same CMakeLists file. > > > > I think there's something missing here, but its perfectly possi

Re: [CMake] cmake trouble

2012-10-22 Thread Eric Clark
> -Original Message- > From: Andreas Pakulat [mailto:ap...@gmx.de] > Sent: Monday, October 22, 2012 12:17 PM > To: Eric Clark > Cc: 张峰; cmake@cmake.org > Subject: Re: [CMake] cmake trouble > > Hi, > > On Mon, Oct 22, 2012 at 6:04 PM, Eric Clark wrote: >

Re: [CMake] cmake trouble

2012-10-22 Thread Eric Clark
. My apologies for saying the wrong thing, I was only trying to help... Eric > -Original Message- > From: Andreas Pakulat [mailto:ap...@gmx.de] > Sent: Monday, October 22, 2012 12:17 PM > To: Eric Clark > Cc: 张峰; cmake@cmake.org > Subject: Re: [CMake] cmake trouble > >

Re: [CMake] cmake trouble

2012-10-22 Thread Eric Clark
> -Original Message- > From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On > Behalf Of Rolf Eike Beer > Sent: Monday, October 22, 2012 12:11 PM > To: cmake@cmake.org > Subject: Re: [CMake] cmake trouble > > Eric Clark wrote: > > Hello, > >

Re: [CMake] cmake trouble

2012-10-22 Thread Rolf Eike Beer
Eric Clark wrote: > Hello, > > First off, you cannot call both add_executable and add_library in the same > CMakeLists file. Here is what I can say about your other questions: Of course you can. > 1. All commands that require a target have to come after you have > created the target via ad

Re: [CMake] cmake trouble

2012-10-22 Thread Andreas Pakulat
Hi, On Mon, Oct 22, 2012 at 6:04 PM, Eric Clark wrote: > > First off, you cannot call both add_executable and add_library in the same > CMakeLists file. I think there's something missing here, but its perfectly possible to have one or more library and executable targets specified in the same cma

Re: [CMake] cmake trouble

2012-10-22 Thread Eric Clark
same answer. It will work as long as you make the call to the command after add_library or add_executable. Hope this helps. Eric From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of ?? Sent: Monday, October 22, 2012 10:25 AM To: cmake@cmake.org Subject: [CMake] cmake trouble

[CMake] cmake trouble

2012-10-22 Thread 张峰
Hello: I am using cmake for three months now. but was trouble in a situation 。for details bellow: (in Windows) 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_LIBRA

Re: [CMake] cmake trouble

2012-10-22 Thread Klaim - Joël Lamotte
Hi, On Mon, Oct 22, 2012 at 5:35 PM, 张峰 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_

[CMake] cmake trouble

2012-10-22 Thread 张峰
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_DI