mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 14:25:44 +08:00
Add a build option to link with the static CRT (#343)
LUAU_STATIC_CRT CMake option can be set externally (requires CMake 3.15+)
This commit is contained in:
parent
7ffb5fc4fd
commit
324bc4b01d
@ -5,13 +5,20 @@ if(EXT_PLATFORM_STRING)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(Luau LANGUAGES CXX C)
|
|
||||||
|
|
||||||
option(LUAU_BUILD_CLI "Build CLI" ON)
|
option(LUAU_BUILD_CLI "Build CLI" ON)
|
||||||
option(LUAU_BUILD_TESTS "Build tests" ON)
|
option(LUAU_BUILD_TESTS "Build tests" ON)
|
||||||
option(LUAU_BUILD_WEB "Build Web module" OFF)
|
option(LUAU_BUILD_WEB "Build Web module" OFF)
|
||||||
option(LUAU_WERROR "Warnings as errors" OFF)
|
option(LUAU_WERROR "Warnings as errors" OFF)
|
||||||
|
option(LUAU_STATIC_CRT "Link with the static CRT (/MT)" OFF)
|
||||||
|
|
||||||
|
if(LUAU_STATIC_CRT)
|
||||||
|
cmake_minimum_required(VERSION 3.15)
|
||||||
|
cmake_policy(SET CMP0091 NEW)
|
||||||
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
project(Luau LANGUAGES CXX C)
|
||||||
add_library(Luau.Ast STATIC)
|
add_library(Luau.Ast STATIC)
|
||||||
add_library(Luau.Compiler STATIC)
|
add_library(Luau.Compiler STATIC)
|
||||||
add_library(Luau.Analysis STATIC)
|
add_library(Luau.Analysis STATIC)
|
||||||
|
Loading…
Reference in New Issue
Block a user