summaryrefslogtreecommitdiff
path: root/indra/newview/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/CMakeLists.txt')
-rw-r--r--indra/newview/CMakeLists.txt151
1 files changed, 131 insertions, 20 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 3aaeb426da..d639840f70 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -9,18 +9,26 @@ include(Linking)
include(Boost)
include(bugsplat)
+if (USE_AUTOBUILD_3P OR USE_CONAN)
include(BuildPackagesInfo)
+endif ()
include(BuildVersion)
include(CMakeCopyIfDifferent)
+if (USE_AUTOBUILD_3P OR USE_CONAN)
include(CubemapToEquirectangularJS)
include(DBusGlib)
+endif ()
include(DragDrop)
include(EXPAT)
include(Hunspell)
+if (USE_AUTOBUILD_3P OR USE_CONAN)
include(JPEGEncoderBasic)
+endif ()
include(LLAppearance)
include(LLAudio)
+if (USE_AUTOBUILD_3P OR USE_CONAN)
include(LLCA)
+endif ()
include(LLCommon)
include(LLCoreHttp)
include(LLImage)
@@ -36,18 +44,29 @@ include(OpenSSL)
include(PNG)
include(TemplateCheck)
include(TinyEXR)
+if (NOT USESYSTEMLIBS)
include(ThreeJS)
+endif ()
include(Tracy)
include(UI)
include(ViewerMiscLibs)
+if (USE_AUTOBUILD_3P OR USE_CONAN)
include(ViewerManager)
+endif ()
include(VisualLeakDetector)
include(VulkanGltf)
include(ZLIBNG)
include(URIPARSER)
include(LLPrimitive)
-
-if (NOT HAVOK_TPV)
+if (ENABLE_MEDIA_PLUGINS)
+ include(LibVLCPlugin)
+ if (DARWIN OR LINUX)
+ include(CEFPlugin)
+ endif (DARWIN OR LINUX)
+endif (ENABLE_MEDIA_PLUGINS)
+include(UnixInstall)
+
+if ((USE_AUTOBUILD_3P OR USE_CONAN) AND NOT HAVOK_TPV)
# When using HAVOK_TPV, the library is precompiled, so no need for this
# Stub and probably havok lib itself is a hack, autobuild loads a 3p that really is a source tarball
@@ -68,7 +87,7 @@ if (NOT HAVOK_TPV)
target_compile_options( llphysicsextensions PRIVATE -Wno-unused-local-typedef)
endif (DARWIN)
endif()
-endif (NOT HAVOK_TPV)
+endif ((USE_AUTOBUILD_3P OR USE_CONAN) AND NOT HAVOK_TPV)
set(viewer_SOURCE_FILES
gltfscenemanager.cpp
@@ -228,6 +247,8 @@ set(viewer_SOURCE_FILES
llfloaterhandler.cpp
llfloaterhelpbrowser.cpp
llfloaterhoverheight.cpp
+ mpfloatertuning.cpp
+ fsfloatersearch.cpp
llfloaterhowto.cpp
llfloaterhud.cpp
llfloaterimagepreview.cpp
@@ -888,6 +909,8 @@ set(viewer_HEADER_FILES
llfloaterhandler.h
llfloaterhelpbrowser.h
llfloaterhoverheight.h
+ mpfloatertuning.h
+ fsfloatersearch.h
llfloaterhowto.h
llfloaterhud.h
llfloaterimagepreview.h
@@ -1389,18 +1412,21 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt"
"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}\n")
set_source_files_properties(
- llversioninfo.cpp tests/llversioninfo_test.cpp
+ llversioninfo.cpp tests/llversioninfo_test.cpp
PROPERTIES
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
)
if (DARWIN)
+# if (NOT USESYSTEMLIBS)
LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp)
LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.mm)
LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.h)
+# endif (NOT USESYSTEMLIBS)
LIST(APPEND viewer_SOURCE_FILES llfilepicker_mac.mm)
LIST(APPEND viewer_HEADER_FILES llfilepicker_mac.h)
+# if (NOT USESYSTEMLIBS)
# This should be compiled with the viewer.
LIST(APPEND viewer_SOURCE_FILES llappdelegate-objc.mm)
set_source_files_properties(
@@ -1415,6 +1441,7 @@ if (DARWIN)
# warnings.
COMPILE_FLAGS "-fmodules -fcxx-modules -Wno-nullability-completeness"
)
+# endif (NOT USESYSTEMLIBS)
# Add resource files to the project.
set(viewer_RESOURCE_FILES
@@ -1433,17 +1460,18 @@ if (DARWIN)
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
endif (DARWIN)
-if (LINUX)
+if (USESYSTEMLIBS AND NOT DARWIN)
LIST(APPEND viewer_SOURCE_FILES llappviewerlinux.cpp)
set_source_files_properties(
llappviewerlinux.cpp
PROPERTIES
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
)
- LIST(APPEND viewer_SOURCE_FILES llappviewerlinux_api_dbus.cpp)
+ if (NOT (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang"))
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
+ endif ()
-endif (LINUX)
+endif (USESYSTEMLIBS AND NOT DARWIN)
if (WINDOWS)
@@ -1590,7 +1618,7 @@ endif (WINDOWS)
file(GLOB_RECURSE viewer_XUI_FILES LIST_DIRECTORIES FALSE
${CMAKE_CURRENT_SOURCE_DIR}/skins/*.xml)
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/skins PREFIX "XUI Files" FILES ${viewer_XUI_FILES})
-set_source_files_properties(${viewer_XUI_FILES}
+set_source_files_properties(${viewer_XUI_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
@@ -1598,7 +1626,7 @@ list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES FALSE
${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders/*.glsl)
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders PREFIX "Shaders" FILES ${viewer_SHADER_FILES})
-set_source_files_properties(${viewer_SHADER_FILES}
+set_source_files_properties(${viewer_SHADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
list(APPEND viewer_SOURCE_FILES ${viewer_SHADER_FILES})
@@ -1630,6 +1658,10 @@ set(viewer_APPSETTINGS_FILES
featuretable_mac.txt
)
+if (NOT (USE_AUTOBUILD_3P OR USE_CONAN))
+ list(REMOVE_ITEM viewer_APPSETTINGS_FILES packages-info.txt)
+endif ()
+
source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES})
set_source_files_properties(${viewer_APPSETTINGS_FILES}
@@ -1879,7 +1911,7 @@ endif (WINDOWS)
# one of these being libz where you can find four or more versions in play
# at once. On Linux, libz can be found at link and run time via a number
# of paths:
-#
+#
# => -lfreetype
# => libz.so.1 (on install machine, not build)
# => -lSDL
@@ -1921,6 +1953,13 @@ target_link_libraries(${VIEWER_BINARY_NAME}
ll::tracy
)
+if (ENABLE_MEDIA_PLUGINS)
+ target_link_libraries(${VIEWER_BINARY_NAME} ll::libvlc )
+ if (DARWIN OR LINUX)
+ target_link_libraries(${VIEWER_BINARY_NAME} ll::cef )
+ endif (DARWIN OR LINUX)
+endif (ENABLE_MEDIA_PLUGINS)
+
if( TARGET ll::intel_memops )
target_link_libraries(${VIEWER_BINARY_NAME} ll::intel_memops )
endif()
@@ -1932,6 +1971,46 @@ endif()
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
"Path to artwork files.")
+set_source_files_properties(llinventorygallery.cpp PROPERTIES COMPILE_FLAGS
+ -Wno-unused-but-set-variable)
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ set_source_files_properties(llappviewerlinux.cpp PROPERTIES
+ COMPILE_FLAGS -Wno-dangling-gsl
+ )
+ set_source_files_properties(llviewerstats.cpp PROPERTIES
+ COMPILE_FLAGS -Wno-unused-value)
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ set_source_files_properties(
+ llface.cpp
+ llhttpretrypolicy.cpp
+ llmodelpreview.cpp
+ llpanelface.cpp
+ lltexturefetch.cpp
+ PROPERTIES COMPILE_FLAGS -Wno-maybe-uninitialized)
+ set_source_files_properties(llfasttimerview.cpp PROPERTIES
+ COMPILE_FLAGS -Wno-nonnull)
+ set_source_files_properties(llinventorygallerymenu.cpp PROPERTIES
+ COMPILE_FLAGS -Wno-uninitialized)
+ set_source_files_properties(llviewerstats.cpp PROPERTIES
+ COMPILE_FLAGS -Wno-unused-value)
+ set_source_files_properties(llurl.cpp PROPERTIES COMPILE_FLAGS
+ -Wno-stringop-truncation)
+ set_source_files_properties(
+ llfloaterimsessiontab.cpp
+ llfloatersimplesnapshot.cpp
+ llfloatersidepanelcontainer.cpp
+ llinventorypanel.cpp
+ llpanelmaininventory.cpp
+ llpathfindingnavmesh.cpp
+ llsidepanelinventory.cpp
+ PROPERTIES COMPILE_FLAGS -Wno-dangling-reference
+ )
+ set_source_files_properties(
+ gltf/animation.cpp
+ gltf/primitive.cpp
+ PROPERTIES COMPILE_FLAGS -Wno-unused-function)
+endif ()
+
message("Copying fonts")
file(GLOB FONT_FILE_GLOB_LIST
"${AUTOBUILD_INSTALL_DIR}/fonts/*"
@@ -1950,10 +2029,12 @@ foreach(elem ${country_codes})
set(emoji_mapping_src_file
"${emoji_mapping_src_folder}/${elem}/emoji_characters.xml")
set(emoji_mapping_dst_file
- "${emoji_mapping_dst_folder}/${elem}/emoji_characters.xml")
+ "${emoji_mapping_dst_folder}/${elem}/emoji_characters.xml")
configure_file(${emoji_mapping_src_file} ${emoji_mapping_dst_file} COPYONLY)
endforeach()
+if (NOT USESYSTEMLIBS)
+
if (LINUX)
set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION})
@@ -2029,6 +2110,8 @@ if (LINUX)
endif (PACKAGE)
endif (LINUX)
+endif (NOT USESYSTEMLIBS)
+
if (DARWIN)
# These all get set with PROPERTIES. It's not that the property names are
# magically known to CMake -- it's that these names are referenced in the
@@ -2036,19 +2119,19 @@ if (DARWIN)
set(product "${VIEWER_CHANNEL}")
set(MACOSX_EXECUTABLE_NAME "${VIEWER_CHANNEL}")
set(MACOSX_BUNDLE_INFO_STRING "${VIEWER_CHANNEL}")
- set(MACOSX_BUNDLE_ICON_FILE "secondlife.icns")
- set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.secondlife.indra.viewer")
+ set(MACOSX_BUNDLE_ICON_FILE "${VIEWER_CHANNEL}.icns")
+ set(MACOSX_BUNDLE_GUI_IDENTIFIER "net.megapahit.viewer")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${VIEWER_CHANNEL} ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
- set(MACOSX_BUNDLE_BUNDLE_NAME "SecondLife")
+ set(MACOSX_BUNDLE_BUNDLE_NAME "Megapahit")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
set(MACOSX_BUNDLE_BUNDLE_VERSION "${VIEWER_SHORT_VERSION}${VIEWER_MACOSX_PHASE}${VIEWER_REVISION}")
- set(MACOSX_BUNDLE_COPYRIGHT "Copyright © Linden Research, Inc. 2020")
+ set(MACOSX_BUNDLE_COPYRIGHT "Copyright © Megapahit. 2024")
set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "SecondLife.nib")
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "LLApplication")
# https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/
set(CMAKE_MACOSX_RPATH 1)
-
+
set_target_properties(
${VIEWER_BINARY_NAME}
PROPERTIES
@@ -2072,6 +2155,9 @@ if (DARWIN)
"${VIEWER_APP_BUNDLE}/Contents/Info.plist"
)
+ if (INSTALL)
+ install(PROGRAMS ${VIEWER_APP_EXE} DESTINATION ../MacOS)
+ else (INSTALL)
add_custom_command(
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
COMMAND ${PYTHON_EXECUTABLE}
@@ -2095,8 +2181,13 @@ if (DARWIN)
${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
+ endif (INSTALL)
+ if (ENABLE_MEDIA_PLUGINS)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef)
+ else (ENABLE_MEDIA_PLUGINS)
+ add_dependencies(${VIEWER_BINARY_NAME} SLPlugin)
+ endif (ENABLE_MEDIA_PLUGINS)
if (ENABLE_SIGNING)
set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}")
@@ -2105,6 +2196,26 @@ if (DARWIN)
endif (ENABLE_SIGNING)
if (PACKAGE)
+ if (USESYSTEMLIBS)
+ set(CPACK_DMG_VOLUME_NAME "${product} Installer"
+ CACHE STRING "Disk image volume name.")
+ set(CPACK_DMG_FORMAT UDRW CACHE STRING "Disk image format.")
+ set(CPACK_DMG_DS_STORE
+ ${CMAKE_CURRENT_SOURCE_DIR}/installers/darwin/release-dmg/_DS_Store
+ CACHE STRING "Disk image .DS_Store file.")
+ set(CPACK_DMG_DS_STORE_SETUP_SCRIPT
+ ${CMAKE_CURRENT_SOURCE_DIR}/installers/darwin/dmg-cleanup.applescript
+ CACHE STRING "Disk image AppleScript file.")
+ set(CPACK_DMG_BACKGROUND_IMAGE
+ ${CMAKE_CURRENT_SOURCE_DIR}/installers/darwin/release-dmg/background.jpg
+ CACHE STRING "Disk image background image.")
+ set(CPACK_BUNDLE_NAME ${product} CACHE STRING "Bundle name.")
+ set(CPACK_BUNDLE_PLIST ${VIEWER_APP_BUNDLE}/Contents/Info.plist
+ CACHE STRING "Bundle Property List file.")
+ set(CPACK_BUNDLE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/secondlife.icns
+ CACHE STRING "Bundle icon file.")
+
+ else (USESYSTEMLIBS)
add_custom_target(llpackage ALL DEPENDS ${VIEWER_BINARY_NAME})
add_custom_command(
@@ -2129,6 +2240,7 @@ if (DARWIN)
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
+ endif (USESYSTEMLIBS)
endif (PACKAGE)
endif (DARWIN)
@@ -2224,7 +2336,7 @@ if (LL_TESTS)
# llremoteparcelrequest.cpp
llviewerhelputil.cpp
llversioninfo.cpp
-# llvocache.cpp
+# llvocache.cpp
llworldmap.cpp
llworldmipmap.cpp
)
@@ -2233,7 +2345,7 @@ if (LL_TESTS)
llworldmap.cpp
llworldmipmap.cpp
PROPERTIES
- LL_TEST_ADDITIONAL_SOURCE_FILES
+ LL_TEST_ADDITIONAL_SOURCE_FILES
tests/llviewertexture_stub.cpp
#llviewertexturelist.cpp
)
@@ -2267,7 +2379,7 @@ if (LL_TESTS)
llworldmap.cpp
llworldmipmap.cpp
PROPERTIES
- LL_TEST_ADDITIONAL_SOURCE_FILES
+ LL_TEST_ADDITIONAL_SOURCE_FILES
tests/llviewertexture_stub.cpp
)
@@ -2367,4 +2479,3 @@ if (LL_TESTS)
endif (LL_TESTS)
check_message_template(${VIEWER_BINARY_NAME})
-