diff --git a/CMakeLists.txt b/CMakeLists.txt index af65d15c..25fd3b04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,19 @@ cmake_minimum_required(VERSION 3.11 FATAL_ERROR) + +if(NOT DEFINED PROJECT_NAME) + set(BUILD_AS_STANDALONE ON) +endif() + project(enduro2d) set(E2D_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) set(E2D_ROOT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +if(NOT BUILD_AS_STANDALONE) + set(E2D_SYSTEM_NAME ${E2D_SYSTEM_NAME} PARENT_SCOPE) + set(E2D_ROOT_DIRECTORY ${E2D_ROOT_DIRECTORY} PARENT_SCOPE) +endif() + set(E2D_ALL_C_CONFIGS "CMAKE_C_FLAGS") set(E2D_ALL_CXX_CONFIGS "CMAKE_CXX_FLAGS") @@ -139,18 +149,21 @@ file(GLOB_RECURSE E2D_3RDPARTY set(USE_STATIC_CRT ${E2D_BUILD_WITH_STATIC_CRT} CACHE INTERNAL "" FORCE) set(USE_SYSTEM_CURL OFF CACHE INTERNAL "" FORCE) set(USE_EMBEDDED_CURL ON CACHE INTERNAL "" FORCE) + add_subdirectory(modules/curly.hpp) set_target_properties(curly.hpp libcurl PROPERTIES FOLDER modules) -set(GLFW_INSTALL OFF CACHE BOOL "" FORCE) -set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) -set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) -set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) +set(GLFW_INSTALL OFF CACHE INTERNAL "" FORCE) +set(GLFW_BUILD_DOCS OFF CACHE INTERNAL "" FORCE) +set(GLFW_BUILD_TESTS OFF CACHE INTERNAL "" FORCE) +set(GLFW_BUILD_EXAMPLES OFF CACHE INTERNAL "" FORCE) + add_subdirectory(modules/glfw) set_target_properties(glfw PROPERTIES FOLDER modules) -set(glew-cmake_BUILD_SHARED OFF CACHE BOOL "" FORCE) -set(glew-cmake_BUILD_MULTI_CONTEXT OFF CACHE BOOL "" FORCE) +set(glew-cmake_BUILD_SHARED OFF CACHE INTERNAL "" FORCE) +set(glew-cmake_BUILD_MULTI_CONTEXT OFF CACHE INTERNAL "" FORCE) + add_subdirectory(modules/glew) set_target_properties(libglew_static PROPERTIES FOLDER modules) diff --git a/LICENSE.md b/LICENSE.md index 9a7e4549..7b1f40a3 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Matvey Cherevko +Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/ROADMAP.md b/ROADMAP.md index adc02490..ea5155fd 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -112,14 +112,13 @@ - ### `advanced core` - - [ ] `audio` + - [x] `audio` ``` vorbis, streaming ``` - - - [ ] `network` + + - [x] `network` ``` - tcp/udp sockets http/https requests ``` @@ -132,7 +131,6 @@ ``` - [ ] `debug` - ``` system profilers hot library reloading @@ -145,8 +143,7 @@ component processing and joins ``` - - [ ] `game objects` - + - [x] `game objects` ``` entity prefabs smart entity wrapper @@ -171,4 +168,3 @@ ``` downloadable resource packs ``` - diff --git a/sources/enduro2d/core/network.cpp b/sources/enduro2d/core/network.cpp index 6a6f234d..f8bea6a7 100644 --- a/sources/enduro2d/core/network.cpp +++ b/sources/enduro2d/core/network.cpp @@ -39,8 +39,12 @@ namespace e2d } if ( request.status() == net::req_status::cancelled ) { promise.reject(request_cancelled_exception()); - } else { + return; + } + try { promise.reject(request_network_error(request.get_error())); + } catch (...) { + promise.reject(request_network_error()); } }); return {rb.send(), std::move(promise)};