diff options
Diffstat (limited to 'indra/newview/CMakeLists.txt')
-rw-r--r-- | indra/newview/CMakeLists.txt | 189 |
1 files changed, 165 insertions, 24 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e0ca0a760f..0bfb0023c2 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -36,10 +36,8 @@ include(UI) include(UnixInstall) include(LLKDU) include(ViewerMiscLibs) - -if (WINDOWS) - include(CopyWinLibs) -endif (WINDOWS) +include(LLLogin) +include(CMakeCopyIfDifferent) include_directories( ${DBUSGLIB_INCLUDE_DIRS} @@ -61,12 +59,14 @@ include_directories( ${LLXUIXML_INCLUDE_DIRS} ${LSCRIPT_INCLUDE_DIRS} ${LSCRIPT_INCLUDE_DIRS}/lscript_compile + ${LLLOGIN_INCLUDE_DIRS} ) set(viewer_SOURCE_FILES llaccordionctrltab.cpp llaccordionctrl.cpp llagent.cpp + llagentlistener.cpp llagentaccess.cpp llagentdata.cpp llagentlanguage.cpp @@ -76,6 +76,7 @@ set(viewer_SOURCE_FILES llanimstatelabels.cpp llappearancemgr.cpp llappviewer.cpp + llappviewerlistener.cpp llassetuploadresponders.cpp llassetuploadqueue.cpp llaudiosourcevo.cpp @@ -258,6 +259,7 @@ set(viewer_SOURCE_FILES llurllineeditorctrl.cpp lllogchat.cpp llloginhandler.cpp + lllogininstance.cpp llmanip.cpp llmaniprotate.cpp llmanipscale.cpp @@ -337,6 +339,7 @@ set(viewer_SOURCE_FILES llpanelpicks.cpp llpanelplace.cpp llpanelplaceinfo.cpp + llpanelshower.cpp llpanelplaces.cpp llpanelplacestab.cpp llpanelprofile.cpp @@ -371,7 +374,6 @@ set(viewer_SOURCE_FILES llspatialpartition.cpp llsplitbutton.cpp llsprite.cpp - llsrv.cpp llstartup.cpp llstatusbar.cpp llstylemap.cpp @@ -416,19 +418,20 @@ set(viewer_SOURCE_FILES lltoolselectland.cpp lltoolselectrect.cpp lltracker.cpp + lluilistener.cpp lluploaddialog.cpp llurl.cpp llurldispatcher.cpp llurlhistory.cpp llurlsimstring.cpp llurlwhitelist.cpp - lluserauth.cpp llvectorperfoptions.cpp llviewchildren.cpp llviewerassetstorage.cpp llvieweraudio.cpp llviewercamera.cpp llviewercontrol.cpp + llviewercontrollistener.cpp llviewerdisplay.cpp llviewerfloaterreg.cpp llviewergenericmessage.cpp @@ -470,6 +473,7 @@ set(viewer_SOURCE_FILES llviewerthrottle.cpp llviewervisualparam.cpp llviewerwindow.cpp + llviewerwindowlistener.cpp llvlcomposition.cpp llvlmanager.cpp llvoavatar.cpp @@ -507,6 +511,7 @@ set(viewer_SOURCE_FILES llworld.cpp llworldmap.cpp llworldmapview.cpp + llxmlrpclistener.cpp llxmlrpctransaction.cpp noise.cpp pipeline.cpp @@ -535,6 +540,7 @@ set(viewer_HEADER_FILES llaccordionctrltab.h llaccordionctrl.h llagent.h + llagentlistener.h llagentaccess.h llagentdata.h llagentlanguage.h @@ -544,6 +550,7 @@ set(viewer_HEADER_FILES llanimstatelabels.h llappearance.h llappviewer.h + llappviewerlistener.h llassetuploadresponders.h llassetuploadqueue.h llaudiosourcevo.h @@ -729,6 +736,7 @@ set(viewer_HEADER_FILES llurllineeditorctrl.h lllogchat.h llloginhandler.h + lllogininstance.h llmanip.h llmaniprotate.h llmanipscale.h @@ -804,6 +812,7 @@ set(viewer_HEADER_FILES llpanelpicks.h llpanelplace.h llpanelplaceinfo.h + llpanelshower.h llpanelplaces.h llpanelplacestab.h llpanelprofile.h @@ -840,7 +849,6 @@ set(viewer_HEADER_FILES llspatialpartition.h llsplitbutton.h llsprite.h - llsrv.h llstartup.h llstatusbar.h llstylemap.h @@ -887,13 +895,13 @@ set(viewer_HEADER_FILES lltoolselectrect.h lltracker.h lluiconstants.h + lluilistener.h lluploaddialog.h llurl.h llurldispatcher.h llurlhistory.h llurlsimstring.h llurlwhitelist.h - lluserauth.h llvectorperfoptions.h llviewchildren.h llviewerassetstorage.h @@ -901,6 +909,7 @@ set(viewer_HEADER_FILES llviewerbuild.h llviewercamera.h llviewercontrol.h + llviewercontrollistener.h llviewerdisplay.h llviewerfloaterreg.h llviewergenericmessage.h @@ -939,6 +948,7 @@ set(viewer_HEADER_FILES llviewerthrottle.h llviewervisualparam.h llviewerwindow.h + llviewerwindowlistener.h llvlcomposition.h llvlmanager.h llvoavatar.h @@ -979,6 +989,7 @@ set(viewer_HEADER_FILES llworld.h llworldmap.h llworldmapview.h + llxmlrpclistener.h llxmlrpctransaction.h macmain.h noise.h @@ -1133,7 +1144,6 @@ if (WINDOWS) comdlg32 ${DINPUT_LIBRARY} ${DXGUID_LIBRARY} - fmodvc kernel32 odbc32 odbccp32 @@ -1177,6 +1187,15 @@ file(GLOB DEFAULT_WIDGET_FILE_GLOB_LIST ${CMAKE_CURRENT_SOURCE_DIR}/skins/default/xui/en/widgets/*.xml) list(APPEND viewer_XUI_FILES ${DEFAULT_WIDGET_FILE_GLOB_LIST}) +file(GLOB SILVER_XUI_FILE_GLOB_LIST + ${CMAKE_CURRENT_SOURCE_DIR}/skins/silver/xui/en-us/*.xml) +list(APPEND viewer_XUI_FILES ${SILVER_XUI_FILE_GLOB_LIST}) + +# Cannot append empty lists in CMake, wait until we have files here. +#file(GLOB SILVER_WIDGET_FILE_GLOB_LIST +# ${CMAKE_CURRENT_SOURCE_DIR}/skins/silver/xui/en-us/widgets/*.xml) +#list(APPEND viewer_XUI_FILES ${SILVER_WIDGET_FILE_GLOB_LIST}) + list(SORT viewer_XUI_FILES) source_group("XUI Files" FILES ${viewer_XUI_FILES}) @@ -1250,23 +1269,23 @@ endif (OPENAL) if (FMOD) set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMOD") - if (NOT WINDOWS) + if (DARWIN) set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp) add_library(fmodwrapper SHARED ${fmodwrapper_SOURCE_FILES}) - set(fmodwrapper_needed_LIBRARIES ${FMOD_LIBRARY}) - if (DARWIN) - list(APPEND fmodwrapper_needed_LIBRARIES ${CARBON_LIBRARY}) - set_target_properties( - fmodwrapper - PROPERTIES - BUILD_WITH_INSTALL_RPATH 1 - INSTALL_NAME_DIR "@executable_path/../Resources" - LINK_FLAGS "-unexported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/fmod_hidden_symbols.exp" - ) - endif (DARWIN) + set(fmodwrapper_needed_LIBRARIES ${FMOD_LIBRARY} ${CARBON_LIBRARY}) + set_target_properties( + fmodwrapper + PROPERTIES + BUILD_WITH_INSTALL_RPATH 1 + INSTALL_NAME_DIR "@executable_path/../Resources" + LINK_FLAGS "-unexported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/fmod_hidden_symbols.exp" + ) set(FMODWRAPPER_LIBRARY fmodwrapper) target_link_libraries(fmodwrapper ${fmodwrapper_needed_LIBRARIES}) - endif (NOT WINDOWS) + else (DARWIN) + # fmodwrapper unnecessary on linux or windows + set(FMODWRAPPER_LIBRARY ${FMOD_LIBRARY}) + endif (DARWIN) endif (FMOD) set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") @@ -1287,6 +1306,11 @@ if (LLKDU_LIBRARY) add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY}) endif (LLKDU_LIBRARY) +# add package files +file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST + ${CMAKE_CURRENT_SOURCE_DIR}/../viewer_components/*.py) +list(APPEND EVENT_HOST_SCRIPTS ${EVENT_HOST_SCRIPT_GLOB_LIST}) + set(PACKAGE OFF CACHE BOOL "Add a package target that builds an installer package.") @@ -1343,7 +1367,24 @@ if (WINDOWS) COMMENT "Copying message.xml to the runtime folder." ) - add_dependencies(${VIEWER_BINARY_NAME} copy_win_libs) + if(WINDOWS) + # Copy Win Libs... + # This happens at build time, not config time. We can't glob files in this cmake. + # *FIX:Mani Write a sub script to glob the files... + # *FIX:Mani Use actually dependencies rather than bulk copy. + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} PRE_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS + -E + copy_directory + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR} + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} + COMMENT "Copying staged dlls." + ) + + add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon llkdu) + endif(WINDOWS) if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts) add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts) @@ -1369,8 +1410,29 @@ if (WINDOWS) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit) if (PACKAGE) - add_custom_target(package ALL DEPENDS ${CMAKE_CFG_INTDIR}/touched.bat) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2 + COMMAND ${PYTHON_EXECUTABLE} + ARGS + ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py + ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CFG_INTDIR} + + DEPENDS + lleventhost + ${EVENT_HOST_SCRIPTS} + ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py) + + add_custom_target(package ALL + DEPENDS + ${CMAKE_CFG_INTDIR}/touched.bat) + # temporarily disable packaging of event_host until hg subrepos get + # sorted out on the parabuild cluster... + #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2) add_dependencies(package windows-updater windows-crash-logger) + + endif (PACKAGE) endif (WINDOWS) @@ -1407,6 +1469,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${WINDOWS_LIBRARIES} ${XMLRPCEPI_LIBRARIES} ${ELFIO_LIBRARIES} + ${LLLOGIN_LIBRARIES} ${GOOGLE_PERFTOOLS_LIBRARIES} ) @@ -1542,6 +1605,7 @@ SET(viewer_TEST_SOURCE_FILES lldateutil.cpp llmediadataclient.cpp llviewerhelputil.cpp + lllogininstance.cpp ) set_source_files_properties( ${viewer_TEST_SOURCE_FILES} @@ -1573,6 +1637,16 @@ LL_ADD_INTEGRATION_TEST(llcapabilitylistener # Don't do these for DARWIN or LINUX here -- they're taken care of by viewer_manifest.py if (WINDOWS) + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS + -E + make_directory + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin + COMMENT "Creating llplugin dir." + ) + get_target_property(BUILT_SLPLUGIN SLPlugin LOCATION) add_custom_command( TARGET ${VIEWER_BINARY_NAME} POST_BUILD @@ -1608,5 +1682,72 @@ if (WINDOWS) ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin COMMENT "Copying Quicktime Plugin to the runtime folder." ) + + #******************************* + # Copy media plugin support dlls + # Debug config runtime files required for the plugins + set(plugins_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") + set(plugins_debug_files + libeay32.dll + qtcored4.dll + qtguid4.dll + qtnetworkd4.dll + qtopengld4.dll + qtwebkitd4.dll + ssleay32.dll + ) + copy_if_different( + ${plugins_debug_src_dir} + "${CMAKE_CURRENT_BINARY_DIR}/Debug/llplugin" + out_targets + ${plugins_debug_files} + ) + set(media_plugin_targets ${media_plugin_targets} ${out_targets}) + + # Release & ReleaseDebInfo config runtime files required for the plugins + set(plugins_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") + set(plugins_release_files + libeay32.dll + qtcore4.dll + qtgui4.dll + qtnetwork4.dll + qtopengl4.dll + qtwebkit4.dll + ssleay32.dll + ) + copy_if_different( + ${plugins_release_src_dir} + "${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin" + out_targets + ${plugins_release_files} + ) + set(media_plugin_targets ${media_plugin_targets} ${out_targets}) + + copy_if_different( + ${plugins_release_src_dir} + "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin" + out_targets + ${plugins_release_files} + ) + set(media_plugin_targets ${media_plugin_targets} ${out_targets}) + + add_custom_target(copy_media_plugin_libs ALL + DEPENDS + ${media_plugin_targets} + ) + + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS + -E + copy_directory + ${CMAKE_BINARY_DIR}/test_apps/llplugintest/${CMAKE_CFG_INTDIR}/imageformats + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin/imageformats + COMMENT "Copying llpluging imageformat libs." + ) + + add_dependencies(${VIEWER_BINARY_NAME} llmediaplugintest copy_media_plugin_libs) + endif (WINDOWS) |