New project structure
48
.gitignore
vendored
@ -1,48 +1,2 @@
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# All images
|
||||
*.bmp
|
||||
*.jpg
|
||||
*.jpeg
|
||||
*.png
|
||||
|
||||
# Vim swap files
|
||||
*.swp
|
||||
|
||||
# User-specific stuff
|
||||
.idea/
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
build/
|
||||
|
||||
|
3
.gitmodules
vendored
@ -0,0 +1,3 @@
|
||||
[submodule "Eule"]
|
||||
path = Eule
|
||||
url = git@gitea.leonetienne.de:leonetienne/Eule.git
|
63
BmpPP/CMakeLists.txt
Normal file
@ -0,0 +1,63 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(BmpPP)
|
||||
|
||||
###################
|
||||
# Library project #
|
||||
###################
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Add library Eule
|
||||
SET(eule_dir ../Eule/Eule)
|
||||
SET(eule_include ${eule_dir}/include)
|
||||
FILE(GLOB eule_src ${eule_dir}/src/*.cpp)
|
||||
add_compile_definitions(_EULE_NO_INTRINSICS_)
|
||||
|
||||
FILE(GLOB main_src src/*.cpp)
|
||||
add_library(${PROJECT_NAME}
|
||||
${main_src}
|
||||
|
||||
${eule_src}
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
include
|
||||
${eule_include}
|
||||
)
|
||||
|
||||
#########
|
||||
# Tests #
|
||||
#########
|
||||
FILE(GLOB test_src test/*.cpp)
|
||||
add_executable(test
|
||||
test/Catch2.h
|
||||
${test_src}
|
||||
)
|
||||
target_link_libraries(test ${PROJECT_NAME})
|
||||
|
||||
target_include_directories(test PRIVATE
|
||||
include
|
||||
${eule_include}
|
||||
)
|
||||
|
||||
## Move test images to build dir
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_SOURCE_DIR}/test/testAssets/ $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
|
||||
|
||||
##############
|
||||
# Executable #
|
||||
##############
|
||||
FILE(GLOB exec_src exec/*.cpp)
|
||||
add_executable(exec
|
||||
${exec_src}
|
||||
)
|
||||
target_link_libraries(exec ${PROJECT_NAME})
|
||||
|
||||
target_include_directories(exec PRIVATE
|
||||
include
|
||||
${eule_include}
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <BMP.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include <iostream>
|
||||
#include <BmpHeader.h>
|
||||
#include <BmpPP/BmpHeader.h>
|
||||
#include <Eule/Math.h>
|
||||
|
||||
using namespace Leonetienne::BmpPP;
|
@ -4,7 +4,7 @@
|
||||
#include <Eule/Vector2.h>
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
#include "Colormodes.h"
|
||||
#include "BmpPP/Colormodes.h"
|
||||
|
||||
namespace Leonetienne::BmpPP {
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "BMP.h"
|
||||
#include "BmpPP/Bmp.h"
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
#include "BmpWriter.h"
|
||||
#include "BmpReader.h"
|
||||
#include "BmpPP/BmpWriter.h"
|
||||
#include "BmpPP/BmpReader.h"
|
||||
|
||||
#define CHECK_IF_INITIALIZED if (!isInitialized) throw std::runtime_error("Image not initialized!");
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "BmpHeader.h"
|
||||
#include "BmpPP/BmpHeader.h"
|
||||
|
||||
namespace Leonetienne::BmpPP {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "BmpReader.h"
|
||||
#include "Colormodes.h"
|
||||
#include "BMP.h"
|
||||
#include "BmpPP/BmpReader.h"
|
||||
#include "BmpPP/Colormodes.h"
|
||||
#include "BmpPP/Bmp.h"
|
||||
#include <fstream>
|
||||
#include <cstdint>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "BmpWriter.h"
|
||||
#include "BmpHeader.h"
|
||||
#include "Bmp.h"
|
||||
#include "BmpPP/BmpWriter.h"
|
||||
#include "BmpPP/BmpHeader.h"
|
||||
#include "BmpPP/Bmp.h"
|
||||
#include <fstream>
|
||||
|
||||
namespace Leonetienne::BmpPP {
|
@ -1,4 +1,4 @@
|
||||
#include <BmpHeader.h>
|
||||
#include <BmpPP/BmpHeader.h>
|
||||
#include "Catch2.h"
|
||||
|
||||
using namespace Leonetienne::BmpPP;
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include <stdexcept>
|
||||
#include "Catch2.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include <stdexcept>
|
||||
#include "Catch2.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include "Catch2.h"
|
||||
#include <tuple>
|
||||
#include <Eule/Math.h>
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include <stdexcept>
|
||||
#include "Catch2.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include <stdexcept>
|
||||
#include "Catch2.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include <stdexcept>
|
||||
#include "Catch2.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include "Catch2.h"
|
||||
|
||||
using namespace Leonetienne::BmpPP;
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include "Catch2.h"
|
||||
#include <tuple>
|
||||
#include <Eule/Math.h>
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include <stdexcept>
|
||||
#include "Catch2.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include <stdexcept>
|
||||
#include "Catch2.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include <stdexcept>
|
||||
#include "Catch2.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Bmp.h>
|
||||
#include <BmpPP/Bmp.h>
|
||||
#include "Catch2.h"
|
||||
#include <tuple>
|
||||
#include <Eule/Math.h>
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 306 KiB After Width: | Height: | Size: 306 KiB |
Before Width: | Height: | Size: 306 KiB After Width: | Height: | Size: 306 KiB |
Before Width: | Height: | Size: 306 KiB After Width: | Height: | Size: 306 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 624 KiB After Width: | Height: | Size: 624 KiB |
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 430 KiB After Width: | Height: | Size: 430 KiB |
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 249 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 348 KiB |
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 348 KiB |
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 348 KiB |
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 348 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 408 KiB |
Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 408 KiB |
Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 408 KiB |
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 830 KiB After Width: | Height: | Size: 830 KiB |
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 139 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
1
Eule
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3ff7a3cc25e628ce92c8f416a922228adc0230d8
|
@ -1,20 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(BmpPP_exec)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
ADD_COMPILE_DEFINITIONS(_EULE_NO_INTRINSICS_)
|
||||
ADD_COMPILE_DEFINITIONS(_BMPLIB_DEBUG_OUTPUT_)
|
||||
|
||||
INCLUDE_DIRECTORIES(../Src/Eule/)
|
||||
INCLUDE_DIRECTORIES(../Src/)
|
||||
|
||||
FILE(GLOB Eule ../Src/Eule/Eule/*.cpp)
|
||||
FILE(GLOB BmpPP ../Src/*.cpp)
|
||||
|
||||
add_executable(BmpPP_exec
|
||||
${Eule}
|
||||
${BmpPP}
|
||||
|
||||
main.cpp
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(BmpPP)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
ADD_COMPILE_DEFINITIONS(_EULE_NO_INTRINSICS_)
|
||||
INCLUDE_DIRECTORIES(./Eule/)
|
||||
FILE(GLOB Eule ./Eule/Eule/*.cpp)
|
||||
|
||||
add_library(BmpPP
|
||||
${Eule}
|
||||
|
||||
BMP.cpp
|
||||
BmpWriter.cpp
|
||||
BmpReader.cpp
|
||||
BmpHeader.cpp
|
||||
)
|
@ -1,41 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(Test)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
ADD_COMPILE_DEFINITIONS(_EULE_NO_INTRINSICS_)
|
||||
|
||||
INCLUDE_DIRECTORIES(../Src/Eule/)
|
||||
INCLUDE_DIRECTORIES(../Src/)
|
||||
|
||||
FILE(GLOB Eule ../Src/Eule/Eule/*.cpp)
|
||||
FILE(GLOB BmpPP ../Src/*.cpp)
|
||||
|
||||
add_executable(Test
|
||||
${Eule}
|
||||
${BmpPP}
|
||||
|
||||
Catch2.h
|
||||
main.cpp
|
||||
|
||||
BmpHeader.cpp
|
||||
ReInitialize.cpp
|
||||
Uninitialized.cpp
|
||||
Read.cpp
|
||||
Write.cpp
|
||||
OperatorEquals.cpp
|
||||
FillChannel.cpp
|
||||
MirrorHorizontally.cpp
|
||||
MirrorVertically.cpp
|
||||
SwapChannels.cpp
|
||||
Rotate.cpp
|
||||
ConvertColormode.cpp
|
||||
Crop.cpp
|
||||
)
|
||||
|
||||
# Move test images to build dir
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_SOURCE_DIR}/TestAssets/ $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Replace {PROJECT_NAME} with first parameter given in all files
|
||||
find . -type f -not \( -path '*.git/*' -or -path '*configure.sh*' -or -name 'Catch2.h' \) -exec sed -i "s/{PROJECT_NAME}/$1/g" {} \;
|
||||
|