[CMake] CPACK and cmake install(targets

Totte Karlsson totte at dunescientific.com
Sat Jan 19 22:54:47 EST 2013


When executing the install target in my projet, the dll goes to the bin
folder and the lib goes to the lib folder. That is all good.

But when running CPACK only the .lib file is packaged, and not the DLL.
Why??

> May be because you are doing component packaging and that the
> COMPONENT part of install(TARGETS should be repeated
> for each DESTINATION.
>
> i.e.
> install(TARGETS ${target}
>            RUNTIME DESTINATION bin COMPONENT rr_core
>            LIBRARY DESTINATION lib COMPONENT rr_core
>           ARCHIVE DESTINATION lib COMPONENT rr_core
> )
>
Worked perfectly!

Thanks,
Totte



More information about the CMake mailing list