Browse Source

====== Renaming library to ndn-cxx ======

Dependent applications should perform the following changes:

* all includes should be changed from <ndn-cpp-dev/...> to <ndn-cxx/...>
* documentation files/comments referring to ndn-cpp-dev should be
  updated and refer to ndn-cxx
* if the app uses pkgconfig for dependency detection, 'libndn-cpp-dev'
  should be replaced with 'libndn-cxx'.  Example for waf users:

    conf.check_cfg(package = 'libndn-cxx', args = ['--cflags', '--libs'],
                   uselib_store = 'NDN_CXX', mandatory = True)

Change-Id: I92d9ec7ff176b9fe8b4352bf04bbb32aa810422d
Refs: #1491
pull/1/head
Alexander Afanasyev 11 years ago
parent
commit
766cea7931
  1. 2
      .waf-tools/default-compiler-flags.py
  2. 2
      AUTHORS.md
  3. 36
      CHANGELOG
  4. 6
      ChangeLog
  5. 26
      INSTALL.md
  6. 38
      README.md
  7. 4
      docs/code-style.rst
  8. 10
      docs/conf.py
  9. 4
      docs/doxygen.conf
  10. 4
      docs/index.rst
  11. 6
      examples/consumer-with-timer.cpp
  12. 4
      examples/consumer.cpp
  13. 6
      examples/producer.cpp
  14. 4
      examples/wscript
  15. 10
      libndn-cpp-dev.pc.in
  16. 10
      libndn-cxx.pc.in
  17. 13
      src/common.hpp
  18. 8
      src/security/key-chain.hpp
  19. 4
      src/security/sec-public-info-sqlite3.cpp
  20. 6
      src/util/config-file.cpp
  21. 4
      src/util/logging.cpp
  22. 8
      src/util/logging.hpp
  23. 2
      tests-integrated/wscript
  24. 2
      tests/security/identity-fixture.cpp
  25. 2
      tests/wscript
  26. 7
      tools/wscript
  27. 40
      wscript

2
.waf-tools/default-compiler-flags.py

@ -5,6 +5,8 @@ from waflib import Logs, Configure
def options(opt):
opt.add_option('--debug', '--with-debug', action='store_true', default=False, dest='debug',
help='''Compile in debugging mode without all optimizations (-O0)''')
opt.add_option('--with-c++11', action='store_true', default=False, dest='use_cxx11',
help='''Use C++ 11 features if available in the compiler''')
def configure(conf):
areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0)

2
AUTHORS.md

@ -1,4 +1,4 @@
ndn-cpp-dev authors
ndn-cxx authors
===================
## The primary authors are (and/or have been):

36
CHANGELOG

@ -1,36 +0,0 @@
Interim changes since NDN-CPP v0.2(2013-12-17)
Bug fixes
* http://redmine.named-data.net/issues/1056 Fix DTAG NDNProtocolDataUnit to encode as "NDN\202\000".
* http://redmine.named-data.net/issues/1064 Add ax_lib_sqlite3.m4, etc. to m4 directory so that autogen.sh works out of the box.
* http://redmine.named-data.net/issues/1077 Move the BasicIdentityStorage sqlite file to ~/.ndnx/ndnsec-identity.db .
NOTE: If you have an old file at ~/.ndn-identity/identity.db, please move it to ~/.ndnx/ndnsec-identity.db .
* http://redmine.named-data.net/issues/1088 Certificate name in KeyLocator should not include the version number.
* Fix bug in getForwardingEntryFlags: Need to check all flags, not the first flag using "else if".
Changes
* http://redmine.named-data.net/issues/1085 In Name::Component, added comparison operators.
* http://redmine.named-data.net/issues/1086 In Name::getPrefix, support a negative argument, e.g. getPrefix(-1).
* http://redmine.named-data.net/issues/1089 Renamed key.hpp to key-locator.hpp .
* MetaInfo: Added setFinalBlockID for Name::Component, remove unused setFinalBlockID which take uint8_t*, etc.
* Fix clang compiler warnings: Include headers, parentheses and cast explicitly.
* Moved class ExcludeEntry to inner class Exclude::Entry.
* In BinaryXmlDecoder, cache the result of peekDTag for a speedup when decoding optional elements.
* Moved validation-request.hpp to public API security/policy, and moved OnVerified and OnVerifyFailed in there.
Documentation
* Move instructions for running ./autogen.sh from configure.ac to the Development section of INSTALL.
* http://redmine.named-data.net/issues/1072: In Doxyfile, fix EXCLUDE for ndnboost to new location include/ndnboost .
NDN-CPP v0.2 (2013-11-08)
This release fully supports the Common Client Libraries API.
http://named-data.net/codebase/platform/documentation/ndn-ccl-api/
Changes to future versions will be detailed in this CHANGELOG.
NDN-CPP v0.1 (2013-08-09)
This is the initial release, with support for expressInterest for one interest at a time. A new release
coming soon will have a Pending Interest Table and support processing multiple simultaneous interest and
data packets.

