From 6b15f19107e7c5a5cbe7b79ad673045bfe01974f Mon Sep 17 00:00:00 2001 From: Alexey Rassikhin Date: Fri, 15 Dec 2017 11:53:50 +0300 Subject: [PATCH 1/2] Fix expat config for "NMake Makefiles" target. --- build/cmake/lib/xml/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/build/cmake/lib/xml/CMakeLists.txt b/build/cmake/lib/xml/CMakeLists.txt index 3afb4dccbd..3bef35438a 100644 --- a/build/cmake/lib/xml/CMakeLists.txt +++ b/build/cmake/lib/xml/CMakeLists.txt @@ -15,6 +15,7 @@ if(wxUSE_EXPAT STREQUAL "builtin") SOURCE_DIR ${wxSOURCE_DIR}/src/expat/expat CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_tools=OFF -DBUILD_examples=OFF -DBUILD_tests=OFF From 82da79d038d53546509700d53dd3a0186199ca73 Mon Sep 17 00:00:00 2001 From: Alexey Rassikhin Date: Fri, 15 Dec 2017 13:59:57 +0300 Subject: [PATCH 2/2] Workaround for expat builtin debug postfix expat lib has debug postfix on windows only. --- build/cmake/lib/xml/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/cmake/lib/xml/CMakeLists.txt b/build/cmake/lib/xml/CMakeLists.txt index 3bef35438a..718f5f64ad 100644 --- a/build/cmake/lib/xml/CMakeLists.txt +++ b/build/cmake/lib/xml/CMakeLists.txt @@ -9,6 +9,10 @@ include(../../source_groups.cmake) +if(WIN32) + set(EXPAT_POSTFIX $<$:d>) +endif(WIN32) + if(wxUSE_EXPAT STREQUAL "builtin") ExternalProject_Add(wxexpat DOWNLOAD_COMMAND "" @@ -26,7 +30,7 @@ if(wxUSE_EXPAT STREQUAL "builtin") ${CMAKE_COMMAND} -E make_directory /wxlib COMMAND ${CMAKE_COMMAND} -E rename - /lib/${CMAKE_STATIC_LIBRARY_PREFIX}expat${CMAKE_STATIC_LIBRARY_SUFFIX} + /lib/${CMAKE_STATIC_LIBRARY_PREFIX}expat${EXPAT_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} /wxlib/${CMAKE_STATIC_LIBRARY_PREFIX}wxexpat$<$:d>${CMAKE_STATIC_LIBRARY_SUFFIX} ) ExternalProject_Get_Property(wxexpat INSTALL_DIR)