diff options
Diffstat (limited to '')
-rwxr-xr-x | linden/indra/llplugin/slplugin/CMakeLists.txt | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/linden/indra/llplugin/slplugin/CMakeLists.txt b/linden/indra/llplugin/slplugin/CMakeLists.txt index 4a7d670..81d9299 100755 --- a/linden/indra/llplugin/slplugin/CMakeLists.txt +++ b/linden/indra/llplugin/slplugin/CMakeLists.txt | |||
@@ -16,6 +16,7 @@ include_directories( | |||
16 | if (DARWIN) | 16 | if (DARWIN) |
17 | include(CMakeFindFrameworks) | 17 | include(CMakeFindFrameworks) |
18 | find_library(CARBON_LIBRARY Carbon) | 18 | find_library(CARBON_LIBRARY Carbon) |
19 | find_library(COCOA_LIBRARY Cocoa) | ||
19 | endif (DARWIN) | 20 | endif (DARWIN) |
20 | 21 | ||
21 | 22 | ||
@@ -25,11 +26,33 @@ set(SLPlugin_SOURCE_FILES | |||
25 | slplugin.cpp | 26 | slplugin.cpp |
26 | ) | 27 | ) |
27 | 28 | ||
29 | if (DARWIN) | ||
30 | list(APPEND SLPlugin_SOURCE_FILES | ||
31 | slplugin-objc.mm | ||
32 | ) | ||
33 | list(APPEND SLPlugin_HEADER_FILES | ||
34 | slplugin-objc.h | ||
35 | ) | ||
36 | endif (DARWIN) | ||
37 | |||
38 | set_source_files_properties(${SLPlugin_HEADER_FILES} | ||
39 | PROPERTIES HEADER_FILE_ONLY TRUE) | ||
40 | |||
41 | if (SLPlugin_HEADER_FILES) | ||
42 | list(APPEND SLPlugin_SOURCE_FILES ${SLPlugin_HEADER_FILES}) | ||
43 | endif (SLPlugin_HEADER_FILES) | ||
44 | |||
28 | add_executable(SLPlugin | 45 | add_executable(SLPlugin |
29 | WIN32 | 46 | WIN32 |
47 | MACOSX_BUNDLE | ||
30 | ${SLPlugin_SOURCE_FILES} | 48 | ${SLPlugin_SOURCE_FILES} |
31 | ) | 49 | ) |
32 | 50 | ||
51 | set_target_properties(SLPlugin | ||
52 | PROPERTIES | ||
53 | MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist | ||
54 | ) | ||
55 | |||
33 | target_link_libraries(SLPlugin | 56 | target_link_libraries(SLPlugin |
34 | ${LLPLUGIN_LIBRARIES} | 57 | ${LLPLUGIN_LIBRARIES} |
35 | ${LLMESSAGE_LIBRARIES} | 58 | ${LLMESSAGE_LIBRARIES} |
@@ -44,12 +67,16 @@ add_dependencies(SLPlugin | |||
44 | ) | 67 | ) |
45 | 68 | ||
46 | if (DARWIN) | 69 | if (DARWIN) |
47 | # Mac version needs to link against carbon, and also needs an embedded plist (to set LSBackgroundOnly) | 70 | # Mac version needs to link against Carbon |
48 | target_link_libraries(SLPlugin ${CARBON_LIBRARY}) | 71 | target_link_libraries(SLPlugin ${CARBON_LIBRARY} ${COCOA_LIBRARY}) |
49 | set_target_properties( | 72 | # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later) |
50 | SLPlugin | 73 | add_custom_command( |
51 | PROPERTIES | 74 | TARGET SLPlugin POST_BUILD |
52 | LINK_FLAGS "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist" | 75 | COMMAND mkdir |
76 | ARGS | ||
77 | -p | ||
78 | ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/SLPlugin.app/Contents/Resources | ||
53 | ) | 79 | ) |
54 | endif (DARWIN) | 80 | endif (DARWIN) |
55 | 81 | ||
82 | #ll_deploy_sharedlibs_command(SLPlugin) | ||