[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-windows
Subject:    Re: QtRuby install targets
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2009-03-09 20:22:21
Message-ID: 200903092122.21156.neundorf () kde ! org
[Download RAW message or body]

On Monday 09 March 2009, 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} )

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

_______________________________________________
Kde-windows mailing list
Kde-windows@kde.org
https://mail.kde.org/mailman/listinfo/kde-windows
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic