External_expat.cmake 959 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
message(STATUS "Setup expat ...")

set(proj EXPAT)

set(DEFAULT_USE_SYSTEM_EXPAT  OFF)

option(USE_SYSTEM_EXPAT "  Use a system build of expat." ${DEFAULT_USE_SYSTEM_EXPAT})
mark_as_advanced(USE_SYSTEM_EXPAT)

if(USE_SYSTEM_EXPAT)
  message(STATUS "  Using expat system version")
else()
13
  SETUP_SUPERBUILD(PROJECT ${proj})
14
  
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  ExternalProject_Add(${proj}
    PREFIX ${proj}
    URL "http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz/download"
    URL_MD5 dd7dab7a5fea97d2a6a43f511449b7cd
    BINARY_DIR ${EXPAT_SB_BUILD_DIR}
    INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
    CMAKE_CACHE_ARGS
        -DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
        -DCMAKE_BUILD_TYPE:STRING=Release
        -DBUILD_SHARED_LIBS:BOOL=ON
        -DBUILD_examples:BOOL=OFF
        -DBUILD_tests:BOOL=OFF
        -DBUILD_tools:BOOL=OFF
    CMAKE_COMMAND ${SB_CMAKE_COMMAND}
    )
    
  message(STATUS "  Using Expat SuperBuild version")
32

33
endif()