[CMake] Inconsistency with INSTALL(TARGETS) destinations...

J Decker d3ck0r at gmail.com
Tue Mar 10 18:33:41 EDT 2015


I recently added cmakelists to a library that didn't support cmake.
It started with a simple make system, and was easy to create and use simple
cmake support.

I was building using visual studio, and this was my install command
   install( TARGETS MatrixSSL
            LIBRARY DESTINATION bin
            ARCHIVE DESTINATION lib )

that put the .DLL in bin and .lib in lib.

Then I had to change to using watcom to build, and the .DLL went nowhere...
so I modified the line to...

   install( TARGETS MatrixSSL
            RUNTIME DESTINATION bin
            LIBRARY DESTINATION bin
            ARCHIVE DESTINATION lib )

... then the DLL was installed into bin.

I'm not sure which way is intended... or maybe it's something in each of
the build environments that requires it to be different?


and just commentary...
Installing libraries is kind of a pain... (and this is probably incomplete)


if( WIN32 )
   install( TARGETS MatrixSSL RUNTIME DESTINATION bin LIBRARY DESTINATION
bin ARCHIVE DESTINATION lib )
else( WIN32 )
   if( ${CMAKE_SIZEOF_VOID_P} EQUAL 8 )
      install( TARGETS MatrixSSL DESTINATION lib64 )
   else( ${CMAKE_SIZEOF_VOID_P} EQUAL 8 )
      install( TARGETS MatrixSSL DESTINATION lib )
   endif( ${CMAKE_SIZEOF_VOID_P} EQUAL 8 )
endif( WIN32 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150310/edef3eef/attachment.html>


More information about the CMake mailing list