Petr, That worked nicely. Cheers 😊
regards, Lars ________________________________ Fra: Petr Kmoch <petr.km...@gmail.com> Sendt: onsdag 9. januar 2019 16.11 Til: Lars Kopi: cmake@cmake.org Emne: Re: [CMake] install files generator expression Hi Lars. 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: INSTALL(FILES ${qt5_locations} DESTINATION $<$<PLATFORM_ID:Windows>:bin>$<$<PLATFORM_ID:Linux>:lib> COMPONENT runtime) This should work. Petr On Wed, 9 Jan 2019 at 12:29, Lars <laasu...@hotmail.com<mailto:laasu...@hotmail.com>> wrote: Hello, We use find_package command in config mode to find Qt 5.11 libraries. The libraries are available as imported (Qt5::Core etc). 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. The install command looks like this (and works); INSTALL(FILES ${qt5_locations} DESTINATION "bin" COMPONENT runtime) 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. INSTALL(FILES ${qt5_locations} DESTINATION $<$<PLATFORM_ID:Windows>:bin> $<$<PLATFORM_ID:Linux>:lib> COMPONENT runtime) Appreicate any input. kind regards, Lars -- Powered by www.kitware.com<http://www.kitware.com> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake