########################################################################
# SGA - A C++ library to help develop Simple Genetic Algorithms        #
# Copyright (C) 2005 Dorival M. Pedroso                                #
#                                                                      #
# This program 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    #
# any later version.                                                   #
#                                                                      #
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>  #
########################################################################

INCLUDE(${SGA_SOURCE_DIR}/Modules/FindSFMT.cmake)
INCLUDE(${SGA_SOURCE_DIR}/Modules/FindDSFMT.cmake)

IF(SFMT_FOUND)
	INCLUDE_DIRECTORIES   (${SFMT_INCLUDE_DIRS})
	ADD_LIBRARY           (sfmt  sfmt.c)
	SET_TARGET_PROPERTIES (sfmt  PROPERTIES COMPILE_FLAGS "-DMEXP=19937 -std=c99")
ENDIF(SFMT_FOUND)

IF(DSFMT_FOUND)
	INCLUDE_DIRECTORIES   (${DSFMT_INCLUDE_DIRS})
	ADD_LIBRARY           (dsfmt dsfmt.c)
	SET_TARGET_PROPERTIES (dsfmt PROPERTIES COMPILE_FLAGS "-DSFMT_MEXP=19937 -std=c99")
ENDIF(DSFMT_FOUND)

ADD_LIBRARY           (triangle  triangle.c)
SET_TARGET_PROPERTIES (triangle  PROPERTIES COMPILE_FLAGS "-O3 -DTRILIBRARY")
