CMake: Rename MSVC_USE_STATIC_CRT to EXPAT_MSVC_STATIC_CRT

This commit is contained in:
Sebastian Pipping 2019-08-30 21:24:29 +02:00
parent 0eb711e9b6
commit 4b214610e2
3 changed files with 10 additions and 10 deletions

View File

@ -66,7 +66,7 @@ option(XML_ATTR_INFO "Define to allow retrieving the byte offsets for attribute
option(XML_LARGE_SIZE "Make XML_GetCurrent* functions return <(unsigned) long long> rather than <(unsigned) long>" OFF)
option(XML_MIN_SIZE "Get a smaller (but slower) parser (in particular avoid multiple copies of the tokenizer)" OFF)
if(MSVC)
set(MSVC_USE_STATIC_CRT OFF CACHE BOOL "Use /MT flag (static CRT) when compiling in MSVC")
set(EXPAT_MSVC_STATIC_CRT OFF CACHE BOOL "Use /MT flag (static CRT) when compiling in MSVC")
endif()
#
@ -169,8 +169,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_COMPILE_FLAGS}")
if (MSVC)
if (MSVC_USE_STATIC_CRT)
message("-- Using static CRT ${MSVC_USE_STATIC_CRT}")
if (EXPAT_MSVC_STATIC_CRT)
message("-- Using static CRT ${EXPAT_MSVC_STATIC_CRT}")
foreach(flag_var
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
@ -196,7 +196,7 @@ if(WIN32)
endif()
if(NOT BUILD_shared)
if(MSVC_USE_STATIC_CRT)
if(EXPAT_MSVC_STATIC_CRT)
set(_POSTFIX_CRT "MT")
else()
set(_POSTFIX_CRT "MD")
@ -440,7 +440,7 @@ message(STATUS " Prefix ..................... ${CMAKE_INSTALL_PREFIX}")
message(STATUS " Build type ................. ${CMAKE_BUILD_TYPE}")
message(STATUS " Shared libraries ........... ${BUILD_shared}")
if(WIN32)
message(STATUS " Static CRT ................. ${MSVC_USE_STATIC_CRT}")
message(STATUS " Static CRT ................. ${EXPAT_MSVC_STATIC_CRT}")
endif()
message(STATUS " Character type ............. ${_EXPAT_CHAR_TYPE}")
if(WIN32)

View File

@ -46,7 +46,7 @@ Expat can be built on Windows in two ways:
The "w" indicates the UTF-16 version of the library.
Versions that are statically linking with the multi-threaded run-time library
can be built with -DMSVC_USE_STATIC_CRT=ON.
can be built with -DEXPAT_MSVC_STATIC_CRT=ON.
Static Linking: (through -DBUILD_shared=OFF)

View File

@ -43,7 +43,7 @@ MD %BINDIR% || EXIT /b 1
MD build_shared_char || EXIT /b 1
CD build_shared_char || EXIT /b 1
cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DMSVC_USE_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF .. || EXIT /b 1
cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF .. || EXIT /b 1
msbuild /m expat.sln || EXIT /b 1
DIR %CONFIGURATION% || EXIT /b 1
CD .. || EXIT /b 1
@ -53,7 +53,7 @@ COPY build_shared_char\%CONFIGURATION%\expat.lib %BINDIR%\ || EXIT /b 1
MD build_static_char || EXIT /b 1
CD build_static_char || EXIT /b 1
cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DMSVC_USE_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DBUILD_shared=OFF .. || EXIT /b 1
cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DBUILD_shared=OFF .. || EXIT /b 1
msbuild /m expat.sln || EXIT /b 1
DIR %CONFIGURATION% || EXIT /b 1
CD .. || EXIT /b 1
@ -63,7 +63,7 @@ COPY build_static_char\xmlwf\%CONFIGURATION%\xmlwf.exe %BINDIR%\ || EXIT /b 1
MD build_shared_wchar_t || EXIT /b 1
CD build_shared_wchar_t || EXIT /b 1
cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DMSVC_USE_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DXML_UNICODE=ON -DXML_UNICODE_WCHAR_T=ON .. || EXIT /b 1
cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DXML_UNICODE=ON -DXML_UNICODE_WCHAR_T=ON .. || EXIT /b 1
msbuild /m expat.sln || EXIT /b 1
DIR %CONFIGURATION% || EXIT /b 1
CD .. || EXIT /b 1
@ -73,7 +73,7 @@ COPY build_shared_wchar_t\%CONFIGURATION%\expatw.lib %BINDIR%\ || EXIT /b 1
MD build_static_wchar_t || EXIT /b 1
CD build_static_wchar_t || EXIT /b 1
cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DMSVC_USE_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DBUILD_shared=OFF -DXML_UNICODE=ON -DXML_UNICODE_WCHAR_T=ON .. || EXIT /b 1
cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DBUILD_shared=OFF -DXML_UNICODE=ON -DXML_UNICODE_WCHAR_T=ON .. || EXIT /b 1
msbuild /m expat.sln || EXIT /b 1
DIR %CONFIGURATION% || EXIT /b 1
CD .. || EXIT /b 1