#                                               -*- cmake -*-
#
#  CMakeLists.txt
#
#  (C) Copyright 2005-2012 EDF-EADS-Phimeca
#
#  This library is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Lesser General Public
#  License as published by the Free Software Foundation; either
#  version 2.1 of the License.
#
#  This library is distributed in the hope that it will be useful
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with this library; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#
#  @author: $LastChangedBy: dutka $
#  @date:   $LastChangedDate: 2010-02-04 16:44:49 +0100 (Thu, 04 Feb 2010) $
#  Id:      $Id: Makefile.am 1473 2010-02-04 15:44:49Z dutka $
#

include ( FortranCInterface )
FortranCInterface_HEADER ( FortranCInterface.h )

ot_add_current_dir_to_include_dirs ()
ot_add_build_dir_to_include_dirs ( ${CMAKE_CURRENT_BINARY_DIR} )

configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/OTconfig.h.cmake.in
                 ${CMAKE_CURRENT_BINARY_DIR}/OTconfig.h
		 @ONLY
               )

configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/OTconfigure_args.hxx.in
                 ${CMAKE_CURRENT_BINARY_DIR}/OTconfigureArgs.hxx
		 @ONLY
               )

install ( FILES OTconfig.hxx
                OTdebug.h
		OTmemory.hxx
		OTprivate.hxx
		OTtestcode.hxx
		OTthread.hxx
		OTtypes.hxx
		${CMAKE_CURRENT_BINARY_DIR}/OTconfig.h
          DESTINATION ${OPENTURNS_INCLUDE_PATH}
	  PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
        )


#get_cmake_property ( VARS VARIABLES )
#foreach ( var ${VARS} )
#  file( APPEND ${CMAKE_CURRENT_BINARY_DIR}/VARS.txt
#        "${var} \"${${var}}\"\n" )
#endforeach ( var )
