summaryrefslogtreecommitdiff
path: root/source/luametatex/cmake
diff options
context:
space:
mode:
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")