summaryrefslogtreecommitdiffstats
path: root/Utilities/cmexpat/CMakeLists.txt
blob: e3a158145d3c6e035deddf43a928e76452946c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
PROJECT(CMEXPAT)
INCLUDE_REGULAR_EXPRESSION("^(expat|xml|ascii|utf|name|iascii|latin|cm).*$")

SET(expat_SRCS
  xmlparse.c
  xmltok.c
  xmlrole.c
)

INCLUDE(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
TEST_BIG_ENDIAN(CMEXPAT_BIGENDIAN)

IF(WIN32)
  IF(NOT BUILD_SHARED_LIBS)
    SET (CM_EXPAT_STATIC 1)
  ENDIF(NOT BUILD_SHARED_LIBS)
ENDIF(WIN32)

CONFIGURE_FILE(${CMEXPAT_SOURCE_DIR}/expatConfig.h.in
               ${CMEXPAT_BINARY_DIR}/expatConfig.h)
CONFIGURE_FILE(${CMEXPAT_SOURCE_DIR}/expatDllConfig.h.in
               ${CMEXPAT_BINARY_DIR}/expatDllConfig.h)
CONFIGURE_FILE(${CMEXPAT_SOURCE_DIR}/.NoDartCoverage
               ${CMEXPAT_BINARY_DIR}/.NoDartCoverage)
CONFIGURE_FILE(${CMEXPAT_SOURCE_DIR}/cm_expat_mangle.h
               ${CMEXPAT_BINARY_DIR}/cm_expat_mangle.h)
CONFIGURE_FILE(${CMEXPAT_SOURCE_DIR}/expat.h
               ${CMEXPAT_BINARY_DIR}/expat.h)

ADD_LIBRARY(cmexpat ${expat_SRCS})