2022-05-19 08:51:26 +00:00
|
|
|
include(FetchContent)
|
|
|
|
|
|
|
|
FetchContent_Declare(fpattern
|
|
|
|
GIT_REPOSITORY "https://github.com/Loadmaster/fpattern"
|
|
|
|
GIT_TAG "v1.9"
|
|
|
|
)
|
|
|
|
|
|
|
|
FetchContent_GetProperties(fpattern)
|
|
|
|
if (NOT fpattern_POPULATED)
|
|
|
|
FetchContent_Populate(fpattern)
|
|
|
|
endif()
|
|
|
|
|
2022-05-28 04:59:41 +00:00
|
|
|
if(MSVC)
|
|
|
|
set(CMAKE_DEBUG_POSTFIX "d")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(fpattern STATIC
|
2022-05-19 08:51:26 +00:00
|
|
|
"${fpattern_SOURCE_DIR}/debug.h"
|
|
|
|
"${fpattern_SOURCE_DIR}/fpattern.c"
|
|
|
|
"${fpattern_SOURCE_DIR}/fpattern.h"
|
|
|
|
)
|
|
|
|
|
2022-09-01 03:24:01 +00:00
|
|
|
if(NOT WIN32)
|
2022-05-28 11:01:52 +00:00
|
|
|
target_compile_definitions(fpattern PRIVATE
|
|
|
|
"-Dunix"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2022-05-28 04:59:41 +00:00
|
|
|
set(FPATTERN_LIBRARY "fpattern" PARENT_SCOPE)
|
|
|
|
set(FPATTERN_INCLUDE_DIR "${fpattern_SOURCE_DIR}" PARENT_SCOPE)
|