Naming fixes; add debug option.
authorCarl Hetherington <cth@carlh.net>
Sat, 16 Jan 2016 15:15:19 +0000 (15:15 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 3 Dec 2019 15:45:01 +0000 (16:45 +0100)
asdcplib-cth.pc.in
src/wscript
wscript

index 9a7a13e190775ac2dbc5a64df7b0324316d63556..addac7f2979d3d9b038944f2096010d50db6e292 100644 (file)
@@ -2,7 +2,7 @@ prefix=@prefix@
 libdir=@libdir@
 includedir=@includedir@
 
-Name: asdcplib-cth
+Name: libasdcp-cth
 Description: asdcplib with patches by cth@carlh.net
 Version: @version@
 Requires: openssl
index 4a49f5cfcb5868d6dbe1684a2c703d306576acd5..c60dd16e4e4b9c115bc66f79630460569cc45a57 100644 (file)
@@ -112,7 +112,7 @@ def build(bld):
                  CRC16.h
                  """
 
-    bld.install_files('${PREFIX}/include/asdcplib-cth', headers)
+    bld.install_files('${PREFIX}/include/libasdcp-cth', headers)
     if bld.env.STATIC:
         bld.install_files('${PREFIX}/lib', 'libkumu-cth.a')
         bld.install_files('${PREFIX}/lib', 'libasdcp-cth.a')
diff --git a/wscript b/wscript
index 30cb06c158adbcff6f9ca7905b9c1d95bb75752c..82748f29bebf71096291f9a2d5134ead23ab7816 100644 (file)
--- a/wscript
+++ b/wscript
@@ -4,12 +4,13 @@ import sys
 import distutils.spawn
 from waflib import Logs
 
-APPNAME = 'asdcplib-cth'
+APPNAME = 'libasdcp-cth'
 VERSION = '2.5.11-cth1'
 
 def options(opt):
     opt.load('compiler_cxx')
     opt.add_option('--target-windows', action='store_true', default=False, help='set up to do a cross-compile to Windows')
+    opt.add_option('--enable-debug', action='store_true', default=False, help='build with debugging information and without optimisation')
     opt.add_option('--static', action='store_true', default=False, help='build statically')
 
 def configure(conf):
@@ -31,7 +32,10 @@ def configure(conf):
     else:
         boost_lib_suffix = ''
 
-    conf.env.append_value('CXXFLAGS', '-O2')
+    if conf.options.enable_debug:
+        conf.env.append_value('CXXFLAGS', '-g')
+    else:
+        conf.env.append_value('CXXFLAGS', '-O2')
 
     conf.check_cxx(fragment="""
                             #include <boost/version.hpp>\n
@@ -62,10 +66,10 @@ def build(bld):
     else:
         boost_lib_suffix = ''
 
-    bld(source='asdcplib-cth.pc.in',
+    bld(source='libasdcp-cth.pc.in',
         version=VERSION,
-        includedir='%s/include/asdcplib-cth' % bld.env.PREFIX,
-        libs="-L${libdir} -lasdcplib-cth -lkumu-cth -lboost_system%s" % boost_lib_suffix,
+        includedir='%s/include/libasdcp-cth' % bld.env.PREFIX,
+        libs="-L${libdir} -lasdcp-cth -lkumu-cth -lboost_system%s" % boost_lib_suffix,
         install_path='${LIBDIR}/pkgconfig')
 
     bld.recurse('src')