Add project files (part 1/2)
Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
1 parent
3721eaecb2
commit
73baf8d02d
274 files changed
+83593
No files matched your search
@@ -0,0 +1,26 @@
|
||||
# Cross-compile the Windows DLL from Linux / macOS with clang-cl + lld-link.
|
||||
# No Windows SDK is needed: the code declares the few Win32 / UCRT functions it uses itself and links against
|
||||
# import libraries that CMakeLists.txt generates from cmake/imports/*.def (llvm-dlltool).
|
||||
#
|
||||
# cmake -S . -B build/cmake -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-windows-clang-cl.cmake
|
||||
# cmake --build build/cmake -> build/cmake/slinky.dll
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR AMD64)
|
||||
set(CMAKE_C_COMPILER clang-cl)
|
||||
set(CMAKE_CXX_COMPILER clang-cl)
|
||||
set(CMAKE_C_COMPILER_TARGET x86_64-pc-windows-msvc)
|
||||
set(CMAKE_CXX_COMPILER_TARGET x86_64-pc-windows-msvc)
|
||||
set(CMAKE_LINKER lld-link)
|
||||
set(CMAKE_AR llvm-lib)
|
||||
set(CMAKE_RC_COMPILER llvm-rc)
|
||||
# the compiler check must not need the SDK's libraries
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
# the flags the engine code was verified with are set explicitly in CMakeLists.txt: drop CMake's MSVC defaults
|
||||
# (/EHsc, /GR, /MD, /O2 /Ob2 /DNDEBUG ...)
|
||||
set(CMAKE_C_FLAGS_INIT "")
|
||||
set(CMAKE_CXX_FLAGS_INIT "")
|
||||
set(CMAKE_C_FLAGS_RELEASE_INIT "")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT "")
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "")
|
||||
set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
|
||||
Reference in new issue
Block a user