Allow the executables and libraries outside of the sharedlib/ directory to be linked against msvcr*.dll instead of libcmt*.lib. This is reported to be necessary when building libjpeg-turbo for use with C#.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1539 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -119,6 +119,10 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
option(WITH_CRT_DLL
|
||||||
|
"Link all libjpeg-turbo 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)
|
||||||
|
if(NOT WITH_CRT_DLL)
|
||||||
# Use the static C library for all build types
|
# Use the static C library for all build types
|
||||||
foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||||
@@ -126,7 +130,7 @@ if(MSVC)
|
|||||||
string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}")
|
string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
endif()
|
||||||
add_definitions(-W3 -wd4996)
|
add_definitions(-W3 -wd4996)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user