Files
filament/third_party/civetweb/cmake/check/patch.cmake
Philip Rideout 6d74d31ecd Add civetweb to third_party (MIT).
This is a dependency of our upcoming web-based material debugger. This
CL also includes `tnt/CMakeLists.txt`, which builds a static lib in a
minimal configuration that enables WebSocket support. The entire library
is built from only 4 files:

    ${PUBLIC_HDR_DIR}/CivetServer.h
    ${PUBLIC_HDR_DIR}/civetweb.h
    ${SRC_DIR}/civetweb.c
    ${SRC_DIR}/CivetServer.cpp
2019-08-21 17:45:37 -07:00

13 lines
593 B
CMake

message(STATUS "Patching check ${VERSION} ${SOURCE_DIR}")
# Patch checks for MinGW
# https://sourceforge.net/p/check/patches/53/
set(CMAKE_LISTS_LOCATION "${SOURCE_DIR}/CMakeLists.txt")
file(READ ${CMAKE_LISTS_LOCATION} CMAKE_LISTS)
string(REGEX REPLACE
"(check_type_size\\((clock|clockid|timer)_t [A-Z_]+\\)[\r\n]+[^\r\n]+[\r\n]+[^\r\n]+[\r\n]+endif\\(NOT HAVE[A-Z_]+\\))"
"set(CMAKE_EXTRA_INCLUDE_FILES time.h)\n\\1\nunset(CMAKE_EXTRA_INCLUDE_FILES)"
CMAKE_LISTS "${CMAKE_LISTS}")
file(WRITE ${CMAKE_LISTS_LOCATION} "${CMAKE_LISTS}")
message(STATUS "Patched ${CMAKE_LISTS_LOCATION}")