LLPrimitive.cmake 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # -*- cmake -*-
  2. if (LLPRIMITIVE_CMAKE_INCLUDED)
  3. return()
  4. endif (LLPRIMITIVE_CMAKE_INCLUDED)
  5. set (LLPRIMITIVE_CMAKE_INCLUDED TRUE)
  6. # We need GL_* constants for the GLTF mesh loader, so let's add the include
  7. # path for Epoxy headers... HB
  8. include(Epoxy)
  9. include(ZLIB)
  10. # These should be moved to their own cmake file
  11. use_prebuilt_binary(colladadom)
  12. # NOTE: libpcre, libpcrecpp and libxml2 are required by collada-dom...
  13. use_prebuilt_binary(pcre)
  14. use_prebuilt_binary(libxml2)
  15. use_prebuilt_binary(meshoptimizer)
  16. use_prebuilt_binary(mikktspace)
  17. use_prebuilt_binary(tinygltf)
  18. include_directories(
  19. ${CMAKE_SOURCE_DIR}/llprimitive
  20. ${LIBS_PREBUILT_DIR}/include/collada
  21. ${LIBS_PREBUILT_DIR}/include/collada/1.4
  22. )
  23. if (WINDOWS)
  24. set(LLPRIMITIVE_LIBRARIES
  25. llprimitive
  26. meshoptimizer
  27. libcollada14dom23-s
  28. ${MINIZIP_LIBRARIES}
  29. libxml2_a
  30. pcrecpp
  31. pcre
  32. )
  33. elseif (DARWIN)
  34. set(LLPRIMITIVE_LIBRARIES
  35. llprimitive
  36. meshoptimizer
  37. collada14dom
  38. ${MINIZIP_LIBRARIES}
  39. xml2
  40. pcrecpp
  41. pcre
  42. iconv # Required by libxml2
  43. )
  44. elseif (LINUX)
  45. set(LLPRIMITIVE_LIBRARIES
  46. llprimitive
  47. meshoptimizer
  48. collada14dom
  49. ${MINIZIP_LIBRARIES}
  50. # Make sure we link against our pre-built static libraries
  51. ${ARCH_PREBUILT_DIRS_RELEASE}/libxml2.a
  52. ${ARCH_PREBUILT_DIRS_RELEASE}/libpcrecpp.a
  53. ${ARCH_PREBUILT_DIRS_RELEASE}/libpcre.a
  54. )
  55. endif (WINDOWS)