CMakeLists.txt 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # -*- cmake -*-
  2. project(llgltf)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(LLMath)
  6. include(LLPrimitive)
  7. include(LLRender)
  8. set(llgltf_SOURCE_FILES
  9. llgltfaccessor.cpp
  10. llgltfanimation.cpp
  11. llgltfasset.cpp
  12. llgltfprimitive.cpp
  13. )
  14. set(llgltf_HEADER_FILES
  15. CMakeLists.txt
  16. llgltfaccessor.h
  17. llgltfanimation.h
  18. llgltfasset.h
  19. llgltfbufferutil.h
  20. llgltfprimitive.h
  21. )
  22. set_source_files_properties(${llgltf_HEADER_FILES}
  23. PROPERTIES HEADER_FILE_ONLY TRUE)
  24. list(APPEND llgltf_SOURCE_FILES ${llgltf_HEADER_FILES})
  25. add_library (llgltf ${llgltf_SOURCE_FILES})
  26. add_dependencies(llgltf prepare)
  27. target_link_libraries(llgltf
  28. ${LLCOMMON_LIBRARIES}
  29. ${LLMATH_LIBRARIES}
  30. ${LLPRIMITIVE_LIBRARIES}
  31. ${LLRENDER_LIBRARIES}
  32. )
  33. if (NOT ${CMAKE_VERSION} VERSION_LESS "3.16.0")
  34. target_precompile_headers(llgltf PRIVATE <linden_common.h> <tinygltf/tiny_gltf.h> "glh_linear.h")
  35. if (USEUNITYBUILD)
  36. set_target_properties(llgltf PROPERTIES UNITY_BUILD ON)
  37. endif (USEUNITYBUILD)
  38. endif ()
  39. get_directory_property(ALLDEFINES COMPILE_DEFINITIONS)
  40. message("llgltf COMPILE_DEFINITIONS = ${ALLDEFINES}")