diff options
Diffstat (limited to 'indra/newview/CMakeLists.txt')
-rw-r--r-- | indra/newview/CMakeLists.txt | 106 |
1 files changed, 97 insertions, 9 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index da4060ccec..4771dbfa1c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -9,20 +9,28 @@ 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(FMODSTUDIO) include(Hunspell) +if (USE_AUTOBUILD_3P OR USE_CONAN) include(JPEGEncoderBasic) +endif () include(JsonCpp) include(LLAppearance) include(LLAudio) +if (USE_AUTOBUILD_3P OR USE_CONAN) include(LLCA) +endif () include(LLCommon) include(LLCoreHttp) include(LLImage) @@ -38,18 +46,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 @@ -70,7 +89,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 @@ -1404,12 +1423,15 @@ set_source_files_properties( ) 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( @@ -1424,6 +1446,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 @@ -1443,17 +1466,19 @@ 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) + #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) @@ -1640,6 +1665,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} @@ -1940,6 +1969,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() @@ -1951,6 +1987,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/*" @@ -1973,6 +2049,8 @@ foreach(elem ${country_codes}) 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}) @@ -2050,6 +2128,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 @@ -2058,12 +2138,12 @@ if (DARWIN) 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_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") @@ -2118,7 +2198,15 @@ if (DARWIN) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) + if (ENABLE_MEDIA_PLUGINS) + if (DARWIN OR LINUX) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef) + else (DARWIN) + add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc) + endif (DARWIN OR LINUX) + else (ENABLE_MEDIA_PLUGINS) + add_dependencies(${VIEWER_BINARY_NAME} SLPlugin) + endif (ENABLE_MEDIA_PLUGINS) if (ENABLE_SIGNING) set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}") |