[CMake] Cpack Nsis not installing libraries

Mauricio Klein mauricio.klein.msk at gmail.com
Tue Feb 28 17:02:35 EST 2012


Hello Mr.Noulard!

Sorry for the late in reply. I had a 'miss configured' filter in my e-mail
dropping all mails.

1) Thanks for the explanation! I will take a look at the "BundleUtilities",
once this is exactly what i need: a autonomous application.

2) I'm using CMake version '2.8.7'.

In Linux, i don't have problems with dependencies, once i'm generating
'Deb' and 'RPM' packages with CPack, and the dependencies are solved by the
package manager of the OS.

But in Windows i'm having troubles, specially because i'm using
'Pthreads-Win32' instead the Threads implemented by the Windows API, and,
once there isn't a proper installer to 'Pthreads-Win32' (OpenSSL has!), i
can't rely in a library installed elsewhere then the Installation directory.

Thanks in advance for your attention!

On Mon, Feb 27, 2012 at 7:47 PM, Eric Noulard <eric.noulard at gmail.com>wrote:

> 2012/2/27 Mauricio Klein <mauricio.klein.msk at gmail.com>:
> > Hello everybody!
> >
> > I'm creating a NSIS package using CPack to install my software.
> >
> > The code is compilled using Visual Studio 9, and the compilation +
> packing
> > is working well.
> >
> > But, once i install the software using the generated NSIS package, the
> > program doesn't start because NSIS did't installed the required
> libraries.
> >
> > The strange is that in my CMakeLists.txt, i tell that my binary requires
> > these libraries.
> >
> > The libraries are:
> > * OpenSSL
> > * Pthreads
> > (both found using find macros)
> >
> >
> > The piece of configuration that defines these relashionship is showed
> > bellow:
> >
> -------------------------------------------------------------------------------------
> > find_package(Pthreads REQUIRED)
> > find_package(OpenSSL REQUIRED)
> >
> > include_directories(${OPENSSL_INCLUDE_DIR})
> > include_directories(${PTHREADS_INCLUDE_DIR})
> >
> > install(TARGETS MyBin DESTINATION "MyBin1-0/bin")
>
>
> > install(TARGETS ${PTHREADS} DESTINATION "MyBin1-0/bin")
> > install(TARGETS ${OPENSSL} DESTINATION "MyBin1-0/bin")
>
> ${PTHREADS} and ${OPENSSL} seems wrong
> usually those are:
> ${PTHREADS_LIBRARIES}
> ${OPENSSL_LIBRARIES}
>
> moreover you cannot use install(TARGETS ....) for those
> because they are not TARGET unless you somehow define
> them as IMPORTED library.
>
> Usually "third party" libs (those which are not built in your project)
> are not installed because they may be found on the host where
> your software is installed already.
>
> If you are interested in creating "autonomous" bundle
> have a look at the BundleUtilities module.
>
> > The "MyBin" binary is installed well, but the libraries of Pthreads and
> > OpenSSL not!
> >
> > Any hint??
> >
> > Thanks in advance for your attention, and any help is very welcome!
>
> May be you can tell us which version of CMake you are using
> and which system you are targeting (Windows, Linux, MacOS Xetc...)
> --
> Erk
> Le gouvernement représentatif n'est pas la démocratie --
> http://www.le-message.org
>



-- 
Best regards,

Maurício Souza Klein.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120228/a9ebacb9/attachment-0001.htm>


More information about the CMake mailing list