1###############################################################################
2#
3# Description       : CMake build script for adding version to the python file
4# Original author(s): Frank Bergmann <fbergman@caltech.edu>
5# Organization      : California Institute of Technology
6#
7# This file is part of libSBML.  Please visit http://sbml.org for more
8# information about SBML, and the latest version of libSBML.
9#
10# Copyright (C) 2013-2018 jointly by the following organizations:
11#     1. California Institute of Technology, Pasadena, CA, USA
12#     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
13#     3. University of Heidelberg, Heidelberg, Germany
14#
15# Copyright (C) 2009-2013 jointly by the following organizations:
16#     1. California Institute of Technology, Pasadena, CA, USA
17#     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
18#
19# Copyright (C) 2006-2008 by the California Institute of Technology,
20#     Pasadena, CA, USA
21#
22# Copyright (C) 2002-2005 jointly by the following organizations:
23#     1. California Institute of Technology, Pasadena, CA, USA
24#     2. Japan Science and Technology Agency, Japan
25#
26# This library is free software; you can redistribute it and/or modify it
27# under the terms of the GNU Lesser General Public License as published by
28# the Free Software Foundation.  A copy of the license agreement is provided
29# in the file named "LICENSE.txt" included with this software distribution
30# and also available online as http://sbml.org/software/libsbml/license.html
31#
32###############################################################################
33
34message("Python: Add Version to generated file")
35
36if(NOT EXISTS ${CUR_BIN_DIRECTORY}/libsbml.py)
37  message(FATAL_ERROR "  The SWIG wrapper has not yet been created")
38else()
39  file(APPEND ${CUR_BIN_DIRECTORY}/libsbml.py "
40global __version__
41__version__ = '${VERSION}'
42")
43endif()
44