<div dir="ltr">FYI, next release (3.13) will relaxing this contraint so you will be able to apply this strategy.<div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Le mar. 3 juil. 2018 à 08:05, Andrew White <<a href="mailto:andrew.white@audinate.com">andrew.white@audinate.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We have a number of projects that include other projects.  Some of the parent projects are cross-compile projects with various odd settings.<br>
<br>
Example project:<br>
<br>
        add_subdirectory(a)<br>
        add_subdirectory(b)<br>
<br>
I want to go:<br>
        Install(TARGETS target_a program_b<br>
                RUNTIME DESTINATION other-bin<br>
        )<br>
<br>
If I put it in the root CMakeLists.txt, CMake complains that the targets are not defined in this context.  But if I put an install() command in subdirs A and B, then the 'other-bin' output path will apply to all projects, not just this one.<br>
<br>
Is there an easy way to specify custom install paths for targets in subdirectories without directly hacking the environment variables?<br>
<br>
Thanks<br>
<br>
--<br>
Andrew<br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>