From a3d264d1b5c992968e1dbbc50345fc38e1e7194e Mon Sep 17 00:00:00 2001 From: Patrix Date: Thu, 25 Aug 2022 11:57:02 +0200 Subject: [PATCH] Updated .gitlab-ci.yml: - using variables instead of implicit constants - windows release files will now be stored in root directory of zip --- .gitlab-ci.yml | 32 ++++++++++++++++---------------- CMakeLists.txt | 18 +++++++++--------- dependencies/CMakeLists.txt | 4 ++-- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 621856f..271bc9a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,9 +19,9 @@ build:windows: matrix: - TOOLCHAIN: [windows-x86, windows-x64] artifacts: - name: sqmodule + name: $CI_PROJECT_NAME paths: - - Release/sqmodule.*.dll + - Release/$CI_PROJECT_NAME.*.dll expire_in: never reports: dotenv: job.env @@ -39,9 +39,9 @@ build:linux: matrix: - TOOLCHAIN: [linux-x86, linux-x64, linux-arm, linux-arm64] artifacts: - name: sqmodule + name: $CI_PROJECT_NAME paths: - - sqmodule.* + - $CI_PROJECT_NAME.* expire_in: never reports: dotenv: job.env @@ -64,22 +64,22 @@ release: description: "./CHANGELOG.md" assets: links: - - name: "sqmodule.x86.dll" - url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$windows_x86_JOB_ID/artifacts/download" + - name: "$CI_PROJECT_NAME.x86.dll" + url: "$CI_PROJECT_URL/-/jobs/$windows_x86_JOB_ID/artifacts/download" link_type: "package" - - name: "sqmodule.x64.dll" - url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$windows_x64_JOB_ID/artifacts/download" + - name: "$CI_PROJECT_NAME.x64.dll" + url: "$CI_PROJECT_URL/-/jobs/$windows_x64_JOB_ID/artifacts/download" link_type: "package" - - name: "sqmodule.x86.so" - url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$linux_x86_JOB_ID/artifacts/download" + - name: "$CI_PROJECT_NAME.x86.so" + url: "$CI_PROJECT_URL/-/jobs/$linux_x86_JOB_ID/artifacts/download" link_type: "package" - - name: "sqmodule.x64.so" - url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$linux_x64_JOB_ID/artifacts/download" + - name: "$CI_PROJECT_NAME.x64.so" + url: "$CI_PROJECT_URL/-/jobs/$linux_x64_JOB_ID/artifacts/download" link_type: "package" - - name: "sqmodule.arm.so" - url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$linux_arm_JOB_ID/artifacts/download" + - name: "$CI_PROJECT_NAME.arm.so" + url: "$CI_PROJECT_URL/-/jobs/$linux_arm_JOB_ID/artifacts/download" link_type: "package" - - name: "sqmodule.arm64.so" - url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$linux_arm64_JOB_ID/artifacts/download" + - name: "$CI_PROJECT_NAME.arm64.so" + url: "$CI_PROJECT_URL/-/jobs/$linux_arm64_JOB_ID/artifacts/download" link_type: "package" diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f43139..c24ebb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.17) -project(SqModule) +project(squirrel-template) option(INSTALL_AFTER_BUILD "Run cmake --install separately for every target after each build. By default this option is set to OFF" OFF) @@ -17,10 +17,10 @@ file(GLOB SRC "src/sqmain.cpp" ) -add_library(SqModule SHARED ${SRC}) -target_precompile_headers(SqModule PRIVATE "src/pch.h") +add_library(squirrel-template SHARED ${SRC}) +target_precompile_headers(squirrel-template PRIVATE "src/pch.h") -target_include_directories(SqModule +target_include_directories(squirrel-template INTERFACE "include/" PRIVATE @@ -30,7 +30,7 @@ target_include_directories(SqModule add_subdirectory(dependencies) if(DEFINED SHARED_LIBRARY_SUFFIX) - set_target_properties(SqModule + set_target_properties(squirrel-template PROPERTIES PREFIX "" SUFFIX ".${SHARED_LIBRARY_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}" @@ -38,14 +38,14 @@ if(DEFINED SHARED_LIBRARY_SUFFIX) endif() if (NOT ${GAME_PATH} STREQUAL "") - install(TARGETS SqModule + install(TARGETS squirrel-template RUNTIME DESTINATION ${GAME_PATH} COMPONENT "clientModule" ) if(INSTALL_AFTER_BUILD) - add_custom_command(TARGET SqModule + add_custom_command(TARGET squirrel-template POST_BUILD COMMAND ${CMAKE_COMMAND} --install ${CMAKE_CURRENT_BINARY_DIR} --component "clientModule" ) @@ -53,14 +53,14 @@ if (NOT ${GAME_PATH} STREQUAL "") endif() if (NOT ${SERVER_PATH} STREQUAL "") - install(TARGETS SqModule + install(TARGETS squirrel-template RUNTIME DESTINATION ${SERVER_PATH} COMPONENT "serverModule" ) if(INSTALL_AFTER_BUILD) - add_custom_command(TARGET SqModule + add_custom_command(TARGET squirrel-template POST_BUILD COMMAND ${CMAKE_COMMAND} --install ${CMAKE_CURRENT_BINARY_DIR} --component "serverModule" ) diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt index 6ba1899..cc8375a 100644 --- a/dependencies/CMakeLists.txt +++ b/dependencies/CMakeLists.txt @@ -1,5 +1,5 @@ add_subdirectory(squirrel) add_subdirectory(sqrat) -target_link_libraries(SqModule PUBLIC Squirrel) -target_link_libraries(SqModule PUBLIC SqRat) \ No newline at end of file +target_link_libraries(squirrel-template PUBLIC Squirrel) +target_link_libraries(squirrel-template PUBLIC SqRat) \ No newline at end of file