<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
Petr,</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: EmojiFont,Calibri,Helvetica,sans-serif,'Apple Color Emoji','Segoe UI Emoji', NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols; font-size: 12pt;">
That worked nicely. Cheers <span>😊</span></div>
<div style="color: rgb(0, 0, 0); font-family: EmojiFont,Calibri,Helvetica,sans-serif,'Apple Color Emoji','Segoe UI Emoji', NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: EmojiFont,Calibri,Helvetica,sans-serif,'Apple Color Emoji','Segoe UI Emoji', NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols; font-size: 12pt;">
regards, Lars<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<hr tabindex="-1" style="width: 98%; display: inline-block;">
<div id="divRplyFwdMsg" dir="ltr"><font color="#000000" face="Calibri, sans-serif" style="font-size: 11pt;"><b>Fra:</b> Petr Kmoch <petr.kmoch@gmail.com><br>
<b>Sendt:</b> onsdag 9. januar 2019 16.11<br>
<b>Til:</b> Lars<br>
<b>Kopi:</b> cmake@cmake.org<br>
<b>Emne:</b> Re: [CMake] install files generator expression</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi Lars.</div>
<div><br>
</div>
<div>The DESTINATION parameter of install() accepts only a single argument, which means it's tripping on the line break between the two genexes. Make it one argument:</div>
<div><br>
</div>
<div>
<div>INSTALL(FILES ${qt5_locations} </div>
<div> DESTINATION </div>
<div> $<$<PLATFORM_ID:Windows>:bin>$<$<PLATFORM_ID:Linux>:lib> </div>
<div> COMPONENT runtime)</div>
<div><br>
</div>
<div>This should work.</div>
<div><br>
</div>
<div>Petr<br>
</div>
</div>
<div><br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr">On Wed, 9 Jan 2019 at 12:29, Lars <<a href="mailto:laasunde@hotmail.com">laasunde@hotmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;">
<div dir="ltr">
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
Hello,</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
We use find_package command in config mode to find Qt 5.11 libraries. The libraries are available as imported (Qt5::Core etc).</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
Our understand is that CMake does not support install of imported targets. Therefore we use get_target_property to find actual location of library and Install(Files ...) to install the files.</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
The install command looks like this (and works);</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
INSTALL(FILES ${qt5_locations} DESTINATION "bin" COMPONENT runtime)</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
The documentation states that DESTINATION supports generator expression. We would like to use generator expression to install libraries in "bin" on Windows and "lib" on Linux but have not be able to accomplish this task. The below command generated the following
error message "Install files given unknown argument $<$<PLATFORM_ID:Linux>:lib>". We have tried other variants but none of them work.</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div>INSTALL(FILES ${qt5_locations} </div>
<div> DESTINATION </div>
<div> $<$<PLATFORM_ID:Windows>:bin></div>
<div> $<$<PLATFORM_ID:Linux>:lib></div>
<div> COMPONENT runtime)</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
Appreicate any input.</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
kind regards, Lars</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<br>
</div>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank" rel="noreferrer">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" rel="noreferrer">
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" rel="noreferrer">
http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank" rel="noreferrer">
http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank" rel="noreferrer">
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" rel="noreferrer">
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" target="_blank" rel="noreferrer">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote>
</div>
</div>
</div>
</body>
</html>