Skip to content

Commit

Permalink
Merge pull request #114 from tcsabina/master
Browse files Browse the repository at this point in the history
Using the shared qwprot repository
  • Loading branch information
tcsabina authored Jan 18, 2023
2 parents 23c99b9 + e07cf7a commit 84ac3a4
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 621 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-and-deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ jobs:
ext: ".exe"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Prepare Build Environemnt
shell: bash
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build-and-deploy-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ jobs:
ext: ".exe"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Prepare Build Environemnt
shell: bash
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build-targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ jobs:
ext: ".exe"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Prepare Build Environemnt
shell: bash
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/qwprot"]
path = src/qwprot
url = https://github.com/QW-Group/qwprot.git
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ set(CMAKE_VERBOSE_MAKEFILE ON)
project(mvdsv C)


######################################################################################################

# Checkout shared qwprot repository
find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE)
message(STATUS "Submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
endif()
endif()


######################################################################################################

# Set where sources located.
Expand Down Expand Up @@ -126,6 +144,7 @@ set_target_properties(${PROJECT_NAME}
######################################################################################################

# Set include directories
target_include_directories(${PROJECT_NAME} PRIVATE ${DIR_SRC}/qwprot/src)
target_include_directories(${PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIRS})
target_include_directories(${PROJECT_NAME} PRIVATE ${PCRE_INCLUDE_DIR})

Expand All @@ -148,6 +167,9 @@ endif()
# Set defines for the build
target_compile_definitions(${PROJECT_NAME} PRIVATE SERVERONLY)
target_compile_definitions(${PROJECT_NAME} PRIVATE USE_PR2)
target_compile_definitions(${PROJECT_NAME} PRIVATE MVD_PEXT1_SERVERSIDEWEAPON)
target_compile_definitions(${PROJECT_NAME} PRIVATE MVD_PEXT1_SERVERSIDEWEAPON2)
target_compile_definitions(${PROJECT_NAME} PRIVATE FTE_PEXT2_VOICECHAT)

include (TestBigEndian)
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
Expand Down
Loading

0 comments on commit 84ac3a4

Please sign in to comment.