File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 17
17
18
18
cmake_minimum_required (VERSION 3.5 )
19
19
20
- cmake_policy (SET CMP0076 NEW ) #target_sources() command converts relative paths to absolute
20
+ cmake_policy (SET CMP0076 NEW ) # target_sources() command converts relative paths to absolute
21
21
22
22
if (CMAKE_VERSION VERSION_LESS 3.21 )
23
23
get_property (not_top DIRECTORY PROPERTY PARENT_DIRECTORY )
@@ -26,6 +26,15 @@ if(CMAKE_VERSION VERSION_LESS 3.21)
26
26
endif ()
27
27
endif ()
28
28
29
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15 )
30
+ # the following only works in top level so there is no need to check
31
+ # PROJECT_IS_TOP_LEVEL which will not work before project() call anyway
32
+ cmake_policy (SET CMP0091 NEW ) # use MSVC_RUNTIME_LIBRARY property
33
+ if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY )
34
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
35
+ endif ()
36
+ endif ()
37
+
29
38
file (READ VERSION SMJNI_VERSION )
30
39
if (NOT SMJNI_VERSION )
31
40
message (FATAL_ERROR "Cannot determine library version (VERSION file not found)" )
You can’t perform that action at this time.
0 commit comments