<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 1 January 2016 at 11:00, Jakob van Bethlehem <span dir="ltr"><<a href="mailto:jsvanbethlehem@gmail.com" target="_blank">jsvanbethlehem@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hej Joël,</div><div><br></div><div>The command you’re looking for is ‘source_group’, see <a href="https://cmake.org/cmake/help/v3.0/command/source_group.html" target="_blank">https://cmake.org/cmake/help/v3.0/command/source_group.html</a></div><div><br></div></div></blockquote><div><br></div><div>I use this already but it works only with source files, not with targets. With targets you need to set the FOLDER property.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><div>Sincerely,</div><div>Jakob</div><div><br></div><br><div><blockquote type="cite"><div><div class="h5"><div>On 30 Dec 2015, at 20:52, Klaim - Joël Lamotte <<a href="mailto:mjklaim@gmail.com" target="_blank">mjklaim@gmail.com</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr"><div>The following CMake script:</div><div><br></div><div>    cmake_minimum_required(VERSION 3.4)</div><div>    </div><div>    add_library( mylib INTERFACE )</div><div>    set_property( TARGET mylib PROPERTY FOLDER /some/dir )</div><div><br></div><div><br></div><div>Will trigger this error on configuration:</div><div><br></div><div>    CMake Error at CMakeLists.txt:4 (set_property):</div><div>      INTERFACE_LIBRARY targets may only have whitelisted properties.  The</div><div>      property "FOLDER" is not allowed.</div><div><br></div><div><br></div><div>This prevent any interface library to be organized in Visual Studio virtual folders.</div><div>Unfortunately it also mean that header-only targets can't be organized.</div><div><br></div><div>I have no idea how this should be solved. Should the property just be white-listed?</div><div>Or should a better have a another specific library mode for header-only targets?<br></div><div><br></div><div>Is there any workaround?</div><div><br></div><div>Joël Lamotte</div><div><br></div></div></div></div>
-- <br><br>Powered by <a href="http://www.kitware.com" 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" 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" target="_blank">http://cmake.org/cmake/help/support.html</a><br>CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" 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" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a></div></blockquote></div><br></div><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="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br></div></div>