Jussi Pakkanen schrieb:
Hi

I'm using CMake for Cuneiform (https://launchpad.net/cuneiform-linux). In my 
root CMakeLists.txt I have effectively the following:

set(LIBDIR "lib")

And then in source subdirectories I build shared libraries and install them with

install(TARGETS [library name] LIBRARY DESTINATION ${LIBDIR})

This works perfectly on Linux, OSX and FreeBSD. Recently a user tried to build 
Cuneiform with MinGW. He reports that the install command mentioned above gives 
the following kinds of errors (one for each library):

CMake Error at cuneiform_src/Kern/ccom/CMakeLists.txt:7 (install):
  install Library TARGETS given no DESTINATION!

CMake then stops without generating makefiles. I asked him to add message(STATUS "Lib subpath in ccom is ${LIBDIR}.") above the install command. CMake prints the correct value for LIBDIR so it should be set properly.

What could be causing this? I have no Windows machines so I can't debug this 
myself, nor do I have all that much MinGW experience.

Thanks for your help.


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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to