CMake: Rename BUILD_shared to EXPAT_SHARED_LIBS
This commit is contained in:
parent
474471cdc2
commit
fce015875e
@ -44,7 +44,7 @@ endif()
|
||||
option(EXPAT_BUILD_TOOLS "build the xmlwf tool for expat library" ${_EXPAT_BUILD_TOOLS_DEFAULT})
|
||||
option(EXPAT_BUILD_EXAMPLES "build the examples for expat library" ON)
|
||||
option(EXPAT_BUILD_TESTS "build the tests for expat library" ON)
|
||||
option(BUILD_shared "build a shared expat library" ON)
|
||||
option(EXPAT_SHARED_LIBS "build a shared expat library" ON)
|
||||
option(EXPAT_BUILD_DOCS "build man page for xmlwf" ${_EXPAT_BUILD_DOCS_DEFAULT})
|
||||
option(EXPAT_BUILD_FUZZERS "build fuzzers for the expat library" OFF)
|
||||
option(EXPAT_WITH_LIBBSD "utilize libbsd (for arc4random_buf)" OFF)
|
||||
@ -195,7 +195,7 @@ if(WIN32)
|
||||
set(_POSTFIX_WIDE "w")
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_shared)
|
||||
if(NOT EXPAT_SHARED_LIBS)
|
||||
if(EXPAT_MSVC_STATIC_CRT)
|
||||
set(_POSTFIX_CRT "MT")
|
||||
else()
|
||||
@ -230,17 +230,17 @@ set(expat_SRCS
|
||||
lib/xmltok_ns.c
|
||||
)
|
||||
|
||||
if(BUILD_shared)
|
||||
if(EXPAT_SHARED_LIBS)
|
||||
set(_SHARED SHARED)
|
||||
if(MSVC)
|
||||
set(expat_SRCS ${expat_SRCS} lib/libexpat.def)
|
||||
endif(MSVC)
|
||||
else(BUILD_shared)
|
||||
else(EXPAT_SHARED_LIBS)
|
||||
set(_SHARED STATIC)
|
||||
if(WIN32)
|
||||
add_definitions(-DXML_STATIC)
|
||||
endif(WIN32)
|
||||
endif(BUILD_shared)
|
||||
endif(EXPAT_SHARED_LIBS)
|
||||
|
||||
add_library(expat ${_SHARED} ${expat_SRCS})
|
||||
if(EXPAT_WITH_LIBBSD)
|
||||
@ -438,7 +438,7 @@ message(STATUS "")
|
||||
message(STATUS "Configuration")
|
||||
message(STATUS " Prefix ..................... ${CMAKE_INSTALL_PREFIX}")
|
||||
message(STATUS " Build type ................. ${CMAKE_BUILD_TYPE}")
|
||||
message(STATUS " Shared libraries ........... ${BUILD_shared}")
|
||||
message(STATUS " Shared libraries ........... ${EXPAT_SHARED_LIBS}")
|
||||
if(WIN32)
|
||||
message(STATUS " Static CRT ................. ${EXPAT_MSVC_STATIC_CRT}")
|
||||
endif()
|
||||
|
@ -48,7 +48,7 @@ Expat can be built on Windows in two ways:
|
||||
Versions that are statically linking with the multi-threaded run-time library
|
||||
can be built with -DEXPAT_MSVC_STATIC_CRT=ON.
|
||||
|
||||
Static Linking: (through -DBUILD_shared=OFF)
|
||||
Static Linking: (through -DEXPAT_SHARED_LIBS=OFF)
|
||||
|
||||
The libraries should be named like this:
|
||||
Multi-threaded: libexpat(w)MT.lib
|
||||
|
@ -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% -DEXPAT_MSVC_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 -DEXPAT_SHARED_LIBS=OFF .. || 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% -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
|
||||
cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_SHARED_LIBS=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
|
||||
|
Loading…
Reference in New Issue
Block a user