File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2222 set (JSONCPP_CMAKE_POLICY_VERSION "${JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION} " )
2323endif ()
2424cmake_policy (VERSION ${JSONCPP_CMAKE_POLICY_VERSION} )
25+ if (POLICY CMP0091)
26+ cmake_policy (SET CMP0091 NEW)
27+ endif ()
2528#
2629# Now enumerate specific policies newer than JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION
2730# 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
8588option (JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON )
8689option (JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" ON )
8790option (JSONCPP_WITH_EXAMPLE "Compile JsonCpp example" OFF )
91+ option (JSONCPP_STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime" OFF )
8892option (BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." ON )
8993option (BUILD_STATIC_LIBS "Build jsoncpp_lib as a static library." ON )
9094option (BUILD_OBJECT_LIBS "Build jsoncpp_lib as a object library." ON )
@@ -123,6 +127,9 @@ if(MSVC)
123127 # Only enabled in debug because some old versions of VS STL generate
124128 # unreachable code warning when compiled in release configuration.
125129 add_compile_options ($<$<CONFIG:Debug>:/W4>)
130+ if (JSONCPP_STATIC_WINDOWS_RUNTIME)
131+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
132+ endif ()
126133endif ()
127134
128135if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
You can’t perform that action at this time.
0 commit comments