[CMake] Windows NSIS installer shared libraries

Leek, Jim leek2 at llnl.gov
Fri Jun 14 11:11:52 EDT 2013


Geez, all I have to do it this for each library (mars is a library) and it just works:

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

That's much better than what I was doing before:

if(UNIX)
  install (TARGETS metis DESTINATION lib)
else(UNIX)
  install (TARGETS metis DESTINATION bin)
endif(UNIX)

From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Richard Shaw
Sent: Friday, June 14, 2013 5:01 AM
To: cmake at cmake.org
Subject: Re: [CMake] Windows NSIS installer shared libraries

Ack, something about this list confuses gmail and it always goes to the poster instead of the list apologies.

On Fri, Jun 14, 2013 at 1:07 AM, J Decker <d3ck0r at gmail.com<mailto:d3ck0r at gmail.com>> wrote:
I think something like
if( NOT UNIX )
install( TARGETS x RUNTIME DESTINATION bin
   LIBRARY DESTINATION bin
   ARCHIVE DESTINATION lib
)
else()
if( NOT UNIX )

I don't think you need the if(NOT UNIX) stuff... IIRC windows runtime dll's (not the import libraries) are treated as runtimes, so they would automatically go in with the binaries, so the OP just needs to make sure a runtime destination is set.

Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130614/4641d874/attachment.htm>


More information about the CMake mailing list