Thank you Nils, that solved the issue. Cannot believe I missed that in the documentation. Regards, Lars > Date: Tue, 11 Aug 2015 09:41:22 +0200 > From: nilsglad...@gmail.com > To: laasu...@hotmail.com; cmake@cmake.org > Subject: Re: [CMake] Install targets and component > > On 08/11/2015 09:05 AM, Lars wrote: > > Hello, > > > > The following cmake script appears to work but the target is associated > > with "Unspecified" group according to cmake_install.cmake file. > > INSTALL( > > TARGETS MyLib > > RUNTIME DESTINATION "${BIN_PATH}" > > LIBRARY DESTINATION "${LIB_PATH}" > > COMPONENT COMP_APP) > > > > By removing the following section the target is associated with COMP_APP > > as expected. > > LIBRARY DESTINATION "${LIB_PATH}" > > > > We are now using CMake 3.3. This worked great with CMake 2.8.12. > > The behavior should be the same in 2.8.12 and 3.3. > > Like DESTINATION the COMPONENT option is scoped by the RUNTIME, LIBRARY, > ARCHIVE etc. keywords. > > The last of those in your call is LIBRARY hence the COMPONENT will apply > only to "LIBRARY" files installed by this command. > > If you want COMPONENT to apply to all kinds of installed target files > list it before any of the scoping options e.g. > > install( > TARGETS MyLib > COMPONENT COMP_APP > RUNTIME DESTINATION "${BIN_PATH}" > LIBRARY DESTINATION "${LIB_PATH}" > ) > > or repeat it for each scope: > > install( > TARGETS MyLib > > RUNTIME > DESTINATION "${BIN_PATH}" > COMPONENT COMP_APP > LIBRARY > DESTINATION "${LIB_PATH}" > COMPONENT COMP_APP > ) > > Nils
--
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: http://public.kitware.com/mailman/listinfo/cmake