Genesis Commit

This commit is contained in:
2025-09-15 03:12:30 +03:00
commit 5591a06fcf
6 changed files with 136 additions and 0 deletions

50
.gitignore vendored Normal file
View File

@@ -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/

53
CMakeLists.txt Normal file
View File

@@ -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 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/lib>
$<INSTALL_INTERFACE:include>)
# 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)

View File

@@ -0,0 +1,6 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/ChargeParticlesTargets.cmake")
message(STATUS "Found ChargeParticles!")
check_required_components(ChargeParticles)

18
LICENSE Normal file
View File

@@ -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.

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# ChargeParticles
A particle system for Magnum graphics.

6
src/ChargeParticles.hpp Normal file
View File

@@ -0,0 +1,6 @@
#ifndef CHARGE_PARTICLE_BASE_H
#define CHARGE_PARTICLE_BASE_H
#include <Magnum/Magnum.h>
namespace ChargeParticles {} // namespace ChargeParticles
#endif