Anope IRC Services

Anope Support => 2.0.x/1.9.x Support => Topic started by: Xabier on January 29, 2014, 08:57:02 AM

Title: add lib Crypto++ in Cmake
Post by: Xabier on January 29, 2014, 08:57:02 AM
I have module that use this library bat I am new in c++.

I do know how I add  this lib in CMake I use this

but this not found

FIND_LIBRARY(CRYPTOPP crypto++ /usr/lib)
IF ( CRYPTOPP )
TARGET_LINK_LIBRARIES(${SO} ${PROGRAM_NAME} CRYPTOPP )
ENDIF( CRYPTOPP )

Can help me?
Title: Re: add lib Crypto++ in Cmake
Post by: Adam on January 29, 2014, 08:59:40 AM
Add /* RequiredLibraries: crypto++ */ to your module source
Title: Re: add lib Crypto++ in Cmake
Post by: Xabier on January 29, 2014, 09:09:55 AM
I do not understand, Can you put a sample? I have this source for use crypto++ library:

#include "module.h"
#include "modules/sql.h"
#include <iostream>
#include <string.h>
#include <cryptopp/cryptlib.h>
#include <cryptopp/sha.h>
#include <cryptopp/base64.h>

static Module *me;
using namespace std;
using namespace CryptoPP;

class SQLAuthenticationResultSymfony : public SQL::Interface
...............
...............
Title: Re: add lib Crypto++ in Cmake
Post by: Adam on January 29, 2014, 09:11:07 AM
https://github.com/anope/anope/blob/2.0/modules/extra/m_ldap.cpp#L1
Title: Re: add lib Crypto++ in Cmake
Post by: Xabier on January 29, 2014, 09:22:24 AM
Thanks for your help
The problem is resolved