init commit of the Credits

This commit is contained in:
Andrei Yankovich 2021-03-18 17:47:57 +03:00
parent 3f1c5fc8cf
commit ea672c1139
6 changed files with 5 additions and 36 deletions

View File

@ -6,7 +6,7 @@
#
cmake_minimum_required(VERSION 3.14)
project(RENAME_ME)
project(Credits)
if(TARGET ${PROJECT_NAME})
message("The ${PROJECT_NAME} arledy included in main Project")
return()

View File

@ -1,6 +1,6 @@
# CMakeProject
Template repository for cmake project
Fork me and replase RENAME_ME to Name of your new project.
Fork me and replase Credits to Name of your new project.
1. Clone this repository
2. Run ./init.sh NewProjectName

View File

@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = RENAME_ME
PROJECT_NAME = Credits
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version

31
init.sh
View File

@ -1,31 +0,0 @@
#!/bin/sh
echo "Project name: $1"
if [ $# -ne 1 ]
then
echo "You call this script wtth wrong arguments."
echo "Example for start script:"
echo "./init.sh MyCmakeProject"
exit 1
fi
REPLACESTRING="s+RENAME_ME+$1+g"
echo $REPLACESTRING
find . -type f -exec sed -i $REPLACESTRING {} +
find . -type f -exec sed -i $REPLACESTRING {} +
#find . -type f -exec sed -i 's+http://example.com+https://example.com+g' {} +
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path
done

View File

@ -18,7 +18,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-DRENAME_ME_LIBRARY)
add_definitions(-DCredits_LIBRARY)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)

View File

@ -52,7 +52,7 @@ void tstMain::unitTests() {
char * argv[] = {nullptr};
QCoreApplication app(argc, argv);
QCoreApplication::setApplicationName("testRENAME_ME");
QCoreApplication::setApplicationName("testCredits");
QCoreApplication::setOrganizationName("QuasarApp");
auto path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);