mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 13:59:01 +08:00
65 lines
2.2 KiB
Diff
65 lines
2.2 KiB
Diff
diff --git a/lib/src/CMakeLists.txt b/lib/src/CMakeLists.txt
|
|
index 9fb4718..fec7712 100644
|
|
--- a/lib/src/CMakeLists.txt
|
|
+++ b/lib/src/CMakeLists.txt
|
|
@@ -1,57 +1,6 @@
|
|
set (INTERNAL_LIBXML_TGT)
|
|
-while (TRUE)
|
|
- if (UNIX)
|
|
- # Use libxml2 from system repositories
|
|
- break()
|
|
- endif ()
|
|
-
|
|
- if ((NOT "${LIBXML2_INCLUDE_DIR}" STREQUAL "") AND (NOT "${LIBXML2_LIBRARIES}" STREQUAL ""))
|
|
- # External build of libxml2 is provided
|
|
- break()
|
|
- endif ()
|
|
-
|
|
- if (NOT MSVC)
|
|
- message (FATAL_ERROR "At this moment only MSVC compiler is supported for windows builds")
|
|
- endif ()
|
|
-
|
|
- set (INTERNAL_LIBXML_TGT "libxml2_tgt")
|
|
- set (LIBXML2_DIR "${CMAKE_CURRENT_BINARY_DIR}/libxml2")
|
|
- set (LIBXML2_SRC_DIR "${LIBXML2_DIR}/src")
|
|
- set (LIBXML2_BIN_DIR "${LIBXML2_SRC_DIR}/win32")
|
|
-
|
|
- set (LIBXML2_CRUNTIME)
|
|
- if (("${CMAKE_BUILD_TYPE}" STREQUAL "") OR ("${CMAKE_BUILD_TYPE}" STREQUAL "None") OR ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug"))
|
|
- set (LIBXML2_CRUNTIME "cruntime=/MDd")
|
|
- endif ()
|
|
-
|
|
- include(ExternalProject)
|
|
- ExternalProject_Add(
|
|
- ${INTERNAL_LIBXML_TGT}
|
|
- PREFIX "${LIBXML2_DIR}"
|
|
- STAMP_DIR "${LIBXML2_DIR}/stamp"
|
|
- GIT_REPOSITORY "https://github.com/GNOME/libxml2.git"
|
|
- GIT_TAG "v2.9.7"
|
|
- UPDATE_DISCONNECTED 1
|
|
- CONFIGURE_COMMAND
|
|
- cscript ${LIBXML2_BIN_DIR}/configure.js ftp=no html=no iconv=no compiler=msvc static=yes ${LIBXML2_CRUNTIME} bindir=install\\bin incdir=install\\include libdir=install\\lib sodir=install\\bin
|
|
- SOURCE_DIR "${LIBXML2_SRC_DIR}"
|
|
- BINARY_DIR "${LIBXML2_BIN_DIR}"
|
|
- BUILD_COMMAND
|
|
- nmake /f Makefile.msvc
|
|
- INSTALL_COMMAND
|
|
- nmake /f Makefile.msvc install
|
|
- )
|
|
-
|
|
- set (LIBXML2_FOUND TRUE)
|
|
- set (LIBXML2_INCLUDE_DIR "${LIBXML2_BIN_DIR}/install/include/libxml2")
|
|
- set (LIBXML2_LIBRARIES "${LIBXML2_BIN_DIR}/install/lib/libxml2_a.lib")
|
|
- set (LIBXML2_DEFINITIONS "/DLIBXML_STATIC")
|
|
- break()
|
|
-endwhile ()
|
|
-
|
|
-if (NOT LIBXML2_FOUND)
|
|
- find_package(LibXml2 REQUIRED)
|
|
-endif ()
|
|
+
|
|
+find_package(LibXml2 REQUIRED)
|
|
|
|
set (
|
|
src
|