mirror of
https://github.com/alexbatalov/fallout1-ce.git
synced 2025-12-19 18:06:12 -05:00
Migrate fpattern
This commit is contained in:
@@ -354,8 +354,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory("third_party/fpattern")
|
add_subdirectory("third_party/fpattern")
|
||||||
target_link_libraries(${EXECUTABLE_NAME} ${FPATTERN_LIBRARY})
|
target_link_libraries(${EXECUTABLE_NAME} fpattern::fpattern)
|
||||||
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${FPATTERN_INCLUDE_DIR})
|
|
||||||
|
|
||||||
target_link_libraries(${EXECUTABLE_NAME} ${SDL2_LIBRARIES})
|
target_link_libraries(${EXECUTABLE_NAME} ${SDL2_LIBRARIES})
|
||||||
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
|
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <fpattern.h>
|
#include <fpattern/fpattern.h>
|
||||||
|
|
||||||
#include "platform_compat.h"
|
#include "platform_compat.h"
|
||||||
#include "plib/assoc/assoc.h"
|
#include "plib/assoc/assoc.h"
|
||||||
|
|||||||
30
third_party/fpattern/CMakeLists.txt
vendored
30
third_party/fpattern/CMakeLists.txt
vendored
@@ -1,30 +1,10 @@
|
|||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
FetchContent_Declare(fpattern
|
FetchContent_Declare(fpattern
|
||||||
GIT_REPOSITORY "https://github.com/Loadmaster/fpattern"
|
GIT_REPOSITORY "https://github.com/alexbatalov/fpattern"
|
||||||
GIT_TAG "v1.9"
|
GIT_TAG 8523173ec252c3b796fcdfca0fcc6329642fbbe3 # v1.9
|
||||||
|
GIT_SHALLOW TRUE
|
||||||
|
GIT_PROGRESS TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
FetchContent_GetProperties(fpattern)
|
FetchContent_MakeAvailable(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)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user