[CMake] Inconsistency with INSTALL(TARGETS) destinations...
J Decker
d3ck0r at gmail.com
Tue Mar 10 20:48:48 EDT 2015
>
>
> And it's mostly wrong, e.g. lib64 is not correct for many systems. If you
> want Unix like subdirectories, use the GnuIntallDirs module.
>
>
Better?
if( WIN32 )
install( TARGETS MatrixSSL RUNTIME DESTINATION bin LIBRARY DESTINATION
bin ARCHIVE DESTINATION lib )
else( WIN32 )
include( GNUInstallDirs )
install( TARGETS MatrixSSL DESTINATION ${CMAKE_INSTALL_LIBDIR ) )
endif( WIN32 )
On Linux; .so and .a go into LIBDIR and executable into BINDIR
on windows I have executable (BINDIR/RUNTIME) and I have .lib that are
(.a) that are static libraries which would be ARCHIVE; but I have interface
libraries (.exp, .dll link libraries which on some compilers are optional,
since the .dll itself contains enough information) which I wold think would
be LIBRARY ( something different than ARCHIVE?) ...
It seems some generators treat LIBRARY for add_library(SHARED) output and
some need RUNTIME... and all use ARCHIVE for export and static library
targets.
in the case of add_executable it's possible that also generates a export
library; would that be LIBRARY DESTINATION? or ARCHIVE?
> HS
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150310/b8f575fc/attachment.html>
More information about the CMake
mailing list