This commit is contained in:
parent
34c1a92f0b
commit
8f56ae11b5
1 changed files with 17 additions and 5 deletions
|
|
@ -7,23 +7,25 @@ if [ "$#" -ne 1 ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
#git init .
|
||||
#git submodule add git@bitbucket.org:lisyarus/psemek.git
|
||||
#git submodule update --init --recursive
|
||||
git init .
|
||||
git submodule add git@git.lisyarus.dev:lisyarus/psemek.git
|
||||
git submodule update --init --recursive
|
||||
|
||||
mkdir -p source include/${1}
|
||||
|
||||
cat > .gitignore << EOF
|
||||
.gitignore
|
||||
.qtcreator
|
||||
build
|
||||
package
|
||||
CMakeLists.txt.user
|
||||
EOF
|
||||
|
||||
cat > CMakeLists.txt << EOF
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(${1})
|
||||
|
||||
set(TARGET_NAME ${1})
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(PSEMEK_EXAMPLES OFF)
|
||||
|
||||
|
|
@ -35,7 +37,17 @@ add_subdirectory(psemek)
|
|||
file(GLOB_RECURSE ${1^^}_SOURCES LIST_DIRECTORIES FALSE "\${CMAKE_CURRENT_SOURCE_DIR}/source/*")
|
||||
file(GLOB_RECURSE ${1^^}_HEADERS LIST_DIRECTORIES FALSE "\${CMAKE_CURRENT_SOURCE_DIR}/include/*")
|
||||
|
||||
psemek_add_application(${1} \${${1^^}_SOURCES} \${${1^^}_HEADERS})
|
||||
psemek_add_application(\${TARGET_NAME} \${${1^^}_SOURCES} \${${1^^}_HEADERS})
|
||||
if(TARGET \${TARGET_NAME})
|
||||
target_include_directories(\${TARGET_NAME} PUBLIC "\${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
|
||||
if(PSEMEK_PLATFORM_WEB)
|
||||
# Required by itch.io
|
||||
set_target_properties(\${TARGET_NAME} PROPERTIES
|
||||
OUTPUT_NAME "index"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
EOF
|
||||
|
||||
cat > source/application.cpp << EOF
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue