CMakeLists.txt 1019 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # -*- cmake -*-
  2. project(llxml)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(LLMath)
  6. include(LLXML)
  7. set(llxml_SOURCE_FILES
  8. llcontrol.cpp
  9. llxmlnode.cpp
  10. llxmlparser.cpp
  11. llxmltree.cpp
  12. )
  13. set(llxml_HEADER_FILES
  14. CMakeLists.txt
  15. llcontrol.h
  16. llxmlnode.h
  17. llxmlparser.h
  18. llxmltree.h
  19. )
  20. set_source_files_properties(${llxml_HEADER_FILES}
  21. PROPERTIES HEADER_FILE_ONLY TRUE)
  22. list(APPEND llxml_SOURCE_FILES ${llxml_HEADER_FILES})
  23. add_library (llxml ${llxml_SOURCE_FILES})
  24. add_dependencies(llxml prepare)
  25. target_link_libraries(
  26. llxml
  27. llmath
  28. ${EXPAT_LIBRARIES}
  29. )
  30. if (NOT ${CMAKE_VERSION} VERSION_LESS "3.16.0")
  31. if (USEUNITYBUILD)
  32. set_target_properties(llxml PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 0)
  33. else (USEUNITYBUILD)
  34. target_precompile_headers(llxml PRIVATE <linden_common.h>)
  35. endif (USEUNITYBUILD)
  36. endif ()
  37. get_directory_property(ALLDEFINES COMPILE_DEFINITIONS)
  38. message("llxml COMPILE_DEFINITIONS = ${ALLDEFINES}")