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

游戏引擎

开发平台:

C++ Builder

  1. project(SLPlugin)
  2. include(00-Common)
  3. include(LLCommon)
  4. include(LLPlugin)
  5. include(Linking)
  6. include(PluginAPI)
  7. include(LLMessage)
  8. include_directories(
  9.     ${LLPLUGIN_INCLUDE_DIRS}
  10.     ${LLMESSAGE_INCLUDE_DIRS}
  11.     ${LLCOMMON_INCLUDE_DIRS}
  12. )
  13. if (DARWIN)
  14.     include(CMakeFindFrameworks)
  15.     find_library(CARBON_LIBRARY Carbon)
  16. endif (DARWIN)
  17. ### SLPlugin
  18. set(SLPlugin_SOURCE_FILES
  19.     slplugin.cpp
  20.     )
  21. add_executable(SLPlugin
  22.     WIN32
  23.     ${SLPlugin_SOURCE_FILES}
  24. )
  25. target_link_libraries(SLPlugin
  26.   ${LLPLUGIN_LIBRARIES}
  27.   ${LLMESSAGE_LIBRARIES}
  28.   ${LLCOMMON_LIBRARIES}
  29.   ${PLUGIN_API_WINDOWS_LIBRARIES}
  30. )
  31. add_dependencies(SLPlugin
  32.   ${LLPLUGIN_LIBRARIES}
  33.   ${LLMESSAGE_LIBRARIES}
  34.   ${LLCOMMON_LIBRARIES}
  35. )
  36. if (DARWIN)
  37.   # Mac version needs to link against carbon, and also needs an embedded plist (to set LSBackgroundOnly)
  38.   target_link_libraries(SLPlugin ${CARBON_LIBRARY})
  39.   set_target_properties(
  40.     SLPlugin
  41.     PROPERTIES
  42.     LINK_FLAGS "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist"
  43.   )
  44. endif (DARWIN)