mirror of
https://github.com/alexbatalov/fallout2-ce.git
synced 2025-02-22 12:39:53 +00:00
Migrate fpattern (#442)
This commit is contained in:
parent
67375a5857
commit
d586e81827
10
.github/workflows/ci-build.yml
vendored
10
.github/workflows/ci-build.yml
vendored
@ -63,7 +63,7 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: os/android/app/.cxx
|
||||
key: android-cmake-v1
|
||||
key: android-cmake-v2
|
||||
|
||||
- name: Setup signing config
|
||||
if: env.KEYSTORE_FILE_BASE64 != '' && env.KEYSTORE_PROPERTIES_FILE_BASE64 != ''
|
||||
@ -100,7 +100,7 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: ios-cmake-v3
|
||||
key: ios-cmake-v4
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
@ -167,7 +167,7 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: linux-${{ matrix.arch }}-cmake-v1
|
||||
key: linux-${{ matrix.arch }}-cmake-v3
|
||||
|
||||
- name: Configure (x86)
|
||||
if: matrix.arch == 'x86'
|
||||
@ -213,7 +213,7 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: macos-cmake-v5
|
||||
key: macos-cmake-v6
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
@ -265,7 +265,7 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: windows-${{ matrix.arch }}-cmake-v1
|
||||
key: windows-${{ matrix.arch }}-cmake-v2
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
|
@ -361,8 +361,7 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
add_subdirectory("third_party/fpattern")
|
||||
target_link_libraries(${EXECUTABLE_NAME} ${FPATTERN_LIBRARY})
|
||||
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${FPATTERN_INCLUDE_DIR})
|
||||
target_link_libraries(${EXECUTABLE_NAME} fpattern::fpattern)
|
||||
|
||||
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD"))
|
||||
add_subdirectory("third_party/zlib")
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <fpattern.h>
|
||||
#include <fpattern/fpattern.h>
|
||||
|
||||
#include "platform_compat.h"
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <fpattern.h>
|
||||
#include <fpattern/fpattern.h>
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
30
third_party/fpattern/CMakeLists.txt
vendored
30
third_party/fpattern/CMakeLists.txt
vendored
@ -1,30 +1,10 @@
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(fpattern
|
||||
GIT_REPOSITORY "https://github.com/Loadmaster/fpattern"
|
||||
GIT_TAG "v1.9"
|
||||
GIT_REPOSITORY "https://github.com/alexbatalov/fpattern"
|
||||
GIT_TAG 8523173ec252c3b796fcdfca0fcc6329642fbbe3 # v1.9
|
||||
GIT_SHALLOW TRUE
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
|
||||
FetchContent_GetProperties(fpattern)
|
||||
if (NOT fpattern_POPULATED)
|
||||
FetchContent_Populate(fpattern)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
endif()
|
||||
|
||||
add_library(fpattern STATIC
|
||||
"${fpattern_SOURCE_DIR}/debug.h"
|
||||
"${fpattern_SOURCE_DIR}/fpattern.c"
|
||||
"${fpattern_SOURCE_DIR}/fpattern.h"
|
||||
)
|
||||
|
||||
if(NOT WIN32)
|
||||
target_compile_definitions(fpattern PRIVATE
|
||||
"-Dunix"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(FPATTERN_LIBRARY "fpattern" PARENT_SCOPE)
|
||||
set(FPATTERN_INCLUDE_DIR "${fpattern_SOURCE_DIR}" PARENT_SCOPE)
|
||||
FetchContent_MakeAvailable(fpattern)
|
||||
|
Loading…
x
Reference in New Issue
Block a user