[Kde-bindings] QtRuby install targets
David Palacio
dpalacio at uninorte.edu.co
Fri Mar 13 02:24:58 CET 2009
On Jueves 12 Marzo 2009 14:09:16 Richard Dale wrote:
> On Sunday 08 March 2009 23:16:55 David Palacio wrote:
> > On MS Windows cmake configuration fails at
> > ruby/qtruby/src/CMakeLists.txt:41 with the following error
> >
> > install Library TARGETS given no DESTINATION!
> >
> > but it configures fine on GNU. If I remove "LIBRARY" from line 41:
> > install(TARGETS qtruby4shared LIBRARY DESTINATION
> > ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} )
> >
> > it configures fine
>
> I'm surprised cmake works differently on windows - are they the same
> version. With your change, does it still work fine on Linux?
>
> -- Richard
Yes, it still install to the lib/ dir without LIBRARY.
From KDE-Windows:
>The thing is, cmake separates between "ARCHIVE", "LIBRARY" and "RUNTIME"
>components of targets.
>On Windows, the dll-file is considered a "RUNTIME" component, since it
> should go into the same directory as the executable, and the .lib file is
> considered an ARCHIVE component. On UNIX the .so file is a LIBRARY target,
> a .a file is (obviously) an ARCHIVE target.
>So if you say
>install(TARGETS mylib LIBRARY DESTINATION lib)
>under Windows then you didn't specifiy the destination directories for the
> dll and the lib file, that's why cmake complains.
>So you should do:
>install(TARGETS mylib LIBRARY DESTINATION lib${LIB_SUFFIX}
> ARCHIVE DESTINATION lib${LIB_SUFFIX}
> RUNTIME DESTINATION bin )
>
>Then it will do the right thing both on Windows and UNIX. If it's inside a
> KDE project, you can also use
>install(TARGETS mylib ${INSTALL_TARGETS_DEFAULT_ARGS} )
>which is a variable set in FindKDE4Internal.cmake, which basically contains
>just these settings.
>
>The simple way would be
>install(TARGETS mylib DESTINATION lib)
>but then Windows users may complain, because the dll won't be in the same
>directory as executables, so they'll have top adjust the PATH to make the
>executables run.
>
>Alex
More information about the Kde-windows
mailing list