[CMake] CPACK and cmake install(targets
Eric Noulard
eric.noulard at gmail.com
Fri Jan 18 18:12:45 EST 2013
2013/1/18 Totte Karlsson <totte at dunescientific.com>:
> Hi,
> I try to package a built shared library on windows. In the CMAKE file for
> where the dll and import lib is created I have
>
> install(TARGETS ${target}
> RUNTIME DESTINATION bin
> LIBRARY DESTINATION lib
> ARCHIVE DESTINATION lib
> COMPONENT rr_core
> )
>
> 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
)
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
More information about the CMake
mailing list