File tree 7 files changed +49
-0
lines changed
7 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
48
48
49
49
- Do not use -bundle otherwise CMake builds are missing qt-static-initalizers (note this is broken in rustc 1.69)
50
50
- Do not import ` Pin ` in hidden module as invokables are outside now, resolving IDE integration
51
+ - Rust always links against a non-debug Windows runtime with * -msvc targets, so we need to link to MultiThreadedDLL
51
52
52
53
### Removed
53
54
Original file line number Diff line number Diff line change @@ -8,6 +8,14 @@ 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
+ # Note it is best to set this on the command line to ensure all targets are consistent
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
+
11
19
set (CMAKE_AUTOMOC ON )
12
20
set (CMAKE_AUTORCC ON )
13
21
set (CMAKE_CXX_STANDARD 17)
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ 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
+ # Note it is best to set this on the command line to ensure all targets are consistent
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
+
12
20
set (CMAKE_AUTOMOC ON )
13
21
set (CMAKE_AUTORCC ON )
14
22
set (CMAKE_CXX_STANDARD 17)
Original file line number Diff line number Diff line change @@ -10,6 +10,14 @@ 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
+ # Note it is best to set this on the command line to ensure all targets are consistent
15
+ # https://github.com/corrosion-rs/corrosion/blob/master/doc/src/common_issues.md#linking-debug-cc-libraries-into-rust-fails-on-windows-msvc-targets
16
+ # https://github.com/rust-lang/rust/issues/39016
17
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
18
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL" )
19
+ endif ()
20
+
13
21
set (CMAKE_AUTOMOC ON )
14
22
set (CMAKE_AUTORCC ON )
15
23
set (CMAKE_CXX_STANDARD 17)
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ 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
+ # Note it is best to set this on the command line to ensure all targets are consistent
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
+
12
20
# TODO: Add a helper function to our CMake module which automatically
13
21
# handles some of this boilerplate for a "typical" Qt application
14
22
set (CMAKE_AUTOMOC ON )
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ 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
+ # Note it is best to set this on the command line to ensure all targets are consistent
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
+
12
20
# TODO: Add a helper function to our CMake module which automatically
13
21
# handles some of this boilerplate for a "typical" Qt application
14
22
set (CMAKE_AUTOMOC ON )
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ 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
+ # Note it is best to set this on the command line to ensure all targets are consistent
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
+
12
20
# TODO: Add a helper function to our CMake module which automatically
13
21
# handles some of this boilerplate for a "typical" Qt application
14
22
set (CMAKE_AUTOMOC ON )
You can’t perform that action at this time.
0 commit comments