CMakeLists.txt
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:2k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. # -*- cmake -*-
  2. project(media_plugin_webkit)
  3. include(00-Common)
  4. include(LLCommon)
  5. include(LLImage)
  6. include(LLPlugin)
  7. include(LLMath)
  8. include(LLRender)
  9. include(LLWindow)
  10. include(UI)
  11. include(Linking)
  12. include(PluginAPI)
  13. include(MediaPluginBase)
  14. include(FindOpenGL)
  15. include(WebKitLibPlugin)
  16. include_directories(
  17.     ${LLPLUGIN_INCLUDE_DIRS}
  18.     ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
  19.     ${LLCOMMON_INCLUDE_DIRS}
  20.     ${LLMATH_INCLUDE_DIRS}
  21.     ${LLIMAGE_INCLUDE_DIRS}
  22.     ${LLRENDER_INCLUDE_DIRS}
  23.     ${LLWINDOW_INCLUDE_DIRS}
  24. )
  25. ### media_plugin_webkit
  26. set(media_plugin_webkit_SOURCE_FILES
  27.     media_plugin_webkit.cpp
  28.     )
  29. add_library(media_plugin_webkit
  30.     SHARED
  31.     ${media_plugin_webkit_SOURCE_FILES}
  32. )
  33. set(media_plugin_webkit_LINK_LIBRARIES
  34.   ${LLPLUGIN_LIBRARIES}
  35.   ${MEDIA_PLUGIN_BASE_LIBRARIES}
  36.   ${LLCOMMON_LIBRARIES}
  37.   ${WEBKIT_PLUGIN_LIBRARIES}
  38.   ${PLUGIN_API_WINDOWS_LIBRARIES}
  39. )
  40. if (LINUX)
  41.   list(APPEND media_plugin_webkit_LINK_LIBRARIES
  42.        ${UI_LIBRARIES}     # for glib/GTK
  43.        )
  44. endif (LINUX)
  45. target_link_libraries(media_plugin_webkit ${media_plugin_webkit_LINK_LIBRARIES})
  46. add_dependencies(media_plugin_webkit
  47.   ${LLPLUGIN_LIBRARIES}
  48.   ${MEDIA_PLUGIN_BASE_LIBRARIES}
  49.   ${LLCOMMON_LIBRARIES}
  50. )
  51. if (WINDOWS)
  52.   set_target_properties(
  53.     media_plugin_webkit
  54.     PROPERTIES
  55.     LINK_FLAGS "/MANIFEST:NO"
  56.     )
  57. endif (WINDOWS)
  58. if (DARWIN)
  59.   # Don't prepend 'lib' to the executable name, and don't embed a full path in the library's install name
  60.   set_target_properties(
  61.     media_plugin_webkit
  62.     PROPERTIES
  63.     PREFIX ""
  64.     BUILD_WITH_INSTALL_RPATH 1
  65.     INSTALL_NAME_DIR "@executable_path"
  66.     LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
  67.   )
  68.   # copy the webkit dylib to the build directory
  69.   add_custom_command(
  70.     TARGET media_plugin_webkit POST_BUILD
  71. #    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/libllqtwebkit.dylib
  72.     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libllqtwebkit.dylib ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
  73.     DEPENDS media_plugin_webkit ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libllqtwebkit.dylib
  74.     )
  75.     
  76. endif (DARWIN)