PageRenderTime 275ms CodeModel.GetById 140ms app.highlight 1ms RepoModel.GetById 120ms app.codeStats 12ms

/indra/llplugin/slplugin/CMakeLists.txt

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 84 lines | 66 code | 15 blank | 3 comment | 5 complexity | 2fb0de138e70c61dfb55f0de194e4b79 MD5 | raw file
 1project(SLPlugin)
 2
 3include(00-Common)
 4include(LLCommon)
 5include(LLPlugin)
 6include(Linking)
 7include(PluginAPI)
 8include(LLMessage)
 9
10include_directories(
11    ${LLPLUGIN_INCLUDE_DIRS}
12    ${LLMESSAGE_INCLUDE_DIRS}
13    ${LLCOMMON_INCLUDE_DIRS}
14)
15
16if (DARWIN)
17    include(CMakeFindFrameworks)
18    find_library(CARBON_LIBRARY Carbon)
19    find_library(COCOA_LIBRARY Cocoa)
20endif (DARWIN)
21
22
23### SLPlugin
24
25set(SLPlugin_SOURCE_FILES
26    slplugin.cpp
27    )
28
29if (DARWIN)
30  list(APPEND SLPlugin_SOURCE_FILES
31    slplugin-objc.mm
32  )
33  list(APPEND SLPlugin_HEADER_FILES
34    slplugin-objc.h
35  )
36endif (DARWIN)
37
38set_source_files_properties(${SLPlugin_HEADER_FILES}
39                            PROPERTIES HEADER_FILE_ONLY TRUE)
40
41if (SLPlugin_HEADER_FILES)
42  list(APPEND SLPlugin_SOURCE_FILES ${SLPlugin_HEADER_FILES})
43endif (SLPlugin_HEADER_FILES)
44
45add_executable(SLPlugin
46    WIN32
47    MACOSX_BUNDLE
48    ${SLPlugin_SOURCE_FILES}
49)
50
51set_target_properties(SLPlugin
52  PROPERTIES
53  MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist
54  )
55
56target_link_libraries(SLPlugin
57  ${LLPLUGIN_LIBRARIES}
58  ${LLMESSAGE_LIBRARIES}
59  ${LLCOMMON_LIBRARIES}
60  ${PLUGIN_API_WINDOWS_LIBRARIES}
61)
62
63add_dependencies(SLPlugin
64  ${LLPLUGIN_LIBRARIES}
65  ${LLMESSAGE_LIBRARIES}
66  ${LLCOMMON_LIBRARIES}
67)
68
69if (DARWIN)
70  # Mac version needs to link against Carbon
71  target_link_libraries(SLPlugin ${CARBON_LIBRARY} ${COCOA_LIBRARY})
72  # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later)
73  add_custom_command(
74    TARGET SLPlugin POST_BUILD
75    COMMAND mkdir
76    ARGS
77      -p
78      ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/SLPlugin.app/Contents/Resources
79  )
80endif (DARWIN)
81
82if (LL_TESTS)
83  ll_deploy_sharedlibs_command(SLPlugin)
84endif (LL_TESTS)