MinGW links the MSVC CRT rather than glibc, thus memmem() is not available.  It appears that an alternative is already provided in src/common.h, but this is never used when building through CMake as cmakeconfig.h.in #defines HAVE_MEMMEM as 1 in all cases.

CMake has a utility which easily resolves this issue:

In CMakeLists.txt:
```
include(CheckSymbolExists)
check_symbol_exists("memmem" "string.h" HAVE_MEMMEM)
```

In cmakeconfig.h.in:
```
/* Define if you have the `memmem' function. */
#cmakedefine HAVE_MEMMEM
```
CMake build issue: MinGW does not support memmem()
This is a GitHub Issue
repo:libredwg
owner:LibreDWG
Title : CMake build issue: MinGW does not support memmem()
Issue date:

--- start body ---
MinGW links the MSVC CRT rather than glibc, thus memmem() is not available.  It appears that an alternative is already provided in src/common.h, but this is never used when building through CMake as cmakeconfig.h.in #defines HAVE_MEMMEM as 1 in all cases.

CMake has a utility which easily resolves this issue:

In CMakeLists.txt:
```
include(CheckSymbolExists)
check_symbol_exists("memmem" "string.h" HAVE_MEMMEM)
```

In cmakeconfig.h.in:
```
/* Define if you have the `memmem' function. */
#cmakedefine HAVE_MEMMEM
```
--- end body ---
