diff --git a/.gitignore b/.gitignore index 2e86b82c4..45aca819e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,8 @@ .vs/* .vscode/* .idea/* +.cache/* cmake-build-debug/* cmake-build-release/* Build/* -Resources/Sounds/Music/Hiitori-Bocchi.wav -Resources/Sounds/Music/Hiitori-Bocchi.mp3 -Resources/Sounds/Music/Hiitori-Bocchi.flac -Resources/Sounds/Music/Hiitori-Bocchi.aiff .DS_Store diff --git a/CMakeLists.txt b/CMakeLists.txt index a31291348..83ff1dc79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,21 +28,18 @@ endforeach() # Add property to allow making project folders in IDEs set_property(GLOBAL PROPERTY USE_FOLDERS ON) -set(CMAKE_DISABLE_SOURCE_CHANGES ON CACHE BOOL "") -set(CMAKE_DISABLE_IN_SOURCE_BUILD ON CACHE BOOL "") -set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "Whether to create a position-independent target") -if(BUILD_SHARED_LIBS) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON CACHE BOOL "Export all symbols") -endif() # Under some compilers CMAKE_DEBUG_POSTFIX is set to "d", removed to clean dll names -set(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Set Debug library postfix") -set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "Set Release library postfix") -set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "Set RelWithDebInfo library postfix") -set(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "Set MinsizeRel library postfix") -# Removes any dll prefix name on windows, unix will keep a prefix set as "lib" +set(CMAKE_DEBUG_POSTFIX "" CACHE STRING "") +set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "") +set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "") +set(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "") if(WIN32) set(CMAKE_SHARED_LIBRARY_PREFIX "") + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON CACHE BOOL "") endif() +set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "") +set(CMAKE_DISABLE_SOURCE_CHANGES ON CACHE BOOL "") +set(CMAKE_DISABLE_IN_SOURCE_BUILD ON CACHE BOOL "") # Multithreaded MSVC builds if(MSVC_VERSION GREATER 1500 AND ${CMAKE_VERSION} VERSION_GREATER "2.8.6") diff --git a/Editor/Plugins.hpp b/Editor/Plugins.hpp index eb1a3fcc6..85982c920 100644 --- a/Editor/Plugins.hpp +++ b/Editor/Plugins.hpp @@ -15,7 +15,7 @@ namespace test { * Module used for managing the world. */ class Plugins : public Module::Registrar, public rocket::trackable { - inline static const bool Registered = Register(Stage::Always, Requires()); + inline static const bool Registered = Register(Stage::Always, Require()); public: Plugins(); ~Plugins(); diff --git a/Engine/Animation/Animations/Skin/VertexWeights.cpp b/Engine/Animation/Animations/Skin/VertexWeights.cpp index 50c4b1c29..5389aa3c0 100644 --- a/Engine/Animation/Animations/Skin/VertexWeights.cpp +++ b/Engine/Animation/Animations/Skin/VertexWeights.cpp @@ -4,7 +4,7 @@ namespace acid { void VertexWeights::AddJointEffect(uint32_t jointId, float jointWeight) { - for (auto &&[i, weight] : Enumerate(weights)) { + for (auto [i, weight] : Enumerate(weights)) { if (jointWeight > weight) { jointIds[i] = jointId; weight = jointWeight; diff --git a/Engine/Context/CMakeLists.txt b/Engine/Context/CMakeLists.txt index b0f874fc5..cb128beba 100644 --- a/Engine/Context/CMakeLists.txt +++ b/Engine/Context/CMakeLists.txt @@ -102,6 +102,8 @@ if(NOT TARGET glfw) set_target_properties(glfw PROPERTIES FOLDER "External/glfw") set_target_properties(update_mappings PROPERTIES FOLDER "External/glfw") + + set(GLFW3_LIBRARIES glfw) endif() target_compile_features(${_component_library} PUBLIC c_std_11 cxx_std_17) @@ -124,13 +126,15 @@ target_include_directories(${_component_library} $ $ $ + PRIVATE + $:${GLFW3_INCLUDE_DIRS}>> ) target_link_libraries(${_component_library} PUBLIC Acid::Core Vulkan::Vulkan PRIVATE - glfw + ${GLFW3_LIBRARIES} ) set_target_properties(${_component_library} PROPERTIES @@ -147,5 +151,8 @@ source_group(TREE "${THIRD_PARTY_SOURCE_DIR}" PREFIX "ThirdParty" FILES ${_compo install_headers_with_dir("${_component_name}" "${CMAKE_CURRENT_SOURCE_DIR}" "${_component_headers}") install_headers_with_dir("${_component_name}" "${CMAKE_CURRENT_BINARY_DIR}/include" "${_component_generated_headers}") install_headers_with_dir("third_party" "${THIRD_PARTY_SOURCE_DIR}" "${_component_third_party_headers}") +if(NOT BUILD_SHARED_LIBS) + install(TARGETS ${GLFW3_LIBRARIES} EXPORT AcidTargets) +endif() set(ACID_LIBRARIES "${ACID_LIBRARIES};${_component_library}" CACHE INTERNAL "") diff --git a/Engine/Context/Devices/Joysticks.hpp b/Engine/Context/Devices/Joysticks.hpp index 8d2a63c28..dcab11166 100644 --- a/Engine/Context/Devices/Joysticks.hpp +++ b/Engine/Context/Devices/Joysticks.hpp @@ -146,7 +146,7 @@ class ACID_CONTEXT_EXPORT Joystick { * @brief Module used for the creation, updating and destruction of the joysticks. */ class ACID_CONTEXT_EXPORT Joysticks : public Module::Registrar { - inline static const bool Registered = Register(Stage::Pre, Requires()); + inline static const bool Registered = Register(Stage::Pre, Require()); public: Joysticks(); diff --git a/Engine/Context/Inputs/Inputs.hpp b/Engine/Context/Inputs/Inputs.hpp index 4ecb498ce..eb3894998 100644 --- a/Engine/Context/Inputs/Inputs.hpp +++ b/Engine/Context/Inputs/Inputs.hpp @@ -8,7 +8,7 @@ namespace acid { * @brief Module used for managing abstract inputs organized in schemes. */ class ACID_CONTEXT_EXPORT Inputs : public Module::Registrar { - inline static const bool Registered = Register(Stage::Pre, Requires()); + inline static const bool Registered = Register(Stage::Pre, Require()); public: Inputs(); diff --git a/Engine/Core/CMakeLists.txt b/Engine/Core/CMakeLists.txt index 852ef0a95..47a03e458 100644 --- a/Engine/Core/CMakeLists.txt +++ b/Engine/Core/CMakeLists.txt @@ -145,13 +145,13 @@ target_compile_definitions(${_component_library} # 64-bit $<$:ACID_BUILD_64BIT> # Windows - $<$:ACID_BUILD_WINDOWS WIN32_LEAN_AND_MEAN NOMINMAX> + $<$:ACID_BUILD_WINDOWS _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS WIN32_LEAN_AND_MEAN NOMINMAX> # Linux $<$:ACID_BUILD_LINUX> # macOS $<$:ACID_BUILD_MACOS> # MSVC - $<$:ACID_BUILD_MSVC _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS> + $<$:ACID_BUILD_MSVC> # Clang/AppleClang $<$,$>:ACID_BUILD_CLANG> # GNU/GCC @@ -161,6 +161,7 @@ target_compile_options(${_component_library} PUBLIC # Disables symbol warnings. $<$:/wd4018 /wd4067 /wd4244 /wd4251 /wd4267 /wd4275 /wd4996> + $<$,$>:-Wno-undefined-var-template> # Enabled SSE2 for MSVC for 32-bit. $<$,$>:/arch:SSE2> # Enables SSE4.1, it is also possible to use SSE2 with -msse2 @@ -206,5 +207,8 @@ source_group(TREE "${THIRD_PARTY_SOURCE_DIR}" PREFIX "ThirdParty" FILES ${_compo install_headers_with_dir("${_component_name}" "${CMAKE_CURRENT_SOURCE_DIR}" "${_component_headers}") install_headers_with_dir("${_component_name}" "${CMAKE_CURRENT_BINARY_DIR}/include" "${_component_generated_headers}") install_headers_with_dir("third_party" "${THIRD_PARTY_SOURCE_DIR}" "${_component_third_party_headers}") +if(NOT BUILD_SHARED_LIBS) + install(TARGETS ${PHYSFS_LIBRARY} EXPORT AcidTargets) +endif() set(ACID_LIBRARIES "${_component_library}" CACHE INTERNAL "") diff --git a/Engine/Core/Engine/Engine.cpp b/Engine/Core/Engine/Engine.cpp index 6985ce774..b54ace689 100644 --- a/Engine/Core/Engine/Engine.cpp +++ b/Engine/Core/Engine/Engine.cpp @@ -3,8 +3,6 @@ #include "CoreConfig.hpp" namespace acid { -Engine *Engine::Instance = nullptr; - Engine::Engine(std::string argv0, ModuleFilter &&moduleFilter) : argv0(std::move(argv0)), version{ACID_VERSION_MAJOR, ACID_VERSION_MINOR, ACID_VERSION_PATCH}, @@ -94,7 +92,7 @@ void Engine::CreateModule(Module::TRegistryMap::const_iterator it, const ModuleF return; // TODO: Prevent circular dependencies. - for (auto requireId : it->second.requires) + for (auto requireId : it->second.require) CreateModule(Module::Registry().find(requireId), filter); auto &&module = it->second.create(); @@ -108,7 +106,7 @@ void Engine::DestroyModule(TypeId id) { // Destroy all module dependencies first. for (const auto &[registrarId, registrar] : Module::Registry()) { - if (std::find(registrar.requires.begin(), registrar.requires.end(), id) != registrar.requires.end()) + if (std::find(registrar.require.begin(), registrar.require.end(), id) != registrar.require.end()) DestroyModule(registrarId); } diff --git a/Engine/Core/Engine/Engine.hpp b/Engine/Core/Engine/Engine.hpp index 02acdc484..26fa12384 100644 --- a/Engine/Core/Engine/Engine.hpp +++ b/Engine/Core/Engine/Engine.hpp @@ -140,8 +140,8 @@ class ACID_CORE_EXPORT Engine : NonCopyable { void CreateModule(Module::TRegistryMap::const_iterator it, const ModuleFilter &filter); void DestroyModule(TypeId id); void UpdateStage(Module::Stage stage); - - static Engine *Instance; + + inline static Engine *Instance = nullptr; std::string argv0; Version version; diff --git a/Engine/Core/Engine/Log.cpp b/Engine/Core/Engine/Log.cpp index 78105ea11..168a69ab5 100644 --- a/Engine/Core/Engine/Log.cpp +++ b/Engine/Core/Engine/Log.cpp @@ -1,9 +1,6 @@ #include "Log.hpp" namespace acid { -std::mutex Log::WriteMutex; -std::ofstream Log::FileStream; - void Log::OpenLog(const std::filesystem::path &filepath) { //std::unique_lock lock(WriteMutex); if (auto parentPath = filepath.parent_path(); !parentPath.empty()) diff --git a/Engine/Core/Engine/Log.hpp b/Engine/Core/Engine/Log.hpp index 46166f058..1c6c6c2d5 100644 --- a/Engine/Core/Engine/Log.hpp +++ b/Engine/Core/Engine/Log.hpp @@ -133,8 +133,8 @@ class ACID_CORE_EXPORT Log { private: // TODO: Only use mutex in synced writes (where output order must be the same). - static std::mutex WriteMutex; - static std::ofstream FileStream; + inline static std::mutex WriteMutex; + inline static std::ofstream FileStream; /** * A internal method used to write values to the out stream and to a file. diff --git a/Engine/Core/Engine/Module.hpp b/Engine/Core/Engine/Module.hpp index e55fa8d38..242c28119 100644 --- a/Engine/Core/Engine/Module.hpp +++ b/Engine/Core/Engine/Module.hpp @@ -16,7 +16,7 @@ class ModuleFactory { public: std::function()> create; typename Base::Stage stage; - std::vector requires; + std::vector require; }; using TRegistryMap = std::unordered_map; @@ -28,12 +28,12 @@ class ModuleFactory { } template - class Requires { + class Require { public: std::vector Get() const { - std::vector requires; - (requires.emplace_back(TypeInfo::template GetTypeId()), ...); - return requires; + std::vector require; + (require.emplace_back(TypeInfo::template GetTypeId()), ...); + return require; } }; @@ -61,12 +61,12 @@ class ModuleFactory { * @return A dummy value in static initialization. */ template - static bool Register(typename Base::Stage stage, Requires &&requires = {}) { + static bool Register(typename Base::Stage stage, Require &&require = {}) { ModuleFactory::Registry()[TypeInfo::template GetTypeId()] = {[]() { moduleInstance = new T(); // The registrar does not own the instance, the engine does, we just hold a raw pointer for convenience. return std::unique_ptr(moduleInstance); - }, stage, requires.Get()}; + }, stage, require.Get()}; return true; } diff --git a/Engine/Core/Files/Json/Json.cpp b/Engine/Core/Files/Json/Json.cpp index 6cd9c2c59..a54c6c2e4 100644 --- a/Engine/Core/Files/Json/Json.cpp +++ b/Engine/Core/Files/Json/Json.cpp @@ -67,8 +67,8 @@ void Json::Load(Node &node, std::string_view string) { } } - if (tokens.empty()) - throw std::runtime_error("No tokens found in document"); + //if (tokens.empty()) + // throw std::runtime_error("No tokens found in document"); // Converts the tokens into nodes. int32_t k = 0; diff --git a/Engine/Core/Files/Node.hpp b/Engine/Core/Files/Node.hpp index 7d1cdc05a..e8fd360be 100644 --- a/Engine/Core/Files/Node.hpp +++ b/Engine/Core/Files/Node.hpp @@ -20,7 +20,13 @@ class ACID_CORE_EXPORT Node final { template>> void WriteStream(std::ostream &stream, NodeFormat::Format format = NodeFormat::Minified) const; - template>> + template +#ifndef ACID_BUILD_MSVC + // Cannot dynamicly parse wide streams on GCC or Clang + && std::is_same_v<_Elem, char> +#endif + >> void ParseStream(std::basic_istream<_Elem> &stream); template>> std::basic_string<_Elem> WriteString(NodeFormat::Format format = NodeFormat::Minified) const; diff --git a/Engine/Core/Files/Node.inl b/Engine/Core/Files/Node.inl index 04726c34a..50940a07c 100644 --- a/Engine/Core/Files/Node.inl +++ b/Engine/Core/Files/Node.inl @@ -38,13 +38,8 @@ void Node::WriteStream(std::ostream &stream, NodeFormat::Format format) const { template void Node::ParseStream(std::basic_istream<_Elem> &stream) { // We must read as UTF8 chars. - if constexpr (!std::is_same_v<_Elem, char>) { -#ifndef _MSC_VER - throw std::runtime_error("Cannot dynamicly parse wide streams on GCC or Clang"); -#else + if constexpr (!std::is_same_v<_Elem, char>) stream.imbue(std::locale(stream.getloc(), new std::codecvt_utf8)); -#endif - } // Reading into a string before iterating is much faster. std::string s(std::istreambuf_iterator<_Elem>(stream), {}); diff --git a/Engine/Core/Files/NodeFormat.hpp b/Engine/Core/Files/NodeFormat.hpp index b5847b8b5..a552ead11 100644 --- a/Engine/Core/Files/NodeFormat.hpp +++ b/Engine/Core/Files/NodeFormat.hpp @@ -95,16 +95,16 @@ class ACID_CORE_EXPORT NodeFormat { virtual void WriteStream(const Node &node, std::ostream &stream, Format format = Minified) const = 0; // TODO: Duplicate ParseStream/WriteString templates from Node. - template + template> +#endif + > void ParseStream(Node &node, std::basic_istream<_Elem> &stream) { // We must read as UTF8 chars. - if constexpr (!std::is_same_v<_Elem, char>) { -#ifndef ACID_BUILD_MSVC - throw std::runtime_error("Cannot dynamicly parse wide streams on GCC or Clang"); -#else + if constexpr (!std::is_same_v<_Elem, char>) stream.imbue(std::locale(stream.getloc(), new std::codecvt_utf8)); -#endif - } // Reading into a string before iterating is much faster. std::string s(std::istreambuf_iterator<_Elem>(stream), {}); diff --git a/Engine/Core/Files/Xml/Xml.cpp b/Engine/Core/Files/Xml/Xml.cpp index a3455147a..2c3343cbc 100644 --- a/Engine/Core/Files/Xml/Xml.cpp +++ b/Engine/Core/Files/Xml/Xml.cpp @@ -41,8 +41,8 @@ void Xml::Load(Node &node, std::string_view string) { } } - if (tokens.empty()) - throw std::runtime_error("No tokens found in document"); + //if (tokens.empty()) + // throw std::runtime_error("No tokens found in document"); // Converts the tokens into nodes. int32_t k = 0; diff --git a/Engine/Core/Maths/Vector2.inl b/Engine/Core/Maths/Vector2.inl index 4520eff45..cf4d6c98b 100644 --- a/Engine/Core/Maths/Vector2.inl +++ b/Engine/Core/Maths/Vector2.inl @@ -1,8 +1,9 @@ #pragma once +#include "Vector2.hpp" + #include "Files/Node.hpp" #include "Maths.hpp" -#include "Vector2.hpp" namespace acid { template diff --git a/Engine/Core/Maths/Vector3.inl b/Engine/Core/Maths/Vector3.inl index 1c9efe0a4..cdaa7bb35 100644 --- a/Engine/Core/Maths/Vector3.inl +++ b/Engine/Core/Maths/Vector3.inl @@ -1,8 +1,9 @@ #pragma once +#include "Vector3.hpp" + #include "Files/Node.hpp" #include "Maths.hpp" -#include "Vector3.hpp" namespace acid { template diff --git a/Engine/Core/Maths/Vector4.inl b/Engine/Core/Maths/Vector4.inl index 1617584e0..8485d6d58 100644 --- a/Engine/Core/Maths/Vector4.inl +++ b/Engine/Core/Maths/Vector4.inl @@ -1,8 +1,9 @@ #pragma once +#include "Vector4.hpp" + #include "Files/Node.hpp" #include "Maths.hpp" -#include "Vector4.hpp" namespace acid { template diff --git a/Engine/Core/Resources/Resources.hpp b/Engine/Core/Resources/Resources.hpp index d4cffe47d..49f387deb 100644 --- a/Engine/Core/Resources/Resources.hpp +++ b/Engine/Core/Resources/Resources.hpp @@ -14,7 +14,7 @@ namespace acid { * a existing resource is queried by node value. */ class ACID_CORE_EXPORT Resources : public Module::Registrar { - inline static const bool Registered = Register(Stage::Post, Requires()); + inline static const bool Registered = Register(Stage::Post, Require()); public: Resources(); diff --git a/Engine/Graphics/CMakeLists.txt b/Engine/Graphics/CMakeLists.txt index 05d886dee..2e108f31b 100644 --- a/Engine/Graphics/CMakeLists.txt +++ b/Engine/Graphics/CMakeLists.txt @@ -183,7 +183,7 @@ if(NOT glslang_FOUND) set_target_properties(OSDependent PROPERTIES FOLDER "External/glslang") set_target_properties(SPIRV PROPERTIES FOLDER "External/glslang") - set(GLSLANG_LIBRARIES glslang SPIRV) + set(GLSLANG_LIBRARIES OGLCompiler OSDependent MachineIndependent GenericCodeGen glslang SPIRV) else() set(GLSLANG_INCLUDE_DIRS "${GLSLANG_INCLUDE_DIR}" "${SPIRV_INCLUDE_DIR}") set(GLSLANG_LIBRARIES glslang::glslang glslang::SPIRV) @@ -225,5 +225,8 @@ source_group(TREE "${THIRD_PARTY_SOURCE_DIR}" PREFIX "ThirdParty" FILES ${_compo install_headers_with_dir("${_component_name}" "${CMAKE_CURRENT_SOURCE_DIR}" "${_component_headers}") install_headers_with_dir("${_component_name}" "${CMAKE_CURRENT_BINARY_DIR}/include" "${_component_generated_headers}") install_headers_with_dir("third_party" "${THIRD_PARTY_SOURCE_DIR}" "${_component_third_party_headers}") +if(NOT BUILD_SHARED_LIBS) + install(TARGETS ${GLSLANG_LIBRARIES} EXPORT AcidTargets) +endif() set(ACID_LIBRARIES "${ACID_LIBRARIES};${_component_library}" CACHE INTERNAL "") diff --git a/Engine/Graphics/Graphics/Buffers/StorageHandler.cpp b/Engine/Graphics/Graphics/Buffers/StorageHandler.cpp index c9aae1b45..37f70ba9d 100644 --- a/Engine/Graphics/Graphics/Buffers/StorageHandler.cpp +++ b/Engine/Graphics/Graphics/Buffers/StorageHandler.cpp @@ -15,8 +15,8 @@ StorageHandler::StorageHandler(const Shader::UniformBlock &uniformBlock, bool mu } bool StorageHandler::Update(const std::optional &uniformBlock) { - if (handlerStatus == Buffer::Status::Reset || multipipeline && !this->uniformBlock || !multipipeline && this->uniformBlock != uniformBlock) { - if (size == 0 && !this->uniformBlock || this->uniformBlock && this->uniformBlock != uniformBlock && static_cast(this->uniformBlock->GetSize()) == size) { + if (handlerStatus == Buffer::Status::Reset || (multipipeline && !this->uniformBlock) || (!multipipeline && this->uniformBlock != uniformBlock)) { + if ((size == 0 && !this->uniformBlock) || (this->uniformBlock && this->uniformBlock != uniformBlock && static_cast(this->uniformBlock->GetSize()) == size)) { size = static_cast(uniformBlock->GetSize()); } diff --git a/Engine/Graphics/Graphics/Buffers/UniformHandler.cpp b/Engine/Graphics/Graphics/Buffers/UniformHandler.cpp index 55e3da63f..f77719525 100644 --- a/Engine/Graphics/Graphics/Buffers/UniformHandler.cpp +++ b/Engine/Graphics/Graphics/Buffers/UniformHandler.cpp @@ -15,8 +15,8 @@ UniformHandler::UniformHandler(const Shader::UniformBlock &uniformBlock, bool mu } bool UniformHandler::Update(const std::optional &uniformBlock) { - if (handlerStatus == Buffer::Status::Reset || multipipeline && !this->uniformBlock || !multipipeline && this->uniformBlock != uniformBlock) { - if (size == 0 && !this->uniformBlock || this->uniformBlock && this->uniformBlock != uniformBlock && static_cast(this->uniformBlock->GetSize()) == size) { + if (handlerStatus == Buffer::Status::Reset || (multipipeline && !this->uniformBlock) || (!multipipeline && this->uniformBlock != uniformBlock)) { + if ((size == 0 && !this->uniformBlock) || (this->uniformBlock && this->uniformBlock != uniformBlock && static_cast(this->uniformBlock->GetSize()) == size)) { size = static_cast(uniformBlock->GetSize()); } diff --git a/Engine/Graphics/Graphics/Graphics.hpp b/Engine/Graphics/Graphics/Graphics.hpp index ea23d78da..7bd1e6006 100644 --- a/Engine/Graphics/Graphics/Graphics.hpp +++ b/Engine/Graphics/Graphics/Graphics.hpp @@ -15,7 +15,7 @@ namespace acid { * @brief Module that manages the Vulkan instance, Surface, Window and the renderpass structure. */ class ACID_GRAPHICS_EXPORT Graphics : public Module::Registrar { - inline static const bool Registered = Register(Stage::Render, Requires()); + inline static const bool Registered = Register(Stage::Render, Require()); public: Graphics(); ~Graphics(); diff --git a/Engine/Physics/CMakeLists.txt b/Engine/Physics/CMakeLists.txt index 97d5ca712..a30695b59 100644 --- a/Engine/Physics/CMakeLists.txt +++ b/Engine/Physics/CMakeLists.txt @@ -106,5 +106,8 @@ source_group(TREE "${CMAKE_CURRENT_BINARY_DIR}/include" PREFIX "" FILES ${_compo install_headers_with_dir("${_component_name}" "${CMAKE_CURRENT_SOURCE_DIR}" "${_component_headers}") install_headers_with_dir("${_component_name}" "${CMAKE_CURRENT_BINARY_DIR}/include" "${_component_generated_headers}") +if(NOT BUILD_SHARED_LIBS) + install(TARGETS ${BULLET_LIBRARIES} EXPORT AcidTargets) +endif() set(ACID_LIBRARIES "${ACID_LIBRARIES};${_component_library}" CACHE INTERNAL "") diff --git a/Engine/Ui/CMakeLists.txt b/Engine/Ui/CMakeLists.txt index c7f5e0d78..7128c6cf5 100644 --- a/Engine/Ui/CMakeLists.txt +++ b/Engine/Ui/CMakeLists.txt @@ -131,5 +131,8 @@ source_group(TREE "${THIRD_PARTY_SOURCE_DIR}" PREFIX "ThirdParty" FILES ${_compo install_headers_with_dir("${_component_name}" "${CMAKE_CURRENT_SOURCE_DIR}" "${_component_headers}") install_headers_with_dir("${_component_name}" "${CMAKE_CURRENT_BINARY_DIR}/include" "${_component_generated_headers}") install_headers_with_dir("third_party" "${THIRD_PARTY_SOURCE_DIR}" "${_component_third_party_headers}") +if(NOT BUILD_SHARED_LIBS) + install(TARGETS ${FREETYPE_LIBRARIES} EXPORT AcidTargets) +endif() set(ACID_LIBRARIES "${ACID_LIBRARIES};${_component_library}" CACHE INTERNAL "") diff --git a/External/freetype b/External/freetype index c26f0d0d7..7cd3f19f2 160000 --- a/External/freetype +++ b/External/freetype @@ -1 +1 @@ -Subproject commit c26f0d0d7e1b24863193ab2808f67798456dfc9c +Subproject commit 7cd3f19f21cc9d600e3b765ef2058474d20233e2 diff --git a/External/glfw b/External/glfw index 62e175ef9..c18851f52 160000 --- a/External/glfw +++ b/External/glfw @@ -1 +1 @@ -Subproject commit 62e175ef9fae75335575964c845a302447c012c7 +Subproject commit c18851f52ec9704eb06464058a600845ec1eada1 diff --git a/External/glslang b/External/glslang index 7dda6a634..adf7bf011 160000 --- a/External/glslang +++ b/External/glslang @@ -1 +1 @@ -Subproject commit 7dda6a6347b0bd550e202942adee475956ef462a +Subproject commit adf7bf0113ba99fb8e49b23ba7f30c6ee277d14b diff --git a/External/googletest b/External/googletest index 9d21db9e0..5b909beee 160000 --- a/External/googletest +++ b/External/googletest @@ -1 +1 @@ -Subproject commit 9d21db9e0a60a1ea61ec19331c9bc0dd33e907b1 +Subproject commit 5b909beeec178f338be997830b6c31a80cda7a93 diff --git a/External/physfs b/External/physfs index 6925c1067..0d4e9aac4 160000 --- a/External/physfs +++ b/External/physfs @@ -1 +1 @@ -Subproject commit 6925c1067de2c9e39d626bcba84db0113f8395f2 +Subproject commit 0d4e9aac4575744ddaae56b146f1be19f064f0e5 diff --git a/README.md b/README.md index 90bddf8c1..742ec7952 100644 --- a/README.md +++ b/README.md @@ -134,5 +134,8 @@ On Linux Acid requires `xorg-dev`, `libopenal1`, and `libvulkan1` to be installe Setup on MacOS is similar to the setup on Linux, a compiler that supports C++17 is required, such as XCode 10.0. +## Stargazers over time +[![Stargazers over time](https://starchart.cc/EQMG/Acid.svg)](https://starchart.cc/EQMG/Acid) + ## Contributing You can contribute to Acid in any way you want, we are always looking for help. You can learn about Acids code style from the [GUIDELINES.md](.github/GUIDELINES.md). diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 4f2d9d502..0bfd9e0ac 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -17,6 +17,7 @@ add_test(NAME Tests COMMAND Tests) find_package(GTest 1.11.0 QUIET) if(NOT GTest_FOUND) set(INSTALL_GTEST OFF CACHE BOOL "Enable installation of googletest") + set(gtest_force_shared_crt ON CACHE BOOL "Use shared (DLL) run-time lib even when Google Test is built as static lib.") add_subdirectory(${THIRD_PARTY_SOURCE_DIR}/googletest ${THIRD_PARTY_BINARY_DIR}/googletest) set_target_properties(gmock PROPERTIES FOLDER "External/googletest")