Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: add lib Crypto++ in Cmake  (Read 4568 times)

0 Members and 1 Guest are viewing this topic.

Xabier

  • Anope User
  • Offline Offline
  • Posts: 13
add lib Crypto++ in Cmake
« 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?
Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: add lib Crypto++ in Cmake
« Reply #1 on: January 29, 2014, 08:59:40 AM »

Add /* RequiredLibraries: crypto++ */ to your module source
Logged

Xabier

  • Anope User
  • Offline Offline
  • Posts: 13
Re: add lib Crypto++ in Cmake
« Reply #2 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
...............
...............
Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Logged

Xabier

  • Anope User
  • Offline Offline
  • Posts: 13
Re: add lib Crypto++ in Cmake
« Reply #4 on: January 29, 2014, 09:22:24 AM »

Thanks for your help
The problem is resolved
Logged
Pages: [1]   Go Up