From 2c60e8825c56861cac639e79e5cb74108b947617 Mon Sep 17 00:00:00 2001 From: Mateja Date: Sat, 13 Feb 2021 14:20:34 +0100 Subject: Use CMake. --- .gitignore | 1 + CMakeLists.txt | 13 +++++++++++++ Makefile | 10 ---------- 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 CMakeLists.txt delete mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 3536de4..47f9dd9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ erender +build diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..ca28adf --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.13) +project(erender) + +set( CMAKE_CXX_STANDARD 17 ) + +aux_source_directory(./src/ SRC_LIST) +add_executable(${PROJECT_NAME} ${SRC_LIST}) + +add_subdirectory(external/SFML) +target_include_directories(${PROJECT_NAME} PUBLIC external/SFML/include) +target_link_directories(${PROJECT_NAME} PUBLIC external/SFML/lib) + +target_link_libraries(${PROJECT_NAME} sfml-graphics sfml-window sfml-system) diff --git a/Makefile b/Makefile deleted file mode 100644 index a1bd513..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -NAME=erender -CXXFLAGS=-g -Wall -LIBS=-lsfml-graphics -lsfml-window -lsfml-system -CXX=g++ - -build: src/* - $(CXX) $(CXXFLAGS) src/* -o $(NAME) $(LIBS) - -run: $(NAME) - ./$(NAME) -- cgit v1.2.3