Lines 1-5
Link Here
|
1 |
--- SConstruct.orig 2014-12-02 06:28:17.000000000 +0300 |
1 |
--- SConstruct |
2 |
+++ SConstruct 2014-12-02 06:28:31.000000000 +0300 |
2 |
+++ SConstruct |
3 |
@@ -26,7 +26,7 @@ |
3 |
@@ -26,7 +26,7 @@ |
4 |
if platform == 'linux-gcc': |
4 |
if platform == 'linux-gcc': |
5 |
CXX = 'g++' # not quite right, but env is not yet available. |
5 |
CXX = 'g++' # not quite right, but env is not yet available. |
Lines 26-28
Link Here
|
26 |
else: |
26 |
else: |
27 |
print "UNSUPPORTED PLATFORM." |
27 |
print "UNSUPPORTED PLATFORM." |
28 |
env.Exit(1) |
28 |
env.Exit(1) |
|
|
29 |
@@ -147,6 +148,11 @@ |
30 |
env['BUILD_DIR'] = env.Dir(build_dir) |
31 |
env['ROOTBUILD_DIR'] = env.Dir(rootbuild_dir) |
32 |
env['DIST_DIR'] = DIST_DIR |
33 |
+ |
34 |
+# Set SHLIBVERSION for env.InstallVersionedLib(). We use the version number |
35 |
+# without the "-rcXX" part. |
36 |
+env['SHLIBVERSION'] = JSONCPP_VERSION.partition('-')[0] |
37 |
+ |
38 |
if 'TarGz' in env['BUILDERS']: |
39 |
class SrcDistAdder: |
40 |
def __init__( self, env ): |
41 |
@@ -164,7 +170,7 @@ |
42 |
env['SRCDIST_TARGET'] = os.path.join( DIST_DIR, 'jsoncpp-src-%s.tar.gz' % env['JSONCPP_VERSION'] ) |
43 |
|
44 |
env_testing = env.Clone( ) |
45 |
-env_testing.Append( LIBS = ['json_${LIB_NAME_SUFFIX}'] ) |
46 |
+env_testing.Append( LIBS = ['jsoncpp'] ) |
47 |
|
48 |
def buildJSONExample( env, target_sources, target_name ): |
49 |
env = env.Clone() |
50 |
@@ -187,14 +193,14 @@ |
51 |
env.AlwaysBuild( check_alias_target ) |
52 |
|
53 |
def buildLibrary( env, target_sources, target_name ): |
54 |
- static_lib = env.StaticLibrary( target=target_name + '_${LIB_NAME_SUFFIX}', |
55 |
+ static_lib = env.StaticLibrary( target=target_name, |
56 |
source=target_sources ) |
57 |
global lib_dir |
58 |
env.Install( lib_dir, static_lib ) |
59 |
if env['SHARED_LIB_ENABLED']: |
60 |
- shared_lib = env.SharedLibrary( target=target_name + '_${LIB_NAME_SUFFIX}', |
61 |
+ shared_lib = env.SharedLibrary( target=target_name, |
62 |
source=target_sources ) |
63 |
- env.Install( lib_dir, shared_lib ) |
64 |
+ env.InstallVersionedLib( lib_dir, shared_lib ) |
65 |
env['SRCDIST_ADD']( source=[target_sources] ) |
66 |
|
67 |
Export( 'env env_testing buildJSONExample buildLibrary buildJSONTests buildUnitTests' ) |