Skip to content

Instantly share code, notes, and snippets.

@HansNewbie

HansNewbie/CMAKE Note.md

Last active Aug 29, 2015
Embed
What would you like to do?
CMAKE Note

====

INSTALL( TARGETS [library name]
         LIBRARY DESTINATION $(LIBDIR)] )

In Windows, this will give error install Library Targets given no DESTINATION. http://www.cmake.org/pipermail/cmake/2008-September/023876.html

You only install the LIBRARY but not the ARCHIVE (the static import lib automatically created when you export functions from a lib on windows). A static library is also treated as ARCHIVE by cmake on windows. So either remove LIBRARY or add a destination for ARCHIVE. Another thing which comes to my mind is that a library is treated as RUNTIME - but I'm unsure atm :)

So best is - remove 'LIBRARY' and you'll be fine.

HTH Christian

====

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment