Reorganize fpattern config

This commit is contained in:
Alexander Batalov 2022-05-28 07:59:41 +03:00
parent 119cfe8212
commit 7174cc703d
3 changed files with 11 additions and 3 deletions

View File

@ -243,5 +243,8 @@ target_link_libraries(fallout2-ce
)
add_subdirectory("third_party/fpattern")
target_link_libraries(fallout2-ce ${FPATTERN_LIBRARY})
target_include_directories(fallout2-ce PRIVATE ${FPATTERN_INCLUDE_DIR})
add_subdirectory("third_party/zlib")
add_subdirectory("third_party/sdl2")

View File

@ -1,6 +1,6 @@
#include "dfile.h"
#include "fpattern.h"
#include <fpattern.h>
#include <assert.h>
#include <io.h>

View File

@ -10,10 +10,15 @@ if (NOT fpattern_POPULATED)
FetchContent_Populate(fpattern)
endif()
target_sources(fallout2-ce PUBLIC
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"
)
target_include_directories(fallout2-ce PUBLIC ${fpattern_SOURCE_DIR})
set(FPATTERN_LIBRARY "fpattern" PARENT_SCOPE)
set(FPATTERN_INCLUDE_DIR "${fpattern_SOURCE_DIR}" PARENT_SCOPE)