From d9a92249b14a035ad72a2715de0e2c91b72cacab Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sat, 12 Mar 2016 17:09:47 +0100 Subject: [PATCH 1/2] CMakeLists.txt: Move code for upcoming change --- expat/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 353627e2..1b8e4cab 100755 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -50,12 +50,11 @@ set(expat_SRCS lib/xmltok_ns.c ) -if(WIN32 AND BUILD_shared) - set(expat_SRCS ${expat_SRCS} lib/libexpat.def) -endif(WIN32 AND BUILD_shared) - if(BUILD_shared) set(_SHARED SHARED) + if(WIN32) + set(expat_SRCS ${expat_SRCS} lib/libexpat.def) + endif(WIN32) else(BUILD_shared) set(_SHARED STATIC) endif(BUILD_shared) From 5c96e9ce60b155f354293dc7ee4a7c3e2009d4bc Mon Sep 17 00:00:00 2001 From: Sergei Nikulov Date: Sat, 12 Mar 2016 17:12:25 +0100 Subject: [PATCH 2/2] Fix for BUILD_shared=OFF case on MSVC --- expat/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 1b8e4cab..d053a1e7 100755 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -57,6 +57,9 @@ if(BUILD_shared) endif(WIN32) else(BUILD_shared) set(_SHARED STATIC) + if(WIN32) + add_definitions(-DXML_STATIC) + endif(WIN32) endif(BUILD_shared) add_library(expat ${_SHARED} ${expat_SRCS})