commit 5591a06fcf9363d81e7eef6918fe2aa44d9e439b Author: cat Date: Mon Sep 15 03:12:30 2025 +0300 Genesis Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..81c5340 --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +# ---> CMake +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps +CMakeUserPresets.json + +# ---> C++ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +build/ +.cache/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3680b35 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.10) + +project(ChargeParticles VERSION 1.0) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_EXPORT_COMPILE_COMMANDS 1) +set(CMAKE_MODULE_PATH "modules/" ${CMAKE_MODULE_PATH}) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address") +endif() + +find_package(Corrade REQUIRED Main) +find_package(Magnum REQUIRED GL) +find_package(PkgConfig REQUIRED) + +add_library(ChargeParticles SHARED "src/ChargeParticles.hpp") + +target_link_libraries(ChargeParticles PRIVATE Corrade::Main Magnum::Magnum + Magnum::GL) + +target_include_directories( + ChargeParticles + PUBLIC $ + $ + $) + +# Library +install( + TARGETS ChargeParticles + EXPORT ChargeParticlesTargets + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin) + +# include +install(FILES src/ChargeParticles.hpp DESTINATION include/Charge) + +install( + EXPORT ChargeParticlesTargets + FILE ChargeParticlesTargets.cmake + NAMESPACE ChargeParticles:: + DESTINATION lib/cmake/ChargeParticles) + +include(CMakePackageConfigHelpers) + +configure_package_config_file( + ${CMAKE_CURRENT_SOURCE_DIR}/ChargeParticlesConfig.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/ChargeParticlesConfig.cmake" + INSTALL_DESTINATION lib/cmake/ChargeParticles) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ChargeParticlesConfig.cmake" + DESTINATION lib/cmake/ChargeParticles) diff --git a/ChargeParticlesConfig.cmake.in b/ChargeParticlesConfig.cmake.in new file mode 100644 index 0000000..43c0183 --- /dev/null +++ b/ChargeParticlesConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/ChargeParticlesTargets.cmake") +message(STATUS "Found ChargeParticles!") + +check_required_components(ChargeParticles) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9053497 --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +MIT License + +Copyright (c) 2025 cat + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad5eb7d --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# ChargeParticles + +A particle system for Magnum graphics. diff --git a/src/ChargeParticles.hpp b/src/ChargeParticles.hpp new file mode 100644 index 0000000..9c96509 --- /dev/null +++ b/src/ChargeParticles.hpp @@ -0,0 +1,6 @@ +#ifndef CHARGE_PARTICLE_BASE_H +#define CHARGE_PARTICLE_BASE_H +#include + +namespace ChargeParticles {} // namespace ChargeParticles +#endif