From e62a93340e24f18fbf1d312f85285deee9fff7aa Mon Sep 17 00:00:00 2001 From: Carlchristian Eckert Date: Wed, 14 Oct 2015 13:32:40 +0200 Subject: [PATCH] preparing paths for AUR --- CMakeLists.txt | 23 +++++++++++++++++-- README.md | 7 +++--- cmake/elegant-progressbarsConfigVersion.cmake | 6 ++--- examples/progressbar_example.cpp | 8 +++---- .../Hourglass.hpp | 0 .../Label.hpp | 0 .../Newline.hpp | 0 .../Pattern.hpp | 0 .../Percentage.hpp | 0 .../Spinner.hpp | 0 .../Time.hpp | 0 include/elegant-progressbars/all_policies.hpp | 9 ++++++++ .../fancyProgressbar.hpp | 0 .../fancyProgressbar_legacy.hpp | 0 .../policyProgressbar.hpp | 0 .../printPattern_legacy.hpp | 0 .../printPercentage_legacy.hpp | 0 .../printTime_legacy.hpp | 0 .../version.hpp | 0 include/elegantProgressbars/all_policies.hpp | 9 -------- 20 files changed, 40 insertions(+), 22 deletions(-) rename include/{elegantProgressbars => elegant-progressbars}/Hourglass.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/Label.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/Newline.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/Pattern.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/Percentage.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/Spinner.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/Time.hpp (100%) create mode 100644 include/elegant-progressbars/all_policies.hpp rename include/{elegantProgressbars => elegant-progressbars}/fancyProgressbar.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/fancyProgressbar_legacy.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/policyProgressbar.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/printPattern_legacy.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/printPercentage_legacy.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/printTime_legacy.hpp (100%) rename include/{elegantProgressbars => elegant-progressbars}/version.hpp (100%) delete mode 100644 include/elegantProgressbars/all_policies.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 35b2873..efbd100 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,29 +2,48 @@ project(elegant-progressbars-dev) cmake_minimum_required(VERSION 3.0.2) + ############################################################################### # Compiler flags ############################################################################### -option(CMAKE_BUILD_TYPE "build type" Slow) # to show the progress +option(CMAKE_BUILD_TYPE "build type" Slow) # to show the progress. Don't use in real code! SET (CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++11") SET (CMAKE_CXX_FLAGS_SLOW "-O0") + ############################################################################### # Progressbar for a More Civilized Age Config ############################################################################### find_package(elegant-progressbars 1.0.0 REQUIRED PATHS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") + +############################################################################### +# Installation for Unix systems +############################################################################### +install( + DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include" + DESTINATION "lib/elegant-progressbars" + ) + +install( + DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake" + DESTINATION "lib/elegant-progressbars" + ) + + + ############################################################################### # Build executables ############################################################################### add_executable(ProgressBarExample examples/progressbar_example.cpp) + + ############################################################################### # Custom targets ############################################################################### - # DOXYGEN find_package(Doxygen) if(DOXYGEN_FOUND) diff --git a/README.md b/README.md index 28e3448..0cdbaeb 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Installation ------------ ###Manual### -Just put the folder ./lib/elegantProgressbars in a place where your compiler +Just put the folder `lib/elegant-progressbars` in a place where your compiler will find it when searching for libraries to include. You can use ```doxygen``` to get a nice documentation: @@ -33,9 +33,8 @@ Example There is an example which can be compiled and tested: ###Dependencies - - ```cmake``` >= 2.8.5 - - ```clang``` >= 3.4 - - (```g++``` >= 4.8.2 might also work, use ```cmake -DUSE_CLANG=OFF```) + - `cmake` >= 3.0.2 + - `clang` >= 3.4 **or** `gcc >= 4.8.2` ###Build: ```bash diff --git a/cmake/elegant-progressbarsConfigVersion.cmake b/cmake/elegant-progressbarsConfigVersion.cmake index d840be2..afec1dc 100644 --- a/cmake/elegant-progressbarsConfigVersion.cmake +++ b/cmake/elegant-progressbarsConfigVersion.cmake @@ -1,6 +1,6 @@ -file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../include/elegantProgressbars/version.hpp" elegantProgressbars_VERSION_MAJOR_HPP REGEX "#define ELEGANTPROGRESSBARS_VERSION_MAJOR ") -file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../include/elegantProgressbars/version.hpp" elegantProgressbars_VERSION_MINOR_HPP REGEX "#define ELEGANTPROGRESSBARS_VERSION_MINOR ") -file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../include/elegantProgressbars/version.hpp" elegantProgressbars_VERSION_PATCH_HPP REGEX "#define ELEGANTPROGRESSBARS_VERSION_PATCH ") +file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../include/elegant-progressbars/version.hpp" elegantProgressbars_VERSION_MAJOR_HPP REGEX "#define ELEGANTPROGRESSBARS_VERSION_MAJOR ") +file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../include/elegant-progressbars/version.hpp" elegantProgressbars_VERSION_MINOR_HPP REGEX "#define ELEGANTPROGRESSBARS_VERSION_MINOR ") +file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../include/elegant-progressbars/version.hpp" elegantProgressbars_VERSION_PATCH_HPP REGEX "#define ELEGANTPROGRESSBARS_VERSION_PATCH ") string(REGEX MATCH "([0-9]+)" elegantProgressbars_VERSION_MAJOR ${elegantProgressbars_VERSION_MAJOR_HPP}) string(REGEX MATCH "([0-9]+)" elegantProgressbars_VERSION_MINOR ${elegantProgressbars_VERSION_MINOR_HPP}) diff --git a/examples/progressbar_example.cpp b/examples/progressbar_example.cpp index 4612f8b..b4b04b5 100644 --- a/examples/progressbar_example.cpp +++ b/examples/progressbar_example.cpp @@ -1,10 +1,10 @@ #include -#include "elegantProgressbars/policyProgressbar.hpp" -#include "elegantProgressbars/all_policies.hpp" +#include "elegant-progressbars/policyProgressbar.hpp" +#include "elegant-progressbars/all_policies.hpp" -#include "elegantProgressbars/fancyProgressbar.hpp" -#include "elegantProgressbars/fancyProgressbar_legacy.hpp" +#include "elegant-progressbars/fancyProgressbar.hpp" +#include "elegant-progressbars/fancyProgressbar_legacy.hpp" //just some workload -> don't use optimizations, if you want that to work diff --git a/include/elegantProgressbars/Hourglass.hpp b/include/elegant-progressbars/Hourglass.hpp similarity index 100% rename from include/elegantProgressbars/Hourglass.hpp rename to include/elegant-progressbars/Hourglass.hpp diff --git a/include/elegantProgressbars/Label.hpp b/include/elegant-progressbars/Label.hpp similarity index 100% rename from include/elegantProgressbars/Label.hpp rename to include/elegant-progressbars/Label.hpp diff --git a/include/elegantProgressbars/Newline.hpp b/include/elegant-progressbars/Newline.hpp similarity index 100% rename from include/elegantProgressbars/Newline.hpp rename to include/elegant-progressbars/Newline.hpp diff --git a/include/elegantProgressbars/Pattern.hpp b/include/elegant-progressbars/Pattern.hpp similarity index 100% rename from include/elegantProgressbars/Pattern.hpp rename to include/elegant-progressbars/Pattern.hpp diff --git a/include/elegantProgressbars/Percentage.hpp b/include/elegant-progressbars/Percentage.hpp similarity index 100% rename from include/elegantProgressbars/Percentage.hpp rename to include/elegant-progressbars/Percentage.hpp diff --git a/include/elegantProgressbars/Spinner.hpp b/include/elegant-progressbars/Spinner.hpp similarity index 100% rename from include/elegantProgressbars/Spinner.hpp rename to include/elegant-progressbars/Spinner.hpp diff --git a/include/elegantProgressbars/Time.hpp b/include/elegant-progressbars/Time.hpp similarity index 100% rename from include/elegantProgressbars/Time.hpp rename to include/elegant-progressbars/Time.hpp diff --git a/include/elegant-progressbars/all_policies.hpp b/include/elegant-progressbars/all_policies.hpp new file mode 100644 index 0000000..4e397d7 --- /dev/null +++ b/include/elegant-progressbars/all_policies.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "elegant-progressbars/Label.hpp" +#include "elegant-progressbars/Percentage.hpp" +#include "elegant-progressbars/Time.hpp" +#include "elegant-progressbars/Hourglass.hpp" +#include "elegant-progressbars/Newline.hpp" +#include "elegant-progressbars/Pattern.hpp" +#include "elegant-progressbars/Spinner.hpp" diff --git a/include/elegantProgressbars/fancyProgressbar.hpp b/include/elegant-progressbars/fancyProgressbar.hpp similarity index 100% rename from include/elegantProgressbars/fancyProgressbar.hpp rename to include/elegant-progressbars/fancyProgressbar.hpp diff --git a/include/elegantProgressbars/fancyProgressbar_legacy.hpp b/include/elegant-progressbars/fancyProgressbar_legacy.hpp similarity index 100% rename from include/elegantProgressbars/fancyProgressbar_legacy.hpp rename to include/elegant-progressbars/fancyProgressbar_legacy.hpp diff --git a/include/elegantProgressbars/policyProgressbar.hpp b/include/elegant-progressbars/policyProgressbar.hpp similarity index 100% rename from include/elegantProgressbars/policyProgressbar.hpp rename to include/elegant-progressbars/policyProgressbar.hpp diff --git a/include/elegantProgressbars/printPattern_legacy.hpp b/include/elegant-progressbars/printPattern_legacy.hpp similarity index 100% rename from include/elegantProgressbars/printPattern_legacy.hpp rename to include/elegant-progressbars/printPattern_legacy.hpp diff --git a/include/elegantProgressbars/printPercentage_legacy.hpp b/include/elegant-progressbars/printPercentage_legacy.hpp similarity index 100% rename from include/elegantProgressbars/printPercentage_legacy.hpp rename to include/elegant-progressbars/printPercentage_legacy.hpp diff --git a/include/elegantProgressbars/printTime_legacy.hpp b/include/elegant-progressbars/printTime_legacy.hpp similarity index 100% rename from include/elegantProgressbars/printTime_legacy.hpp rename to include/elegant-progressbars/printTime_legacy.hpp diff --git a/include/elegantProgressbars/version.hpp b/include/elegant-progressbars/version.hpp similarity index 100% rename from include/elegantProgressbars/version.hpp rename to include/elegant-progressbars/version.hpp diff --git a/include/elegantProgressbars/all_policies.hpp b/include/elegantProgressbars/all_policies.hpp deleted file mode 100644 index 44fca42..0000000 --- a/include/elegantProgressbars/all_policies.hpp +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include "elegantProgressbars/Label.hpp" -#include "elegantProgressbars/Percentage.hpp" -#include "elegantProgressbars/Time.hpp" -#include "elegantProgressbars/Hourglass.hpp" -#include "elegantProgressbars/Newline.hpp" -#include "elegantProgressbars/Pattern.hpp" -#include "elegantProgressbars/Spinner.hpp"