Genesis Commit
This commit is contained in:
50
.gitignore
vendored
Normal file
50
.gitignore
vendored
Normal 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
53
CMakeLists.txt
Normal file
@@ -0,0 +1,53 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(ChargeShaders 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(ChargeShaders SHARED "src/ChargeShaders.hpp")
|
||||
|
||||
target_link_libraries(ChargeShaders PRIVATE Corrade::Main Magnum::Magnum
|
||||
Magnum::GL)
|
||||
|
||||
target_include_directories(
|
||||
ChargeShaders
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/lib>
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
# Library
|
||||
install(
|
||||
TARGETS ChargeShaders
|
||||
EXPORT ChargeShadersTargets
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin)
|
||||
|
||||
# include
|
||||
install(FILES src/ChargeShaders.hpp DESTINATION include/Charge)
|
||||
|
||||
install(
|
||||
EXPORT ChargeShadersTargets
|
||||
FILE ChargeShadersTargets.cmake
|
||||
NAMESPACE ChargeShaders::
|
||||
DESTINATION lib/cmake/ChargeShaders)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
configure_package_config_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ChargeShadersConfig.cmake.in
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ChargeShadersConfig.cmake"
|
||||
INSTALL_DESTINATION lib/cmake/ChargeShaders)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ChargeShadersConfig.cmake"
|
||||
DESTINATION lib/cmake/ChargeShaders)
|
6
ChargeShadersConfig.cmake.in
Normal file
6
ChargeShadersConfig.cmake.in
Normal file
@@ -0,0 +1,6 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/ChargeShadersTargets.cmake")
|
||||
message(STATUS "Found ChargeShaders!")
|
||||
|
||||
check_required_components(ChargeShaders)
|
18
LICENSE
Normal file
18
LICENSE
Normal 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
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# ChargeShaders
|
||||
|
||||
A collection of Shaders for primarily Magnum graphics.
|
6
src/ChargeShaders.hpp
Normal file
6
src/ChargeShaders.hpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef CHARGE_SHADER_BASE_H
|
||||
#define CHARGE_SHADER_BASE_H
|
||||
#include <Magnum/Magnum.h>
|
||||
|
||||
namespace ChargeShaders {} // namespace ChargeShaders
|
||||
#endif
|
Reference in New Issue
Block a user