summaryrefslogtreecommitdiff
path: root/Utilities/cmexpat
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmexpat')
-rw-r--r--Utilities/cmexpat/CMakeLists.txt45
-rw-r--r--Utilities/cmexpat/lib/expat_external.h2
2 files changed, 14 insertions, 33 deletions
diff --git a/Utilities/cmexpat/CMakeLists.txt b/Utilities/cmexpat/CMakeLists.txt
index f7d56e3114..3781821984 100644
--- a/Utilities/cmexpat/CMakeLists.txt
+++ b/Utilities/cmexpat/CMakeLists.txt
@@ -1,38 +1,17 @@
-# This file is copyrighted under the BSD-license for buildsystem files of KDE
-# copyright 2010, Patrick Spendrin <ps_ml@gmx.de>
-
-project(expat)
-
-cmake_minimum_required(VERSION 2.6)
-
include(ConfigureChecks.cmake)
-
-include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib)
-if(MSVC)
- add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
-endif(MSVC)
if(WIN32)
- add_definitions(-DCOMPILING_FOR_WINDOWS)
+ add_definitions(-DCOMPILING_FOR_WINDOWS)
endif(WIN32)
-set(expat_SRCS
- lib/xmlparse.c
- lib/xmlrole.c
- lib/xmltok.c
- lib/xmltok_impl.c
- lib/xmltok_ns.c
-)
-
-if(BUILD_shared)
- set(_SHARED SHARED)
- if(WIN32)
- set(expat_SRCS ${expat_SRCS} lib/libexpat.def)
- endif(WIN32)
-else(BUILD_shared)
- set(_SHARED STATIC)
- if(WIN32)
- add_definitions(-DXML_STATIC)
- endif(WIN32)
-endif(BUILD_shared)
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ )
-add_library(expat ${_SHARED} ${expat_SRCS})
+add_library(cmexpat STATIC
+ lib/xmlparse.c
+ lib/xmlrole.c
+ lib/xmltok.c
+ lib/xmltok_impl.c
+ lib/xmltok_ns.c
+ )
diff --git a/Utilities/cmexpat/lib/expat_external.h b/Utilities/cmexpat/lib/expat_external.h
index 2c03284ea2..b2be17b184 100644
--- a/Utilities/cmexpat/lib/expat_external.h
+++ b/Utilities/cmexpat/lib/expat_external.h
@@ -53,6 +53,8 @@
#endif
#endif /* not defined XMLCALL */
+/* Build within CMake hard-codes use of a static library. */
+#define XML_STATIC
#if !defined(XML_STATIC) && !defined(XMLIMPORT)
#ifndef XML_BUILDING_EXPAT