CMakeLists.txt 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # -*- cmake -*-
  2. project(llimage)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(LLFilesystem)
  6. include(LLImage)
  7. include(LLMath)
  8. include(ZLIB)
  9. set(llimage_SOURCE_FILES
  10. llimagebmp.cpp
  11. llimage.cpp
  12. llimagedecodethread.cpp
  13. llimagej2c.cpp
  14. llimagejpeg.cpp
  15. llimagepng.cpp
  16. llimagetga.cpp
  17. llpngwrapper.cpp
  18. )
  19. set(llimage_HEADER_FILES
  20. CMakeLists.txt
  21. llimage.h
  22. llimagedecodethread.h
  23. llimagebmp.h
  24. llimagej2c.h
  25. llimagejpeg.h
  26. llimagepng.h
  27. llimagetga.h
  28. llpngwrapper.h
  29. )
  30. set_source_files_properties(${llimage_HEADER_FILES}
  31. PROPERTIES HEADER_FILE_ONLY TRUE)
  32. list(APPEND llimage_SOURCE_FILES ${llimage_HEADER_FILES})
  33. if (WINDOWS)
  34. add_definitions(-DOPJ_STATIC)
  35. endif (WINDOWS)
  36. add_library (llimage ${llimage_SOURCE_FILES})
  37. add_dependencies(llimage prepare)
  38. target_link_libraries(
  39. llimage
  40. ${JPEG_LIBRARIES}
  41. ${PNG_LIBRARIES}
  42. ${OPENJPEG_LIBRARIES}
  43. ${ZLIB_LIBRARIES}
  44. )
  45. if (NOT ${CMAKE_VERSION} VERSION_LESS "3.16.0")
  46. target_precompile_headers(llimage PRIVATE <linden_common.h>)
  47. if (USEUNITYBUILD)
  48. set_target_properties(llimage PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 0)
  49. endif (USEUNITYBUILD)
  50. endif ()
  51. get_directory_property(ALLDEFINES COMPILE_DEFINITIONS)
  52. message("llimage COMPILE_DEFINITIONS = ${ALLDEFINES}")