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/CMakeLists.txt
/Users/imac/work/redsword/projects/Newton/CMakeLists.txt

The former script is the one that has the function:

function( define_project )
  add_executable( .... )
endfunction()

And the latter script calls the define_project() function. Can anyone peek at the CMake source to see if this is indeed the case? Again, I'll try to find time to provide a reproducible test project.

By the time the Xcode generator writes the path, there is no
distinction between add_executable being called from the
CMakeLists.txt directly or through the function.  If you
message() out the path inside your function just before
or after add_executable, that is the path the generator will
see.  I expect it is correct, and the generator or Xcode
does something funny....especially since it works in VS.

-Brad
_______________________________________________
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

Reply via email to