When creating an out-of-sourcetree build, cmake fails to find ACE. Caused by incorrect paths (use of CMAKE_BINARY_DIR instead of CMAKE_SOURCE_DIR)
Thanks hauptmech. In fact, the current behavior is by design: the ace4yarp directory is treated as build-specific material rather than source. I do see that this is odd. But it is useful, at least for developers with multiple builds of YARP configured in different ways using the same source tree. What I can do is commit a change which looks for ace4yarp in the source directory if it is not present in the build directory. I'll close this bug when that is done.
I noticed that you had a problem with librt in the patch too. Hardcoding rt as you did would break some builds. A better solution would be to provide more paths to FIND_LIBRARY. Where was rt on your system?
* If ace4yarp not found in build directory, the source directory is also checked before falling back on external ace package search.
* If rt library is not found, a compile test is also done before assuming that it is not present. This should cover the case where the system compiler knows how to find rt but cmake (for whatever reason) doesn't know about the relevant system paths.
These changes should not break existing builds, and hopefully work for you also. Please let me know how it goes. Also, If I had your name I could credit you in the ChangeLog :-)
Paul, Didn't mean to include the librt bit. It was a quick hack, didn't even notice the ACE_RT_LIBRARY stuff. I'm cross compiling yarp to a embedded platform. librt is in CMAKE_FIND_ROOT_PATH/usr/lib