Skip to content
Permalink
7c65d5344b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
37 lines (28 sloc) 1.25 KB
cmake_minimum_required(VERSION 3.0)
set(CMAKE_CXX_STANDARD 14)
project(terminal_game_example CXX)
# turns out that g++ will allow variable length arrays but I
# dont' want students getting dependant on non-standard features
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wvla -Werror=vla")
# limit number of errors shown to 1
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wfatal-errors")
# location of source code files
include_directories(${CMAKE_SOURCE_DIR}/include)
# tell cmake where to put the executables that it creates
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin )
# where to put the object files it creates
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/lib)
add_library( drawable src/drawable.cpp )
add_library( entity src/entity.cpp )
add_library( keyboard src/keyboard.cpp )
add_library( position src/position.cpp )
add_library( textbox src/textbox.cpp )
add_library( terminal src/terminal.cpp )
add_library( tilecolor src/tilecolor.cpp )
add_library( tile src/tile.cpp )
add_library( view src/view.cpp )
add_library( world src/world.cpp )
add_executable( main main.cpp )
target_link_libraries( main world view tile entity terminal textbox position keyboard )