aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llplugin/slplugin/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xlinden/indra/llplugin/slplugin/CMakeLists.txt39
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(
16if (DARWIN) 16if (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)
19endif (DARWIN) 20endif (DARWIN)
20 21
21 22
@@ -25,11 +26,33 @@ set(SLPlugin_SOURCE_FILES
25 slplugin.cpp 26 slplugin.cpp
26 ) 27 )
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
28add_executable(SLPlugin 45add_executable(SLPlugin
29 WIN32 46 WIN32
47 MACOSX_BUNDLE
30 ${SLPlugin_SOURCE_FILES} 48 ${SLPlugin_SOURCE_FILES}
31) 49)
32 50
51set_target_properties(SLPlugin
52 PROPERTIES
53 MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist
54 )
55
33target_link_libraries(SLPlugin 56target_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
46if (DARWIN) 69if (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 )
54endif (DARWIN) 80endif (DARWIN)
55 81
82#ll_deploy_sharedlibs_command(SLPlugin)