Skip to content

Commit 84ac3a4

Browse files
authored
Merge pull request #114 from tcsabina/master
Using the shared qwprot repository
2 parents 23c99b9 + e07cf7a commit 84ac3a4

File tree

8 files changed

+38
-621
lines changed

8 files changed

+38
-621
lines changed

.github/workflows/build-and-deploy-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ jobs:
4747
ext: ".exe"
4848
steps:
4949
- name: Checkout
50-
uses: actions/checkout@v2
50+
uses: actions/checkout@v3
51+
with:
52+
submodules: true
5153
- name: Prepare Build Environemnt
5254
shell: bash
5355
run: |

.github/workflows/build-and-deploy-snapshot.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545
ext: ".exe"
4646
steps:
4747
- name: Checkout
48-
uses: actions/checkout@v2
48+
uses: actions/checkout@v3
49+
with:
50+
submodules: true
4951
- name: Prepare Build Environemnt
5052
shell: bash
5153
run: |

.github/workflows/build-targets.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545
ext: ".exe"
4646
steps:
4747
- name: Checkout
48-
uses: actions/checkout@v2
48+
uses: actions/checkout@v3
49+
with:
50+
submodules: true
4951
- name: Prepare Build Environemnt
5052
shell: bash
5153
run: |

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/qwprot"]
2+
path = src/qwprot
3+
url = https://github.com/QW-Group/qwprot.git

CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ set(CMAKE_VERBOSE_MAKEFILE ON)
66
project(mvdsv C)
77

88

9+
######################################################################################################
10+
11+
# Checkout shared qwprot repository
12+
find_package(Git QUIET)
13+
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
14+
option(GIT_SUBMODULE "Check submodules during build" ON)
15+
if(GIT_SUBMODULE)
16+
message(STATUS "Submodule update")
17+
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
18+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
19+
RESULT_VARIABLE GIT_SUBMOD_RESULT)
20+
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
21+
message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
22+
endif()
23+
endif()
24+
endif()
25+
26+
927
######################################################################################################
1028

1129
# Set where sources located.
@@ -126,6 +144,7 @@ set_target_properties(${PROJECT_NAME}
126144
######################################################################################################
127145

128146
# Set include directories
147+
target_include_directories(${PROJECT_NAME} PRIVATE ${DIR_SRC}/qwprot/src)
129148
target_include_directories(${PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIRS})
130149
target_include_directories(${PROJECT_NAME} PRIVATE ${PCRE_INCLUDE_DIR})
131150

@@ -148,6 +167,9 @@ endif()
148167
# Set defines for the build
149168
target_compile_definitions(${PROJECT_NAME} PRIVATE SERVERONLY)
150169
target_compile_definitions(${PROJECT_NAME} PRIVATE USE_PR2)
170+
target_compile_definitions(${PROJECT_NAME} PRIVATE MVD_PEXT1_SERVERSIDEWEAPON)
171+
target_compile_definitions(${PROJECT_NAME} PRIVATE MVD_PEXT1_SERVERSIDEWEAPON2)
172+
target_compile_definitions(${PROJECT_NAME} PRIVATE FTE_PEXT2_VOICECHAT)
151173

152174
include (TestBigEndian)
153175
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)

0 commit comments

Comments
 (0)