Re: [CMake] Xcode paths not turning out right

2009-09-21 Thread Brad King
Robert Dailey wrote: > Great! Glad I could help. Let me know when this is fixed so I can > download a new nightly build. I'll try to keep up with that bug status > as well. If you get an account in the bug tracker you can go to the issue and choose "monitor issue". Then you will get updates auto

Re: [CMake] Xcode paths not turning out right

2009-09-21 Thread Robert Dailey
On Mon, Sep 21, 2009 at 4:03 PM, Brad King wrote: > Robert Dailey wrote: > > I've attached a test project that reproduces this issue. At the root > > "test" directory, create a new directory called 'build'. So you will > > have "test/build". > > > > cd into test/build and run: > > > > cmake -G "X

Re: [CMake] Xcode paths not turning out right

2009-09-21 Thread Brad King
Robert Dailey wrote: > I've attached a test project that reproduces this issue. At the root > "test" directory, create a new directory called 'build'. So you will > have "test/build". > > cd into test/build and run: > > cmake -G "Xcode" .. > > This will generate an xcode project for you. Open

Re: [CMake] Xcode paths not turning out right

2009-09-21 Thread Robert Dailey
On Mon, Sep 21, 2009 at 2:48 PM, Robert Dailey wrote: > On Mon, Sep 21, 2009 at 1:43 PM, Brad King wrote: > >> Robert Dailey wrote: >> >>> My paths are correct. I'm passing in the correct absolute paths into >>> add_executable. I think that cmake is using the current cmake file instead >>> of us

Re: [CMake] Xcode paths not turning out right

2009-09-21 Thread Robert Dailey
On Mon, Sep 21, 2009 at 1:43 PM, Brad King wrote: > Robert Dailey wrote: > >> My paths are correct. I'm passing in the correct absolute paths into >> add_executable. I think that cmake is using the current cmake file instead >> of using the one that the function call originated from. For example,

Re: [CMake] Xcode paths not turning out right

2009-09-21 Thread Brad King
Robert Dailey wrote: My paths are correct. I'm passing in the correct absolute paths into add_executable. I think that cmake is using the current cmake file instead of using the one that the function call originated from. For example, I have two CMake scripts: /Users/imac/work/redsword/CMakeL

Re: [CMake] Xcode paths not turning out right

2009-09-21 Thread Robert Dailey
My paths are correct. I'm passing in the correct absolute paths into add_executable. I think that cmake is using the current cmake file instead of using the one that the function call originated from. For example, I have two CMake scripts: /Users/imac/work/redsword/CMakeLists.txt /Users/imac/work/r

Re: [CMake] Xcode paths not turning out right

2009-09-21 Thread Robert Dailey
I don't have a sample project ready yet, but I will provide the generated xcode project files in case you guys want to take a look at them. Open them in a text editor and you'll see that the paths are weird. Relative files appear as: projects/Newton/source/SpawnShadowEntityAction.cpp This seems wr

Re: [CMake] Xcode paths not turning out right

2009-09-18 Thread Robert Dailey
I'll see if I can get you guys a reproducible project. However, I hope you guys have access to the version of xcode I'm using. I'll also get you the version number next monday when I get back into work. On Fri, Sep 18, 2009 at 4:15 PM, Robert Dailey wrote: > Yeah, that's what I'm doing... basica

Re: [CMake] Xcode paths not turning out right

2009-09-18 Thread Robert Dailey
Yeah, that's what I'm doing... basically: # Root CMakeLists.txt file: function( func1 file ) add_executable( foobar "${CMAKE_CURRENT_SOURCE_DIR}/${file}" ) endfunction() function( define_project file ) func1( ${file} ) endfunction() # CMakeLists.txt in a lower subdirectory (Inside foobar proj

Re: [CMake] Xcode paths not turning out right

2009-09-18 Thread Brad King
David Cole wrote: Sounds like maybe you are using "${CMAKE_CURRENT_SOURCE_DIR}" in a function or macro. (defined at the top level, but called from a lower level)... That works just fine...evaluation of the variable is the location of the current CMakeLists.txt file, not the file containing

Re: [CMake] Xcode paths not turning out right

2009-09-18 Thread David Cole
Sounds like maybe you are using "${CMAKE_CURRENT_SOURCE_DIR}" in a function or macro. (defined at the top level, but called from a lower level)... On Fri, Sep 18, 2009 at 4:12 PM, Brad King wrote: > Robert Dailey wrote: > >>Where is the CMakeLists.txt file containing this line? >>Pe

Re: [CMake] Xcode paths not turning out right

2009-09-18 Thread Brad King
Robert Dailey wrote: Where is the CMakeLists.txt file containing this line? Perhaps "/Users/imac/work/redsword/CMakeLists.txt"? That's where the root one is, and this root script has all of the meat that the subdirectories call. This script is the one that has the functions that call

Re: [CMake] Xcode paths not turning out right

2009-09-18 Thread Robert Dailey
On Fri, Sep 18, 2009 at 12:52 PM, Brad King wrote: > Robert Dailey wrote: > >> The goal here is to try to build Xcode projects for building iPhone apps. >> My CMake logic for producing projects is rather complex, which is why I am >> hesitant to post it here. But basically I'm taking the exact pa

Re: [CMake] Xcode paths not turning out right

2009-09-18 Thread Brad King
Brad King wrote: Robert Dailey wrote: The goal here is to try to build Xcode projects for building iPhone apps. My CMake logic for producing projects is rather complex, which is why I am hesitant to post it here. But basically I'm taking the exact path above and passing it into add_executable

Re: [CMake] Xcode paths not turning out right

2009-09-18 Thread Brad King
Robert Dailey wrote: The goal here is to try to build Xcode projects for building iPhone apps. My CMake logic for producing projects is rather complex, which is why I am hesitant to post it here. But basically I'm taking the exact path above and passing it into add_executable like so: add_exe

Re: [CMake] Xcode paths not turning out right

2009-09-18 Thread Brad King
Robert Dailey wrote: Hello, I'm using the latest (as of now) CMake build from CVS head. I noticed that when I specify a source file like so: /Users/imac/work/redsword/projects/foobar/mysource.mm XCode actually thinks it is here: /Users/imac/work/redsword/projects/foobar/projects/foobar/myso

[CMake] Xcode paths not turning out right

2009-09-17 Thread Robert Dailey
Hello, I'm using the latest (as of now) CMake build from CVS head. I noticed that when I specify a source file like so: /Users/imac/work/redsword/projects/foobar/mysource.mm XCode actually thinks it is here: /Users/imac/work/redsword/projects/foobar/projects/foobar/mysource.mm And when I right