#build file for CMake, see http://www.cmake.org/
PROJECT (srun)

ADD_DEFINITIONS(-DFLOATPOINT -DFIXEDPOINT)
IF (UNIX)
  ADD_DEFINITIONS(-DLINUX)
  INCLUDE_DIRECTORIES(./linux)
  LINK_LIBRARIES(m dl) #CMake adds the "lib" prefix, so "m" becomes "libm"
ENDIF (UNIX)

# Simple run-time (example program)
SET(SRUN_SRCS srun.c amx.c amxcore.c amxcons.c)
IF (UNIX)
  SET(SRUN_SRCS ${SRUN_SRCS} ../linux/getch.c)
ENDIF (UNIX)
ADD_EXECUTABLE(srun ${SRUN_SRCS})

# Simple console debugger
SET(SDBG_SRCS sdbg.c amx.c amxcore.c amxcons.c)
IF (UNIX)
  SET(SDBG_SRCS ${SDBG_SRCS} ../linux/getch.c)
ENDIF (UNIX)
ADD_EXECUTABLE(sdbg ${SDBG_SRCS})