6
ChangeLog

@ -0,0 +1,6 @@
ndn-cxx v0.1 (2014-04-39)
Initial release of the ndn-cxx library.
The current set of features include:
* <to be listed>

26
INSTALL.md

@ -1,10 +1,10 @@
ndn-cpp-dev: A dev version of Named Data Networking client library for C++
ndn-cxx: NDN C++ library with eXperimental eXtensions
===========================================================================
Supported platforms
-------------------
ndn-cpp-dev is tested on the following platforms:
ndn-cxx uses continuous integration testing and has been tested on the following platforms:
* Ubuntu 12.04 (64 bit and 32 bit)
* Ubuntu 13.10 (64 bit and 32 bit)
@ -15,9 +15,6 @@ ndn-cpp-dev is tested on the following platforms:
Prerequisites
-------------
(These are prerequisites to build ndn-cpp-dev. To do development of ndn-cpp-dev code and update the build system,
see Development Prerequisites.)
### Required:
* `python` >= 2.6
@ -52,7 +49,7 @@ Following are the detailed steps for each platform to install the prerequisites.
# For Ubuntu 13.10
sudo apt-get install libboost-all-dev
### Optional Dependencies:
### Optional:
To build tutorials, manpages, and API documentation the following
dependencies need to be installed:
@ -76,10 +73,10 @@ The following lists steps for common platforms to install these prerequisites:
Build
-----
(These are instructions to build ndn-cpp-dev. To do development of ndn-cpp-dev
(These are instructions to build ndn-cxx. To do development of ndn-cxx
code and update the build system, see Development.)
To build in a terminal, change directory to the ndn-cpp-dev root. Enter:
To build in a terminal, change directory to the ndn-cxx root. Enter:
./waf configure
./waf
@ -87,11 +84,11 @@ To build in a terminal, change directory to the ndn-cpp-dev root. Enter:
This builds and installs the following items:
* `<LIBPATH>/libndn-cpp-dev.a`: static NDN C++ library
* `<LIBPATH>/pkgconfig/libndn-cpp-dev.pc`: pkgconfig file storing all neccessary flags
* `<LIBPATH>/libndn-cxx.a`: static NDN C++ library
* `<LIBPATH>/pkgconfig/libndn-cxx.pc`: pkgconfig file storing all neccessary flags
to build against the library. For example, if pkgconfig or pkgconf package is
installed and `PKG_CONFIG_PATH` is configured properly (or `<LIBPATH>/pkgconfig` is a
default path), `pkgconfig --libs --clflags libndn-cpp-dev` will return all necessary
default path), `pkgconfig --libs --clflags libndn-cxx` will return all necessary
compile and link flags for the library.
* `<BINPATH>/tlvdump`: a simple tool to dump contents of TLV-formatted data
* `<BINPATH>/ndncatchunks3`: a simplified equivalent to ndncatchunks2 in NDNx package
@ -107,7 +104,7 @@ also produce:
Documentation
-------------
ndn-cpp-dev tutorials and API documentation can be built using the following commands:
ndn-cxx tutorials and API documentation can be built using the following commands:
# Full set of documentation (tutorials + API) in build/docs
./waf docs
@ -139,8 +136,9 @@ The following is the suggested configure commands for development build.
./waf
sudo ./waf install
In the development build all compiler optimizations are disabled by default and all warnings are treated as error.
The default behavior can be overridden by setting CXXFLAGS environment variable before running `./waf configure`:
In the development build all compiler optimizations are disabled by default and all
warnings are treated as error. The default behavior can be overridden by setting `CXXFLAGS`
environment variable before running `./waf configure`:
CXXFLAGS="-O1 -g3" ./waf configure --debug --with-tests
...

