Skip to content

Instantly share code, notes, and snippets.

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


INSTALL( TARGETS [library name]

In Windows, this will give error install Library Targets given no DESTINATION.

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