Skip to content

Commit

Permalink
Updated dependencies; No More using CursesDisplay;
Browse files Browse the repository at this point in the history
  • Loading branch information
adi-g15 committed Feb 1, 2021
1 parent 51e75f7 commit 5b94b43
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 184 deletions.
8 changes: 7 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "graphMat"]
path = graphMat
url = https://github.com/AdityaGupta150/graphMat
url = https://github.com/adi-g15/graphMat
[submodule "ext\\graphMat"]
path = ext\\graphMat
url = https://github.com/adi-g15/graphMat
[submodule "ext\\glfwpp"]
path = ext\\glfwpp
url = https://github.com/janekb04/glfwpp
90 changes: 0 additions & 90 deletions .vscode/settings.json

This file was deleted.

68 changes: 0 additions & 68 deletions .vscode/tasks.json

This file was deleted.

55 changes: 33 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
cmake_minimum_required(VERSION 3.10.0)
project(World-Line-Simulator VERSION 0.271)

set(CMAKE_CXX_STANDARD 20)


#set(CMAKE_TOOLCHAIN_FILE "C:/Users/adity/libs/vcpkg/scripts/buildsystems/vcpkg.cmake")
project(WorldLineSim
DESCRIPTION "WorldLine Simulator"
LANGUAGES CXX
VERSION 0.271
)

# Set c++ standard to C+20
set(CMAKE_CXX_STANDARD 17)

if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ext/glfwpp/include")
message(FATAL_ERROR "The GLFW dependency (or it's wrapper glfwpp) are missing!! "
"You might not have cloned the repo with --recursive "
"You will need to clone the dependencies too, use \`git submodule --init --recursive\`"
)
endif()

file(GLOB SOURCES "src/Entities/*.cpp" "src/*.cpp")
# later distribute display into a library, and link to it
file(GLOB DISP_SOURCES "display/src/*.cpp")

add_library(display STATIC ${DISP_SOURCES})

add_compile_definitions(GRAPH_MAT_NO_COORD)
add_executable(simulator main.cpp ${SOURCES})
target_link_libraries(simulator PRIVATE display)

include_directories(includes)
include_directories(.)

#add_library()
include_directories(ext/graphMat/includes/)
include_directories(ext/glfwpp/include/)

set(DEBUG_MODE true)

# Edit the 3 lines, according to your build of curses (ncurse or pdcurses)
set(CURSES_INCLUDE_PATH "C:/Users/adity/libs/vcpkg/packages/pdcurses_x64-windows/include")
set(CURSES_LIBRARY "C:/Users/adity/libs/vcpkg/packages/pdcurses_x64-windows/lib")
#target_include_directories(simulator PRIVATE curses/includes)
# Edit the previous 3 lines, according to your build of curses (ncurse or pdcurses)

include_directories(${CURSES_INCLUDE_PATH})

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
find_package(Curses REQUIRED)

link_libraries(Threads::Threads)
target_link_libraries(display PUBLIC ${CURSES_LIBRARY}/pdcurses.lib)

add_subdirectory(ext/glfwpp)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE)
target_link_directories(simulator PRIVATE GLFWPP)

# set(CMAKE_TOOLCHAIN_FILE "C:/Users/adity/libs/vcpkg/scripts/buildsystems/vcpkg.cmake")
# later distribute display into a library, and link to it
# file(GLOB DISP_SOURCES "display/src/*.cpp")
# add_library(display STATIC ${DISP_SOURCES})
# Edit the 3 lines, according to your build of curses (ncurse or pdcurses)
# set(CURSES_INCLUDE_PATH "C:/Users/adity/libs/vcpkg/packages/pdcurses_x64-windows/include")
# set(CURSES_LIBRARY "C:/Users/adity/libs/vcpkg/packages/pdcurses_x64-windows/lib")
#target_include_directories(simulator PRIVATE curses/includes)
# Edit the previous 3 lines, according to your build of curses (ncurse or pdcurses)
# define a macro here "__DEBUG"
# include_directories(${CURSES_INCLUDE_PATH})
# find_package(Curses REQUIRED)
# target_link_libraries(display PUBLIC ${CURSES_LIBRARY}/pdcurses.lib)
1 change: 1 addition & 0 deletions ext/glfwpp
Submodule glfwpp added at 027925
1 change: 1 addition & 0 deletions ext/graphMat
Submodule graphMat added at c48780
1 change: 0 additions & 1 deletion graphMat
Submodule graphMat deleted from cfd787
2 changes: 1 addition & 1 deletion includes/declarations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <forward_list>

#include "graphMat/direction.hpp"
#include "graphMat/util/coord.hpp"
#include "graphMat/../../util/coord.hpp" // not recommended like this, @me @note - Update when Utilities become a library of themselves
#include "util/ranges.hpp" // for util::contains function

#include "config.hpp"
Expand Down
1 change: 0 additions & 1 deletion includes/entity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "declarations.hpp"
#include "id_creator.hpp"
#include "graphMat/util/coord.hpp"
#include "graphMat/3d_graph_box.hpp" // for Graph_Box

typedef void (*Action_Ptr)(void);
Expand Down
1 change: 1 addition & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <iostream>
#include <thread>
//#include <glfwpp/include//*glfwpp*//>

#include "verse.hpp"
#include "logger.hpp"
Expand Down

0 comments on commit 5b94b43

Please sign in to comment.