File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 22
22
set (JSONCPP_CMAKE_POLICY_VERSION "${JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION} " )
23
23
endif ()
24
24
cmake_policy (VERSION ${JSONCPP_CMAKE_POLICY_VERSION} )
25
+ if (POLICY CMP0091)
26
+ cmake_policy (SET CMP0091 NEW)
27
+ endif ()
25
28
#
26
29
# Now enumerate specific policies newer than JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION
27
30
# that may need to be individually set to NEW/OLD
@@ -85,6 +88,7 @@ option(JSONCPP_WITH_STRICT_ISO "Issue all the warnings demanded by strict ISO C
85
88
option (JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON )
86
89
option (JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" ON )
87
90
option (JSONCPP_WITH_EXAMPLE "Compile JsonCpp example" OFF )
91
+ option (JSONCPP_STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime" OFF )
88
92
option (BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." ON )
89
93
option (BUILD_STATIC_LIBS "Build jsoncpp_lib as a static library." ON )
90
94
option (BUILD_OBJECT_LIBS "Build jsoncpp_lib as a object library." ON )
@@ -123,6 +127,9 @@ if(MSVC)
123
127
# Only enabled in debug because some old versions of VS STL generate
124
128
# unreachable code warning when compiled in release configuration.
125
129
add_compile_options ($<$<CONFIG:Debug>:/W4>)
130
+ if (JSONCPP_STATIC_WINDOWS_RUNTIME)
131
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
132
+ endif ()
126
133
endif ()
127
134
128
135
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
You can’t perform that action at this time.
0 commit comments