From 7d67c3495f5b6e8893c06f6949ce3b59266ca33e Mon Sep 17 00:00:00 2001 From: DRC Date: Fri, 26 Jan 2024 10:34:04 -0500 Subject: [PATCH] Build/Win: Report CMAKE_MSVC_RUNTIME_LIBRARY value ... when using CMake 3.15+ --- CMakeLists.txt | 2 ++ sharedlib/CMakeLists.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d423c563..3c5607b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -385,6 +385,7 @@ if(MSVC) option(WITH_CRT_DLL "Link all ${CMAKE_PROJECT_NAME} libraries and executables with the C run-time DLL (msvcr*.dll) instead of the static C run-time library (libcmt*.lib.) The default is to use the C run-time DLL only with the libraries and executables that need it." FALSE) + boolean_number(WITH_CRT_DLL) if(NOT WITH_CRT_DLL) # Use the static C library for all build types if(CMAKE_VERSION VERSION_EQUAL "3.15" OR @@ -394,6 +395,7 @@ if(MSVC) else() set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded) endif() + message(STATUS "Visual C++ run-time library: ${CMAKE_MSVC_RUNTIME_LIBRARY} (WITH_CRT_DLL = ${WITH_CRT_DLL})") else() foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt index d10b8ac8..449b1848 100644 --- a/sharedlib/CMakeLists.txt +++ b/sharedlib/CMakeLists.txt @@ -18,6 +18,7 @@ if(MSVC) else() set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL) endif() + message(STATUS "Visual C++ run-time library for libjpeg API DLL: ${CMAKE_MSVC_RUNTIME_LIBRARY}") else() foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)