38
README.md

@ -1,18 +1,34 @@
ndn-cpp-dev: A dev version of Named Data Networking client library for C++
---------------------------------------------------------------------------
ndn-cxx: NDN C++ library with eXperimental eXtensions
=====================================================
ndn-cpp-dev is a new implementation of a Named Data Networking client library written in C++.
ndn-cxx is a C++ library, implementing Named Data Networking (NDN) primitives that can be
used to implement various NDN applications. The library is currently being used as part
of the following projects:
ndn-cpp-dev is open source under a license described in the file COPYING. While the license
does not require it, we really would appreciate it if others would share their
contributions to the library if they are willing to do so under the same license.
* [NFD - NDN Forwarding Daemon](https://github.com/named-data/NFD)
* [NLSR - Named-data Link-State Routing protocol](https://github.com/named-data/NLSR)
* [repo-ng - Next generation of NDN repository](https://github.com/named-data/repo-ng)
* [ChronoChat - Multi-user NDN chat application](https://github.com/named-data/ChronoChat)
* [ChronoSync - Sync library for multiuser realtime applications for NDN](https://github.com/named-data/ChronoSync)
* [ndn-tlv-ping - Ping Application For NDN](https://github.com/named-data/ndn-tlv-ping)
* [ndn-traffic - Traffic Generator For NDN](https://github.com/named-data/ndn-traffic)
See the file INSTALL for build and install instructions.
See the file INSTALL.md for build and install instructions.
Please submit any bugs or issues to the ndn-cpp-dev issue tracker:
http://redmine.named-data.net/projects/ndn-cpp-dev/issues
Please submit any bugs or issues to the ndn-cxx issue tracker:
http://redmine.named-data.net/projects/ndn-cxx/issues
## More
## More documentation
Additional library tutorials and manpages are available in `docs/` folder.
Extensive documentation of the library is available on the library's homepage:
http://www.named-data.net/doc/ndn-cxx/
## License
ndn-cxx is an open source project licensed under BSD license. For more information about
the license, refer to [`COPYING`](https://github.com/named-data/ndn-cxx/blob/master/COPYING).
While the license does not require it, we really would appreciate it if others would share
their contributions to the library if they are willing to do so under the same license.

4
docs/code-style.rst

@ -1,5 +1,5 @@
Code style and coding guidelines
================================
ndn-cxx Code Style and Coding Guidelines
========================================
Based on

10
docs/conf.py

@ -45,7 +45,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'C++ library for Named Data Networking'
project = u'NDN C++ library with eXperimental eXtensions'
copyright = u'2014, Named Data Networking Project'
# The version info for the project you're documenting, acts as replacement for
@ -53,9 +53,9 @@ copyright = u'2014, Named Data Networking Project'
# built documents.
#
# The short X.Y version.
version = '0.4.0'
version = '0.1.0'
# The full version, including alpha/beta/rc tags.
release = '0.4.0'
release = '0.1.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -179,7 +179,7 @@ html_static_path = ['_static']
html_file_suffix = ".html"
# Output file base name for HTML help builder.
htmlhelp_basename = 'ndn-cpp-dev-docs'
htmlhelp_basename = 'ndn-cxx-docs'
# -- Options for LaTeX output ---------------------------------------------
@ -199,7 +199,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'ndn-cpp-dev-docs.tex', u'C++ library for Named Data Networking',
('index', 'ndn-cxx-docs.tex', u'NDN C++ library with eXperimental eXtensions',
u'Named Data Networking Project', 'manual'),
]

4
docs/doxygen.conf

@ -32,13 +32,13 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = "C++ library for Named Data Networking"
PROJECT_NAME = "NDN C++ library with eXperimental eXtensions"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER =
PROJECT_NUMBER = 0.1.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

4
docs/index.rst

@ -1,5 +1,5 @@
C++ library for Named Data Networking
=====================================
NDN C++ library with eXperimental eXtensions
============================================
`API documentation (doxygen) <doxygen/annotated.html>`_

6
examples/consumer-with-timer.cpp

@ -5,9 +5,9 @@
* BSD License, see COPYING for copyright and distribution information.
*/
// correct way to include NDN-CPP headers
// #include <ndn-cpp-dev/face.hpp>
// #include <ndn-cpp-dev/util/scheduler.hpp>
// correct way to include ndn-cxx headers
// #include <ndn-cxx/face.hpp>
// #include <ndn-cxx/util/scheduler.hpp>
#include "face.hpp"
#include "util/scheduler.hpp"

4
examples/consumer.cpp

@ -5,8 +5,8 @@
* BSD License, see COPYING for copyright and distribution information.
*/
// correct way to include NDN-CPP headers
// #include <ndn-cpp-dev/face.hpp>
// correct way to include ndn-cxx headers
// #include <ndn-cxx/face.hpp>
#include "face.hpp"
// Enclosing code in ndn simplifies coding (can also use `using namespace ndn`)

6
examples/producer.cpp

@ -5,9 +5,9 @@
* BSD License, see COPYING for copyright and distribution information.
*/
// correct way to include NDN-CPP headers
// #include <ndn-cpp-dev/face.hpp>
// #include <ndn-cpp-dev/security/key-chain.hpp>
// correct way to include ndn-cxx headers
// #include <ndn-cxx/face.hpp>
// #include <ndn-cxx/security/key-chain.hpp>
#include "face.hpp"
#include "security/key-chain.hpp"

4
examples/wscript

@ -7,6 +7,6 @@ def build(bld):
bld(features=['cxx', 'cxxprogram'],
target = '%s' % (str(app.change_ext('','.cpp'))),
source = app,
use = 'ndn-cpp-dev',
use = 'ndn-cxx',
install_path = None,
)
)

10
libndn-cpp-dev.pc.in

@ -1,10 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: libndn-cpp-dev
Description: Development version of C++ API for NDN (NDN-TLV packet format)
Version: @VERSION@
Libs: -L${libdir} @EXTRA_LINKFLAGS@ @EXTRA_LDFLAGS@ -lndn-cpp-dev @EXTRA_LIBS@ @EXTRA_FRAMEWORKS@
Cflags: -I${includedir} @EXTRA_CXXFLAGS@ @EXTRA_INCLUDES@

10
libndn-cxx.pc.in

@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: libndn-cxx
Description: NDN C++ library with eXperimental eXtensions
Version: @VERSION@
Libs: -L${libdir} @EXTRA_LINKFLAGS@ @EXTRA_LDFLAGS@ -lndn-cxx @EXTRA_LIBS@ @EXTRA_FRAMEWORKS@
Cflags: -I${includedir} @EXTRA_CXXFLAGS@ @EXTRA_INCLUDES@

13
src/common.hpp

@ -1,14 +1,13 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
* Copyright (C) 2013 Regents of the University of California.
* @author: Jeff Thompson <jefft0@remap.ucla.edu>
* Copyright (C) 2013-2014 Regents of the University of California.
* See COPYING for copyright and distribution information.
*/
#ifndef NDN_COMMON_HPP
#define NDN_COMMON_HPP
#include "ndn-cpp-config.hpp"
#include "ndn-cxx-config.hpp"
#include <stdint.h>
// TODO: Is stddef.h portable?
#include <stddef.h>
@ -45,16 +44,16 @@
#define DEPRECATED(func) func
#endif
#ifdef NDN_CPP_HAVE_CXX11
#ifdef NDN_CXX_HAVE_CXX11
#if defined(__GNUC__)
# if !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
# error "NDN-CPP-DEV library is configured and compiled in C++11 mode, but the current compiler is not C++11 enabled"
# error "NDN-CXX library is configured and compiled in C++11 mode, but the current compiler is not C++11 enabled"
# endif // !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
#endif // defined(__GNUC__)
#if defined(__clang__) && __cplusplus < 201103L
# error "NDN-CPP-DEV library is configured and compiled in C++11 mode, but the current compiler is not C++11 enabled"
# error "NDN-CXX library is configured and compiled in C++11 mode, but the current compiler is not C++11 enabled"
#endif // defined(__clang__) && (__cplusplus < 201103L)
@ -111,7 +110,7 @@ using boost::bind;
} // namespace ndn
#endif // NDN_CPP_HAVE_CXX11
#endif // NDN_CXX_HAVE_CXX11
namespace ndn {

8
src/security/key-chain.hpp

@ -25,7 +25,7 @@
#include "sec-tpm-file.hpp"
#include "sec-tpm-memory.hpp"
#ifdef NDN_CPP_HAVE_OSX_SECURITY
#ifdef NDN_CXX_HAVE_OSX_SECURITY
#include "sec-tpm-osx.hpp"
#endif
@ -662,7 +662,7 @@ private:
#if defined(NDN_CPP_HAVE_OSX_SECURITY) and defined(NDN_CPP_WITH_OSX_KEYCHAIN)
#if defined(NDN_CXX_HAVE_OSX_SECURITY) and defined(NDN_CXX_WITH_OSX_KEYCHAIN)
namespace ndn {
@ -678,6 +678,6 @@ typedef KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> KeyChain;
} // namespace ndn
#endif //NDN_CPP_HAVE_OSX_SECURITY
#endif // NDN_CXX_HAVE_OSX_SECURITY
#endif //NDN_SECURITY_KEY_CHAIN_HPP
#endif // NDN_SECURITY_KEY_CHAIN_HPP

4
src/security/sec-public-info-sqlite3.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/**
* Copyright (C) 2013 Regents of the University of California.
* Copyright (c) 2013-2014 Regents of the University of California.
* @author: Yingdi Yu <yingdi@cs.ucla.edu>
* @author: Jeff Thompson <jefft0@remap.ucla.edu>
* See COPYING for copyright and distribution information.
@ -92,7 +92,7 @@ SecPublicInfoSqlite3::SecPublicInfoSqlite3()
/// @todo Add define for windows/unix in wscript. The following may completely fail on windows
int res = sqlite3_open_v2((identityDir / "ndnsec-public-info.db").c_str(), &m_database,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
#ifdef NDN_CPP_DISABLE_SQLITE3_FS_LOCKING
#ifdef NDN_CXX_DISABLE_SQLITE3_FS_LOCKING
"unix-dotfile"
#else
0

6
src/util/config-file.cpp

@ -45,15 +45,15 @@ ConfigFile::findConfigFile()
}
}
#ifdef NDN_CPP_SYSCONFDIR
path sysconfdir(NDN_CPP_SYSCONFDIR);
#ifdef NDN_CXX_SYSCONFDIR
path sysconfdir(NDN_CXX_SYSCONFDIR);
sysconfdir /= "ndn/client.conf";
if (exists(sysconfdir))
{
return absolute(sysconfdir);
}
#endif // NDN_CPP_SYSCONFDIR
#endif // NDN_CXX_SYSCONFDIR
path etc("/etc/ndn/client.conf");
if (exists(etc))

4
src/util/logging.cpp

@ -10,7 +10,7 @@
#include "logging.hpp"
#ifdef NDN_CPP_HAVE_LOG4CXX
#ifdef NDN_CXX_HAVE_LOG4CXX
#include <log4cxx/logger.h>
#include <log4cxx/basicconfigurator.h>
@ -46,4 +46,4 @@ INIT_LOGGERS()
configured = true;
}
#endif
#endif // NDN_CXX_HAVE_LOG4CXX

8
src/util/logging.hpp

@ -11,7 +11,7 @@
#include "../common.hpp"
#ifdef NDN_CPP_HAVE_LOG4CXX
#ifdef NDN_CXX_HAVE_LOG4CXX
#include <log4cxx/logger.h>
@ -48,7 +48,7 @@
void
INIT_LOGGERS()
#else // else NDN_CPP_HAVE_LOG4CXX
#else // else NDN_CXX_HAVE_LOG4CXX
#define INIT_LOGGER(name) struct LOGGING_DISABLED
#define _LOG_FUNCTION(x)
@ -67,12 +67,12 @@ INIT_LOGGERS()
#include <iostream>
#define _LOG_DEBUG(x) \
{ std::clog << s.substr(0, s.size() - 1) << " " << x << std::endl; }
{ std::clog << x << std::endl; }
#else
#define _LOG_DEBUG(x)
#endif
#endif // NDN_CPP_HAVE_LOG4CXX
#endif // NDN_CXX_HAVE_LOG4CXX
#endif

2
tests-integrated/wscript

@ -10,7 +10,7 @@ def build(bld):
features="cxx cxxprogram",
source=bld.path.ant_glob(['**/*.cpp'],
excl=['**/*-osx.cpp', '**/*-sqlite3.cpp']),
use='ndn-cpp-dev',
use='ndn-cxx',
includes='.',
install_path=None,
)

2
tests/security/identity-fixture.cpp

@ -28,7 +28,7 @@ public:
m_hasOldDefaultIdentity = false;
}
m_newIdentity.set("/ndn-cpp-dev-test-identity");
m_newIdentity.set("/ndn-cxx-test-identity");
m_newIdentity.appendVersion();
// create the new identity and self-signed certificate

2
tests/wscript

@ -10,7 +10,7 @@ def build(bld):
features="cxx cxxprogram",
source=bld.path.ant_glob(['**/*.cpp'],
excl=['**/*-osx.cpp', '**/*-sqlite3.cpp']),
use='ndn-cpp-dev',
use='ndn-cxx',
includes='.',
install_path=None,
)

7
tools/wscript

@ -10,12 +10,13 @@ def build(bld):
bld(features=['cxx', 'cxxprogram'],
target = '%s' % (str(app.change_ext('','.cpp'))),
source = app,
use = 'ndn-cpp-dev',
)
use = 'ndn-cxx',
)
bld (features = "subst",
source = bld.path.ant_glob(['wrapper/*.sh']),
target = ['%s' % node.change_ext('', '.sh') for node in bld.path.ant_glob(['wrapper/*.sh'])],
target = ['%s' % node.change_ext('', '.sh')
for node in bld.path.ant_glob(['wrapper/*.sh'])],
install_path = "${BINDIR}",
chmod = 0755,
)

40
wscript

@ -1,9 +1,9 @@
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
VERSION = '0.4.0'
APPNAME = "ndn-cpp-dev"
PACKAGE_BUGREPORT = "http://redmine.named-data.net/projects/ndn-cpp-dev"
PACKAGE_URL = "https://github.com/named-data/ndn-cpp-dev"
VERSION = '0.1.0'
APPNAME = "ndn-cxx"
PACKAGE_BUGREPORT = "http://redmine.named-data.net/projects/ndn-cxx"
PACKAGE_URL = "https://github.com/named-data/ndn-cxx"
from waflib import Logs, Utils
@ -21,8 +21,6 @@ def options(opt):
opt.add_option('--with-log4cxx', action='store_true', default=False, dest='log4cxx',
help='''Compile with log4cxx logging support''')
opt.add_option('--with-c++11', action='store_true', default=False, dest='use_cxx11',
help='''Use C++11 features, even if available in the compiler''')
opt.add_option('--without-tools', action='store_false', default=True, dest='with_tools',
help='''Do not build tools''')
@ -98,14 +96,14 @@ def configure(conf):
conf.define('SYSCONFDIR', conf.env['SYSCONFDIR'])
conf.write_config_header('src/ndn-cpp-config.hpp', define_prefix='NDN_CPP_')
conf.write_config_header('src/ndn-cxx-config.hpp', define_prefix='NDN_CXX_')
def build(bld):
libndn_cpp = bld(
libndn_cxx = bld(
features=['cxx', 'cxxstlib'], # 'cxxshlib',
# vnum="0.3.0",
target="ndn-cpp-dev",
name="ndn-cpp-dev",
target="ndn-cxx",
name="ndn-cxx",
source=bld.path.ant_glob('src/**/*.cpp',
excl=['src/**/*-osx.cpp', 'src/**/*-sqlite3.cpp']),
use='BOOST OPENSSL LOG4CXX CRYPTOPP SQLITE3 RT PIC PTHREAD',
@ -115,15 +113,15 @@ def build(bld):
)
if bld.env['WITH_PCH']:
libndn_cpp.pch="src/common.hpp"
libndn_cxx.pch="src/common.hpp"
if bld.env['HAVE_OSX_SECURITY']:
libndn_cpp.source += bld.path.ant_glob('src/**/*-osx.cpp')
libndn_cpp.mac_app = True
libndn_cpp.use += " OSX_COREFOUNDATION OSX_SECURITY"
libndn_cxx.source += bld.path.ant_glob('src/**/*-osx.cpp')
libndn_cxx.mac_app = True
libndn_cxx.use += " OSX_COREFOUNDATION OSX_SECURITY"
# In case we want to make it optional later
libndn_cpp.source += bld.path.ant_glob('src/**/*-sqlite3.cpp')
libndn_cxx.source += bld.path.ant_glob('src/**/*-sqlite3.cpp')
# Prepare flags that should go to pkgconfig file
pkgconfig_libs = []
@ -131,7 +129,7 @@ def build(bld):
pkgconfig_linkflags = []
pkgconfig_includes = []
pkgconfig_cxxflags = []
for lib in Utils.to_list(libndn_cpp.use):
for lib in Utils.to_list(libndn_cxx.use):
if bld.env['LIB_%s' % lib]:
pkgconfig_libs += Utils.to_list(bld.env['LIB_%s' % lib])
if bld.env['LIBPATH_%s' % lib]:
@ -152,8 +150,8 @@ def build(bld):
return [set.setdefault(e,e) for e in alist if e not in set]
pkconfig = bld(features="subst",
source="libndn-cpp-dev.pc.in",
target="libndn-cpp-dev.pc",
source="libndn-cxx.pc.in",
target="libndn-cxx.pc",
install_path="${LIBDIR}/pkgconfig",
VERSION=VERSION,
@ -178,11 +176,11 @@ def build(bld):
bld.recurse("examples")
headers = bld.path.ant_glob(['src/**/*.hpp'])
bld.install_files("%s/ndn-cpp-dev" % bld.env['INCLUDEDIR'], headers,
bld.install_files("%s/ndn-cxx" % bld.env['INCLUDEDIR'], headers,
relative_trick=True, cwd=bld.path.find_node('src'))
bld.install_files("%s/ndn-cpp-dev" % bld.env['INCLUDEDIR'],
bld.path.find_resource('src/ndn-cpp-config.hpp'))
bld.install_files("%s/ndn-cxx" % bld.env['INCLUDEDIR'],
bld.path.find_resource('src/ndn-cxx-config.hpp'))
bld.install_files("${SYSCONFDIR}/ndn", "client.conf.sample")

Loading…
Cancel
Save