fallout2-ce/third_party/fpattern/CMakeLists.txt

31 lines
648 B
CMake
Raw Permalink Normal View History

2022-05-19 01:51:26 -07: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-27 21:59:41 -07:00
if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
endif()
add_library(fpattern STATIC
2022-05-19 01:51:26 -07:00
"${fpattern_SOURCE_DIR}/debug.h"
"${fpattern_SOURCE_DIR}/fpattern.c"
"${fpattern_SOURCE_DIR}/fpattern.h"
)
2022-08-31 20:24:01 -07:00
if(NOT WIN32)
target_compile_definitions(fpattern PRIVATE
"-Dunix"
)
endif()
2022-05-27 21:59:41 -07:00
set(FPATTERN_LIBRARY "fpattern" PARENT_SCOPE)
set(FPATTERN_INCLUDE_DIR "${fpattern_SOURCE_DIR}" PARENT_SCOPE)