File tree 6 files changed +42
-0
lines changed
6 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ cmake_minimum_required(VERSION 3.24)
8
8
project (demo_threading)
9
9
set (APP_NAME ${PROJECT_NAME} )
10
10
11
+ # Rust always links against non-debug Windows runtime on *-msvc targets
12
+ # https://github.com/corrosion-rs/corrosion/blob/master/doc/src/common_issues.md#linking-debug-cc-libraries-into-rust-fails-on-windows-msvc-targets
13
+ # https://github.com/rust-lang/rust/issues/39016
14
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
15
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL" )
16
+ endif ()
17
+
11
18
set (CMAKE_AUTOMOC ON )
12
19
set (CMAKE_AUTORCC ON )
13
20
set (CMAKE_CXX_STANDARD 17)
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ cmake_minimum_required(VERSION 3.24)
9
9
project (example_qml_features)
10
10
set (APP_NAME ${PROJECT_NAME} )
11
11
12
+ # Rust always links against non-debug Windows runtime on *-msvc targets
13
+ # https://github.com/corrosion-rs/corrosion/blob/master/doc/src/common_issues.md#linking-debug-cc-libraries-into-rust-fails-on-windows-msvc-targets
14
+ # https://github.com/rust-lang/rust/issues/39016
15
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
16
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL" )
17
+ endif ()
18
+
12
19
set (CMAKE_AUTOMOC ON )
13
20
set (CMAKE_AUTORCC ON )
14
21
set (CMAKE_CXX_STANDARD 17)
Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ cmake_minimum_required(VERSION 3.24)
10
10
project (example_qml_minimal)
11
11
set (APP_NAME ${PROJECT_NAME} )
12
12
13
+ # Rust always links against non-debug Windows runtime on *-msvc targets
14
+ # https://github.com/corrosion-rs/corrosion/blob/master/doc/src/common_issues.md#linking-debug-cc-libraries-into-rust-fails-on-windows-msvc-targets
15
+ # https://github.com/rust-lang/rust/issues/39016
16
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
17
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL" )
18
+ endif ()
19
+
13
20
set (CMAKE_AUTOMOC ON )
14
21
set (CMAKE_AUTORCC ON )
15
22
set (CMAKE_CXX_STANDARD 17)
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ cmake_minimum_required(VERSION 3.24)
9
9
project (tests_basic_cxx_only)
10
10
set (APP_NAME ${PROJECT_NAME} )
11
11
12
+ # Rust always links against non-debug Windows runtime on *-msvc targets
13
+ # https://github.com/corrosion-rs/corrosion/blob/master/doc/src/common_issues.md#linking-debug-cc-libraries-into-rust-fails-on-windows-msvc-targets
14
+ # https://github.com/rust-lang/rust/issues/39016
15
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
16
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL" )
17
+ endif ()
18
+
12
19
# TODO: Add a helper function to our CMake module which automatically
13
20
# handles some of this boilerplate for a "typical" Qt application
14
21
set (CMAKE_AUTOMOC ON )
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ cmake_minimum_required(VERSION 3.24)
9
9
project (tests_basic_cxx_qt)
10
10
set (APP_NAME ${PROJECT_NAME} )
11
11
12
+ # Rust always links against non-debug Windows runtime on *-msvc targets
13
+ # https://github.com/corrosion-rs/corrosion/blob/master/doc/src/common_issues.md#linking-debug-cc-libraries-into-rust-fails-on-windows-msvc-targets
14
+ # https://github.com/rust-lang/rust/issues/39016
15
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
16
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL" )
17
+ endif ()
18
+
12
19
# TODO: Add a helper function to our CMake module which automatically
13
20
# handles some of this boilerplate for a "typical" Qt application
14
21
set (CMAKE_AUTOMOC ON )
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ cmake_minimum_required(VERSION 3.24)
9
9
project (tests_qt_types_standalone)
10
10
set (APP_NAME ${PROJECT_NAME} )
11
11
12
+ # Rust always links against non-debug Windows runtime on *-msvc targets
13
+ # https://github.com/corrosion-rs/corrosion/blob/master/doc/src/common_issues.md#linking-debug-cc-libraries-into-rust-fails-on-windows-msvc-targets
14
+ # https://github.com/rust-lang/rust/issues/39016
15
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
16
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL" )
17
+ endif ()
18
+
12
19
# TODO: Add a helper function to our CMake module which automatically
13
20
# handles some of this boilerplate for a "typical" Qt application
14
21
set (CMAKE_AUTOMOC ON )
You can’t perform that action at this time.
0 commit comments