EXPAT.cmake 724 B

123456789101112131415161718192021222324252627282930
  1. # -*- cmake -*-
  2. if (EXPAT_CMAKE_INCLUDED)
  3. return()
  4. endif (EXPAT_CMAKE_INCLUDED)
  5. set (EXPAT_CMAKE_INCLUDED TRUE)
  6. include(Prebuilt)
  7. if (USESYSTEMLIBS)
  8. set(EXPAT_FIND_QUIETLY OFF)
  9. set(EXPAT_FIND_REQUIRED OFF)
  10. include(FindEXPAT)
  11. endif (USESYSTEMLIBS)
  12. if (NOT EXPAT_FOUND)
  13. use_prebuilt_binary(expat)
  14. if (DARWIN)
  15. set(EXPAT_LIBRARIES expat)
  16. elseif (LINUX)
  17. # Make sure we will link against our static library
  18. set(EXPAT_LIBRARIES libexpat.a)
  19. elseif (WINDOWS)
  20. set(EXPAT_LIBRARIES libexpatMT)
  21. # Needed by expat under Windows only. HB
  22. add_definitions(-DXML_STATIC)
  23. endif ()
  24. set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/expat)
  25. endif (NOT EXPAT_FOUND)
  26. include_directories(SYSTEM ${EXPAT_INCLUDE_DIRS})