Skip to content

Commit 964e894

Browse files
committed
fix: MSVC_RUNTIME_LIBRARY may not work for FetchContent dependencies
1 parent b5a162a commit 964e894

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ MouseClickDrag, Left, 5, 5, 150, 50</pre></td>
100100
```
101101
vcpkg install detours rapidjson --triplet=x64-windows-static
102102
```
103-
CMake:
103+
CMake (or open the directory with Visual Studio and config it manually):
104104
```
105105
mkdir build
106106
cd build

Simulator/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.15)
22

33
project(IbInputSimulator)
44

5+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
6+
57
# IbWinCppLib
68
include(FetchContent)
79
FetchContent_Declare(IbWinCpp
@@ -25,9 +27,6 @@ set(sourceFiles
2527
)
2628
list(TRANSFORM sourceFiles PREPEND source/)
2729
add_library(IbInputSimulator SHARED ${sourceFiles})
28-
set_property(TARGET IbInputSimulator PROPERTY
29-
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
30-
)
3130
target_compile_features(IbInputSimulator PUBLIC cxx_std_20)
3231
target_compile_definitions(IbInputSimulator PRIVATE IB_INPUT_DLLEXPORT)
3332

0 commit comments

Comments
 (0)