# 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})
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LibXML++_INCLUDE_DIRS} ${UMFPACK_INCLUDES})

SET (EPOCH_CONSOLE_LIBRARIES)
LIST (APPEND EPOCH_CONSOLE_LIBRARIES
		epoch-altarica
		${Boost_PROGRAM_OPTIONS_LIBRARY}
		${Boost_FILESYSTEM_LIBRARY}
		${Boost_DATE_TIME_LIBRARY}
        	${Boost_SYSTEM_LIBRARY}
		${LAPACK_LIBRARIES}
)

	
SET (IAEPOCH_LIBRARIES)
LIST (APPEND IAEPOCH_LIBRARIES
  epoch-altarica
#  epoch-solvers
  ${Boost_SYSTEM_LIBRARY}
  ${Boost_PROGRAM_OPTIONS_LIBRARY}
  ${UMFPACK_LIBRARIES})

ADD_EXECUTABLE (epochnogui
				epochmain.cc
				ParsingDriverConsoleReporter.cc
				epochconsolealtarica.cc
)
TARGET_LINK_LIBRARIES (epochnogui ${EPOCH_CONSOLE_LIBRARIES})

ADD_EXECUTABLE (iaepoch 
				iaepochmain.cc
				ParsingDriverConsoleReporter.cc)
TARGET_LINK_LIBRARIES (iaepoch ${IAEPOCH_LIBRARIES} # epoch-prism
  ${Boost_TIMER_LIBRARY}
  ${Boost_CHRONO_LIBRARY} 		
  ${Boost_FILESYSTEM_LIBRARY})

ExternalProject_Get_Property(buddy-2.4 install_dir)
INCLUDE_DIRECTORIES(${install_dir}/include)

#SET (SYMEPOCH_LIBRARIES)
#LIST (APPEND SYMEPOCH_LIBRARIES
#  epoch-altarica
#  epoch-symbolic
#  ${Boost_SYSTEM_LIBRARY}
#  ${Boost_PROGRAM_OPTIONS_LIBRARY})

#ADD_EXECUTABLE (symepoch
#  symepochmain.cc
#  ParsingDriverConsoleReporter.cc)
#TARGET_LINK_LIBRARIES (symepoch ${SYMEPOCH_LIBRARIES})
