On 4. Jan, 2010, at 19:15 , Alexander Neundorf wrote:
[snip]
> 
>> - There is no distinction between install prefixes for the target and the
>> host. Sometimes I'd like to put various build tools on the host system at
>> the same time as libs and binaries on the target root.
> 
> In CMake one build tree uses one toolchain. So in one build tree you can only 
> create executable which run either for the target, of for the host, not both 
> in one go.
> So if you need first to create host build tools, and later on use them for 
> the 
> actual cross compile, you need two build trees. I would recommend to "export" 
> the executable and "import" them again in the cross build.
> 
> If this is not your problem, but really just the install location, you can 
> set 
> the install location of every install() command separately, this is 
> completely independent from the cross compiling support.



To automate this you can use the ExternalProject.cmake that comes with 
CMake-2.8 to build the host tools. You can then use add_executable(tool 
IMPORTED) and set_target_properties(tool PROPERTIES IMPORTED_LOCATION ...) to 
import the tool target into the cross-compiling project.


Michael

_______________________________________________
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