source: trunk/bindings/cpp/SConscript @ 1822

Revision 1107, 2.3 KB checked in by Freddie Akeroyd, 4 years ago (diff)

Add DLL_EXPORT for scons c++ on Windows. Refs #112.

  • Property svn:keywords set to HeadURL LastChangedBy LastChangedRevision LastChangedDate
Line 
1#====================================================================
2#  NeXus - Neutron & X-ray Common Data Format
3
4#  $Id: Makefile.am 961 2007-09-04 12:31:49Z Freddie Akeroyd $
5#
6#  Top level scons file for coordinating NeXus build
7
8#  Copyright (C) 2008 Freddie Akeroyd
9
10#  This library is free software; you can redistribute it and/or
11#  modify it under the terms of the GNU Lesser General Public
12#  License as published by the Free Software Foundation; either
13#  version 2 of the License, or (at your option) any later version.
14#
15#  This library is distributed in the hope that it will be useful,
16#  but WITHOUT ANY WARRANTY; without even the implied warranty of
17#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18#  Lesser General Public License for more details.
19#
20#  You should have received a copy of the GNU Lesser General Public
21#  License along with this library; if not, write to the Free
22#  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23#  MA  02111-1307  USA
24#             
25#  For further information, see <http://www.nexusformat.org/>
26#
27######################## Subversion Reposity details ########################
28# Repository Location     $HeadURL$
29# Revision of last commit $LastChangedRevision$
30# Date of last commit     $LastChangedDate$
31# Author of last commit   $LastChangedBy$
32############################################################################
33
34import os
35import platform
36import sys
37import shutil
38import re
39import os
40import nexus_scons_utils
41
42source_files = Split("""NeXusFile.cpp
43                        NeXusException.cpp
44                        NeXusStream.cpp""")
45
46#Import environment
47Import('env')
48myenv = env.Clone()
49myenv.Append(CPPPATH=['#include'])
50myenv.Append(CPPDEFINES=[('IN_NEXUS_CPP_LIBRARY',1)])
51myenv_static=myenv.Clone()
52myenv_dynamic=myenv.Clone()
53
54
55shared_objects = nexus_scons_utils.getSharedObjects(source_files, myenv)
56
57#BUILD CODE
58shared = myenv_dynamic.SharedLibrary('lib/NeXusCPP', source_files, LIBS=env['MYSHLIBLIST'], LIBPATH=env['MYSHLIBDIRLIST'], PDB='lib/NeXusCPP.pdb')
59static = myenv_static.StaticLibrary('libstatic/NeXusCPP', source_files, LIBS=env['MYLIBLIST'], LIBPATH=env['MYLIBDIRLIST'], PDB='libstatic/NeXusCPP.pdb')
60retval = { 'shared': shared, 'static': static, 'sharedobjs' : shared_objects, 'libs': [ 'NeXusCPP' ] }
61Return('retval')
Note: See TracBrowser for help on using the repository browser.