CMake/Utilities/cmexpat/CMakeLists.txt
Brad King df62f64db7 Clean up install rules of CMake itself (#14371)
Ensure CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR are always
relative paths in CMake code, and set defaults accordingly.  Use the
install() command instead of install_files() and install_targets().
This is more modern and also avoids stripping of the first character
from user-specified destinations.

While at it, fix the default destinations reported in the bootstrap
help.
2013-08-26 11:54:07 -04:00

35 lines
948 B
CMake

PROJECT(CMEXPAT)
SET(expat_SRCS
xmlparse.c
xmltok.c
xmlrole.c
)
INCLUDE(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
TEST_BIG_ENDIAN(CMEXPAT_BIGENDIAN)
INCLUDE_DIRECTORIES(
"${CMEXPAT_BINARY_DIR}/.."
)
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})
INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmexpat)