Rename 'src' directory to 'ndn-cxx'
Change-Id: I14394023680901a86977313ca87fb017333614dd
Refs: #3084
diff --git a/examples/consumer-with-timer.cpp b/examples/consumer-with-timer.cpp
index 76f9853..b095d4c 100644
--- a/examples/consumer-with-timer.cpp
+++ b/examples/consumer-with-timer.cpp
@@ -21,11 +21,8 @@
* @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
*/
-// 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"
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
#include <boost/asio/io_service.hpp>
#include <iostream>
diff --git a/examples/consumer.cpp b/examples/consumer.cpp
index c302073..f06ac07 100644
--- a/examples/consumer.cpp
+++ b/examples/consumer.cpp
@@ -21,9 +21,7 @@
* @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
*/
-// correct way to include ndn-cxx headers
-// #include <ndn-cxx/face.hpp>
-#include "face.hpp"
+#include <ndn-cxx/face.hpp>
#include <iostream>
diff --git a/examples/producer.cpp b/examples/producer.cpp
index 656ed12..4544ec0 100644
--- a/examples/producer.cpp
+++ b/examples/producer.cpp
@@ -21,11 +21,8 @@
* @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
*/
-// 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"
+#include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
#include <iostream>
diff --git a/examples/wscript b/examples/wscript
index 52de33f..1073033 100644
--- a/examples/wscript
+++ b/examples/wscript
@@ -3,22 +3,21 @@
top = '..'
def build(bld):
- # List all .cpp files (whole example should be in one .cpp)
- for i in bld.path.ant_glob(['*.cpp']):
- name = str(i)[:-len(".cpp")]
- bld(features=['cxx', 'cxxprogram'],
- target=name,
- source=[i] + bld.path.ant_glob(['%s/**/*.cpp' % name]),
- use='ndn-cxx',
- install_path=None
- )
+ # List all .cpp files (whole example in one .cpp)
+ for ex in bld.path.ant_glob('*.cpp'):
+ name = ex.change_ext('').path_from(bld.path.get_bld())
+ bld.program(name='example-%s' % name,
+ target=name,
+ source=[ex],
+ use='ndn-cxx',
+ install_path=None)
- # List all directories files (example can has multiple .cpp in the directory)
- for name in bld.path.ant_glob(['*'], dir=True, src=False):
- bld(features=['cxx', 'cxxprogram'],
- target="%s/%s" % (name, name),
- source=bld.path.ant_glob(['%s/**/*.cpp' % name]),
- use='ndn-cxx',
- install_path=None,
- includes='%s' % name,
- )
+ # List all directories (example can have multiple .cpp in the directory)
+ for subdir in bld.path.ant_glob('*', dir=True, src=False):
+ name = subdir.path_from(bld.path)
+ bld.program(name='example-%s' % name,
+ target=name,
+ source=subdir.ant_glob('**/*.cpp'),
+ use='ndn-cxx',
+ includes=name,
+ install_path=None)