# This file is part of EPOCH.
# File: CMakeLists.txt
# Author: Florent Teichteil-Königsbuch
# Contact: florent.teichteil@onera.fr
#
#    EPOCH is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    EPOCH 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 General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with EPOCH.  If not, see <http://www.gnu.org/licenses/>.

#FIND_PACKAGE(LibXML++ REQUIRED)
#set(LIBS ${LIBS} ${LibXML++_LIBRARIES})


BISON_TARGET (AltaricaParser altarica.yy ${CMAKE_CURRENT_BINARY_DIR}/altarica_parser.cc)
FLEX_TARGET (AltaricaScanner altarica.l  ${CMAKE_CURRENT_BINARY_DIR}/altarica_lexer.cc COMPILE_FLAGS --header-file=${CMAKE_CURRENT_BINARY_DIR}/altarica_lexer.h)
ADD_FLEX_BISON_DEPENDENCY (AltaricaScanner AltaricaParser)

INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
#  ${LibXML++_INCLUDE_DIRS}
)
ADD_LIBRARY (epoch-altarica SHARED
				${BISON_AltaricaParser_OUTPUTS}
				${FLEX_AltaricaScanner_OUTPUTS}	
				AltaricaGenerator.cc
				AltaricaState.cc
				AltaricaModel.cc
				AltaricaInitInfo.cc
				AltaricaException.cc
#				AltaricaInitInfoXML.cc
				AltaricaInitInfoXML2.cc
				AltaricaJson.cc
				AltaricaInteractive.cc
				MetaEvent.cc
				domains/RangeDomain.cc
				domains/Domain.cc
				domains/EnumDomain.cc
				domains/PredefinedDomain.cc
				domains/StructuredDomain.cc
				domains/ArrayDomain.cc
				domains/RealDomain.cc
				Parameter.cc
				Variable.cc
				Event.cc
				Assignment.cc
				EventLaw.cc
				Constant.cc
				MemberAccess.cc
				Transition.cc
				Synchronisation.cc
				Assertion.cc
				Node.cc
				values/Value.cc
				values/ValueBool.cc
				values/ValueInt.cc
				values/ValueSymbol.cc
				values/ValueReal.cc
				LandmarkState.cc
				LandmarkMetaEvent.cc
				LandmarkDriver.cc
				expressions/Expression.cc
				expressions/ExpressionADD.cc
				expressions/ExpressionAND.cc
				expressions/ExpressionARITH.cc
				expressions/ExpressionBOOLCONSTANT.cc
				expressions/ExpressionCONSTARRAY.cc
				expressions/ExpressionCONSTSTRUCT.cc
				expressions/ExpressionFUNCTIONCALL.cc
				expressions/ExpressionLOG.cc
				expressions/ExpressionMINMAX.cc
				expressions/ExpressionMUL.cc
				expressions/ExpressionOR.cc
				expressions/ExpressionQUANTIFIED.cc
				expressions/ExpressionUNARY.cc
				expressions/ExpressionUNSIGNEDINT.cc
				expressions/ExpressionREAL.cc
				expressions/ExpressionCARD.cc
				expressions/ExpressionCASE.cc
				expressions/ExpressionPAREN.cc
				expressions/ExpressionMEMBER.cc
				expressions/ExpressionINTERVAL.cc
				expressions/ExpressionIfThenElse.cc
				expressions/ExpressionEvaluator.cc
				expressions/ExpressionEvaluatorLandmark.cc
				expressions/ExpressionInfoVar.cc
				altarica_driver.cc
				parser_helper.cc
				FiacreTranslator.cc
				)

#TARGET_LINK_LIBRARIES (epoch-altarica  ${LibXML++_LIBRARIES})
