diff options
| author | ruki <[email protected]> | 2021-09-28 00:53:32 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-09-28 00:53:32 +0800 |
| commit | 64b17a551574c998fd9fce3f902bf6718ae11954 (patch) | |
| tree | f06f7971774d2c5cc0488ed2894549b704f9ab08 /xmake/plugins | |
| parent | af03b0768205a1f9c7430f6e2a20e85811a13c4a (diff) | |
improve cmakelists generator
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index 02abd56d7..44ad8d3c2 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -73,6 +73,9 @@ function _add_project(cmakelists) ]], project.name() or "") cmakelists:print("# project") cmakelists:print("cmake_minimum_required(VERSION %s)", _get_cmake_minver()) + -- see https://github.com/xmake-io/xmake/issues/1661#issuecomment-927951660 + cmakelists:print("cmake_policy(SET CMP0091 NEW)") + cmakelists:print('set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")') local project_name = project.name() if not project_name then for _, target in pairs(project.targets()) do |
