/src/apps/ocioconvert/CMakeLists.txt

http://github.com/imageworks/OpenColorIO · CMake · 40 lines · 30 code · 8 blank · 2 comment · 3 complexity · 523ea2e6cd0555f03c754e06e8de8245 MD5 · raw file

  1. # SPDX-License-Identifier: BSD-3-Clause
  2. # Copyright Contributors to the OpenColorIO Project.
  3. if(NOT OCIO_GL_ENABLED)
  4. message(WARNING "GL component missing. GPU disabled for ocioconvert.")
  5. else()
  6. add_compile_definitions(OCIO_GPU_ENABLED)
  7. set(OCIO_GL_LIB oglapphelpers)
  8. endif()
  9. set(SOURCES
  10. main.cpp
  11. )
  12. add_executable(ocioconvert ${SOURCES})
  13. if(NOT BUILD_SHARED_LIBS)
  14. target_compile_definitions(ocioconvert
  15. PRIVATE
  16. OpenColorIO_SKIP_IMPORTS
  17. )
  18. endif()
  19. set_target_properties(ocioconvert PROPERTIES
  20. COMPILE_FLAGS "${PLATFORM_COMPILE_FLAGS}")
  21. target_link_libraries(ocioconvert
  22. PRIVATE
  23. apputils
  24. ilmbase::ilmbase
  25. ${OCIO_GL_LIB}
  26. oiiohelpers
  27. OpenColorIO
  28. OpenImageIO
  29. )
  30. install(TARGETS ocioconvert
  31. RUNTIME DESTINATION bin
  32. )