summaryrefslogtreecommitdiff
path: root/source/luametatex/cmake
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2023-03-06 15:17:09 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2023-03-06 15:17:09 +0100
commite12b4fabeb0ce3ce6d256b54250cf38a8f940561 (patch)
treeb574cb45fe8a416e60c912a8e2d754abdad3b63c /source/luametatex/cmake
parent23b5ef45e7939a00addff726d02d6c29243177af (diff)
downloadcontext-e12b4fabeb0ce3ce6d256b54250cf38a8f940561.tar.gz
2023-03-06 14:47:00
Diffstat (limited to 'source/luametatex/cmake')
-rw-r--r--source/luametatex/cmake/luametatex.cmake10
-rw-r--r--source/luametatex/cmake/mingw-64-ucrt.cmake14
2 files changed, 21 insertions, 3 deletions
diff --git a/source/luametatex/cmake/luametatex.cmake b/source/luametatex/cmake/luametatex.cmake
index 396b33d5a..eabef915b 100644
--- a/source/luametatex/cmake/luametatex.cmake
+++ b/source/luametatex/cmake/luametatex.cmake
@@ -25,9 +25,13 @@ target_link_libraries(luametatex
miniz
)
-target_link_libraries(luametatex
- ${CMAKE_DL_LIBS}
-)
+if (LUAMETATEX_NOLDL)
+ # mingw ucrt
+else()
+ target_link_libraries(luametatex
+ ${CMAKE_DL_LIBS}
+ )
+endif()
install(TARGETS luametatex
EXPORT luametatex
diff --git a/source/luametatex/cmake/mingw-64-ucrt.cmake b/source/luametatex/cmake/mingw-64-ucrt.cmake
new file mode 100644
index 000000000..c5f3915ff
--- /dev/null
+++ b/source/luametatex/cmake/mingw-64-ucrt.cmake
@@ -0,0 +1,14 @@
+# if (NOT __MINGW64_TOOLCHAIN_)
+# add_compile_options(-DLUASOCKET_INET_PTON)
+# endif()
+
+set(CMAKE_SYSTEM_NAME Windows)
+set(TOOLCHAIN_PREFIX x86_64-w64-mingw32ucrt)
+set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
+
+add_compile_options(-mtune=nocona)
+
+set(LUAMETATEX_MINGW 64)
+set(LUAMETATEX_NOLDL 1)
+
+# set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc")