# NAME/CMakeLists.txt
# Created by Robin Rowe 2019-10-01
# License: Public domain

cmake_minimum_required(VERSION 3.8)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

project(AtlastForth)
message("-- Project ${PROJECT_NAME}")
enable_testing()
set(SOURCES
	atlast.h  
	atldef.h  
	atlast.cpp  
)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -DANSIFLOAT -DREADONLYSTRINGS)
add_library(${PROJECT_NAME}_lib ${SOURCES})
link_libraries(${PROJECT_NAME}_lib)
if(NOT WIN32 AND NOT APPLE)
	link_libraries(rt pthread)
endif(NOT WIN32 AND NOT APPLE)
set(LIBUNISTD_PATH /code/github/libunistd)
if(WIN32)
	include_directories(${LIBUNISTD_PATH}/unistd)
	link_directories(${LIBUNISTD_PATH}/build/unistd/Release)
#	link_libraries(libunistd)
endif()
add_executable(forth atforth.cpp)
add_executable(primdeftest primdeftest.cpp)
