CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #[[
  2. Note: rmlui_shell is NOT a sample. It's a utility static library with code common to the RmlUi samples.
  3. ]]
  4. add_library(rmlui_shell STATIC
  5. src/PlatformExtensions.cpp
  6. src/RendererExtensions.cpp
  7. src/Shell.cpp
  8. src/ShellFileInterface.cpp
  9. include/PlatformExtensions.h
  10. include/RendererExtensions.h
  11. include/Shell.h
  12. include/ShellFileInterface.h
  13. )
  14. set_common_target_options(rmlui_shell)
  15. target_link_libraries(rmlui_shell PRIVATE rmlui_backend_${RMLUI_BACKEND})
  16. target_include_directories(rmlui_shell PUBLIC "include" "${PROJECT_SOURCE_DIR}/Backends")
  17. if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
  18. target_link_libraries(rmlui_shell PRIVATE Windows::Shell::LightweightUtility)
  19. elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
  20. target_link_libraries(rmlui_shell PRIVATE macOS::Cocoa)
  21. endif()
  22. target_link_libraries(rmlui_shell PUBLIC rmlui_core rmlui_debugger)
  23. if(RMLUI_BACKEND MATCHES "GL2$")
  24. target_compile_definitions(rmlui_shell PRIVATE "RMLUI_RENDERER_GL2")
  25. endif()
  26. if(RMLUI_BACKEND MATCHES "GL3$")
  27. target_compile_definitions(rmlui_shell PRIVATE "RMLUI_RENDERER_GL3")
  28. endif()