summaryrefslogtreecommitdiff
path: root/indra/newview/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-04-07 00:20:59 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-04-07 00:20:59 +0300
commitf1095d78315818642e62b7f4af9984557e176b5d (patch)
tree3606970e28e1101befbc7b42ccd6033cfd839e7b /indra/newview/CMakeLists.txt
parent4042ed9701fcfa42c03fc285a757aa348f800e33 (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
Merge branch 'main' into marchcat/main-contrib-merge
# Conflicts: # indra/cmake/CMakeLists.txt # indra/llcommon/llsdserialize.cpp # indra/llcommon/llsdserialize.h # indra/llcommon/tests/llleap_test.cpp # indra/newview/llfilepicker.h # indra/newview/llfilepicker_mac.h # indra/newview/llfilepicker_mac.mm # indra/newview/skins/default/xui/en/strings.xml
Diffstat (limited to 'indra/newview/CMakeLists.txt')
-rw-r--r--indra/newview/CMakeLists.txt555
1 files changed, 167 insertions, 388 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 9eee5338ec..361718a13e 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -23,25 +23,13 @@ include(JsonCpp)
include(LLAppearance)
include(LLAudio)
include(LLCA)
-include(LLCharacter)
include(LLCommon)
include(LLCoreHttp)
include(LLImage)
-include(LLImageJ2COJ)
-include(LLInventory)
include(LLKDU)
-include(LLLogin)
-include(LLMath)
-include(LLMeshOptimizer)
-include(LLMessage)
include(LLPhysicsExtensions)
-include(LLPlugin)
include(LLPrimitive)
-include(LLRender)
-include(LLUI)
-include(LLFileSystem)
include(LLWindow)
-include(LLXML)
include(NDOF)
include(NVAPI)
include(OPENAL)
@@ -52,64 +40,36 @@ include(TemplateCheck)
include(ThreeJS)
include(Tracy)
include(UI)
-include(UnixInstall)
include(ViewerMiscLibs)
include(ViewerManager)
include(VisualLeakDetector)
include(ZLIBNG)
include(URIPARSER)
+include(LLPrimitive)
if (NOT HAVOK_TPV)
# When using HAVOK_TPV, the library is precompiled, so no need for this
- add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions)
-endif (NOT HAVOK_TPV)
-if(FMODSTUDIO)
- include_directories(${FMODSTUDIO_INCLUDE_DIR})
-endif(FMODSTUDIO)
-
-include_directories(
- ${DBUSGLIB_INCLUDE_DIRS}
- ${JSONCPP_INCLUDE_DIR}
- ${LLAUDIO_INCLUDE_DIRS}
- ${LLCHARACTER_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLCOREHTTP_INCLUDE_DIRS}
- ${LLPHYSICS_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLKDU_INCLUDE_DIRS}
- ${LLINVENTORY_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESHOPTIMIZER_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLPLUGIN_INCLUDE_DIRS}
- ${LLPRIMITIVE_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLUI_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- ${LLLOGIN_INCLUDE_DIRS}
- ${LIBS_PREBUILT_DIR}/include/collada
- ${LIBS_PREBUILD_DIR}/include/hunspell
- ${OPENAL_LIB_INCLUDE_DIRS}
- ${LIBS_PREBUILT_DIR}/include/collada/1.4
- ${LLAPPEARANCE_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${TRACY_INCLUDE_DIR}
- )
+ # Stub and probably havok lib itself is a hack, autobuild loads a 3p that really is a source tarball
+ # which includes a CMakeList.txt and then this whole source tree gets pushed into out build ... :/
+ # To make matters worse there is a internal assumption about the structure of the viewers CMake layout,
+ # which means we need to duct tape this togther ...
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS}
- )
+ add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions)
+
+ # Another hack that works with newer cmake versions:
+ cmake_policy( SET CMP0079 NEW)
+ if( TARGET llphysicsextensionsstub )
+ target_link_libraries(llphysicsextensionsstub llcommon llmath)
+ endif()
+ if( TARGET llphysicsextensions )
+ target_link_libraries(llphysicsextensions llrender )
+ if (DARWIN)
+ target_compile_options( llphysicsextensions PRIVATE -Wno-unused-local-typedef)
+ endif (DARWIN)
+ endif()
+endif (NOT HAVOK_TPV)
-if (USE_BUGSPLAT)
- include_directories(AFTER
- ${BUGSPLAT_INCLUDE_DIR}
- )
-endif (USE_BUGSPLAT)
set(viewer_SOURCE_FILES
groupchatlistener.cpp
@@ -1414,25 +1374,6 @@ if (DARWIN)
COMPILE_FLAGS "-fmodules -fcxx-modules -Wno-nullability-completeness"
)
- find_library(AGL_LIBRARY AGL)
- find_library(APPKIT_LIBRARY AppKit)
- find_library(COCOA_LIBRARY Cocoa)
- find_library(IOKIT_LIBRARY IOKit)
- find_library(COREAUDIO_LIBRARY CoreAudio)
-
- set(viewer_LIBRARIES
- ${COCOA_LIBRARY}
- ${AGL_LIBRARY}
- ${IOKIT_LIBRARY}
- ${COREAUDIO_LIBRARY}
- )
-
- if (USE_BUGSPLAT)
- list(APPEND viewer_LIBRARIES
- ${BUGSPLAT_LIBRARIES}
- )
- endif (USE_BUGSPLAT)
-
# Add resource files to the project.
set(viewer_RESOURCE_FILES
secondlife.icns
@@ -1446,12 +1387,7 @@ if (DARWIN)
Japanese.lproj/language.txt
Korean.lproj/language.txt
)
- set_source_files_properties(
- ${viewer_RESOURCE_FILES}
- PROPERTIES
- HEADER_FILE_ONLY TRUE
- #MACOSX_PACKAGE_LOCATION Resources #don't do this! this tells cmake to copy the files.
- )
+
SOURCE_GROUP("Resources" FILES ${viewer_RESOURCE_FILES})
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
endif (DARWIN)
@@ -1466,12 +1402,6 @@ if (LINUX)
LIST(APPEND viewer_SOURCE_FILES llappviewerlinux_api_dbus.cpp)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
- set(viewer_LIBRARIES
- Xinerama
- )
- if (OPENAL)
- LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES})
- endif (OPENAL)
endif (LINUX)
if (WINDOWS)
@@ -1490,19 +1420,6 @@ if (WINDOWS)
llwindebug.h
)
- # precompiled header configuration
- # llviewerprecompiledheaders.cpp generates
- # the .pch file.
- # All sources added to viewer_SOURCE_FILES
- # at this point use it.
- if(USE_PRECOMPILED_HEADERS)
- set_source_files_properties(llviewerprecompiledheaders.cpp
- PROPERTIES
- COMPILE_FLAGS "/Ycllviewerprecompiledheaders.h"
- )
- set(viewer_SOURCE_FILES "${viewer_SOURCE_FILES}" llviewerprecompiledheaders.cpp)
- endif(USE_PRECOMPILED_HEADERS)
-
# Replace the icons with the appropriate ones for the channel
# ('test' is the default)
set(ICON_PATH "test")
@@ -1599,26 +1516,7 @@ if (WINDOWS)
SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES})
- if (NOT USESYSTEMLIBS)
- list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
- endif (NOT USESYSTEMLIBS)
-
-# see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs)
- set(viewer_LIBRARIES
- opengl32
- ${WINDOWS_LIBRARIES}
- comdlg32
- dxguid
- imm32
- kernel32
- odbc32
- odbccp32
- oleaut32
- shell32
- Vfw32
- wer
- winspool
- )
+ list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
find_library(INTEL_MEMOPS_LIBRARY
NAMES ll_intel_memops
@@ -1628,8 +1526,10 @@ if (WINDOWS)
)
mark_as_advanced(INTEL_MEMOPS_LIBRARY)
+
if (INTEL_MEMOPS_LIBRARY)
- list(APPEND viewer_LIBRARIES ${INTEL_MEMOPS_LIBRARY})
+ add_library( ll::intel_memops INTERFACE IMPORTED )
+ target_link_libraries( ll::intel_memops ${INTEL_MEMOPS_LIBRARY} )
endif (INTEL_MEMOPS_LIBRARY)
if (ADDRESS_SIZE EQUAL 64)
@@ -1641,9 +1541,6 @@ if (WINDOWS)
LIST(APPEND viewer_SOURCE_FILES windows.manifest)
endif (ADDRESS_SIZE EQUAL 64)
- if (OPENAL)
- LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES})
- endif (OPENAL)
endif (WINDOWS)
# Add the xui files. This is handy for searching for xui elements
@@ -1722,9 +1619,7 @@ source_group("Character File" FILES ${viewer_CHARACTER_FILES})
set_source_files_properties(${viewer_CHARACTER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
-if (NOT USESYSTEMLIBS)
- list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
-endif (NOT USESYSTEMLIBS)
+list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
if (WINDOWS)
file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi)
@@ -1737,28 +1632,18 @@ if (WINDOWS)
list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES})
endif (WINDOWS)
-if (OPENAL)
- set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL")
-endif (OPENAL)
-
-if (FMODSTUDIO)
- set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO")
- set(FMODWRAPPER_LIBRARY ${FMODSTUDIO_LIBRARY})
-endif (FMODSTUDIO)
-
-set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
-
if (HAVOK OR HAVOK_TPV)
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_HAVOK")
endif (HAVOK OR HAVOK_TPV)
-# progress view disables/enables icons based on available packages
-set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
+if( DEFINED LLSTARTUP_COMPILE_FLAGS )
+ # progress view disables/enables icons based on available packages
+ set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
-list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
+ set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
+endif()
-set_source_files_properties(${viewer_HEADER_FILES}
- PROPERTIES HEADER_FILE_ONLY TRUE)
+list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
add_executable(${VIEWER_BINARY_NAME}
WIN32
@@ -1766,17 +1651,6 @@ add_executable(${VIEWER_BINARY_NAME}
${viewer_SOURCE_FILES}
)
-if (SDL_FOUND)
- set_property(TARGET ${VIEWER_BINARY_NAME}
- PROPERTY COMPILE_DEFINITIONS LL_SDL=1
- )
-endif (SDL_FOUND)
-
-if (USE_BUGSPLAT)
- set_property(TARGET ${VIEWER_BINARY_NAME}
- PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
-endif (USE_BUGSPLAT)
-
# add package files
file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST
${CMAKE_CURRENT_SOURCE_DIR}/../viewer_components/*.py)
@@ -1795,11 +1669,7 @@ if (WINDOWS)
)
if(USE_PRECOMPILED_HEADERS)
- set_target_properties(
- ${VIEWER_BINARY_NAME}
- PROPERTIES
- COMPILE_FLAGS "/Yullviewerprecompiledheaders.h"
- )
+ target_precompile_headers( ${VIEWER_BINARY_NAME} PRIVATE llviewerprecompiledheaders.h )
endif(USE_PRECOMPILED_HEADERS)
# If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency
@@ -1818,67 +1688,51 @@ if (WINDOWS)
# The following commented dependencies are determined at variably at build time. Can't do this here.
${CMAKE_SOURCE_DIR}/../etc/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapriconv-1.dll
- ${SHARED_LIB_STAGING_DIR}/Release/libcollada14dom22.dll
- ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libcollada14dom22.dll
- ${SHARED_LIB_STAGING_DIR}/Debug/libcollada14dom22-d.dll
- ${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll
- ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll
- ${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll
- ${SHARED_LIB_STAGING_DIR}/Release/libhunspell.dll
- ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libhunspell.dll
- ${SHARED_LIB_STAGING_DIR}/Debug/libhunspell.dll
- ${SHARED_LIB_STAGING_DIR}/Release/uriparser.dll
- ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/uriparser.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libsndfile-1.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ca-bundle.crt
- ${GOOGLE_PERF_TOOLS_SOURCE}
+ ${SHARED_LIB_STAGING_DIR}/openjp2.dll
+ ${SHARED_LIB_STAGING_DIR}/libhunspell.dll
+ ${SHARED_LIB_STAGING_DIR}/uriparser.dll
+ #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/SLVoice.exe
+ #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll
+ #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxoal.dll
+ ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt
${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt
${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/featuretable_xp.txt
${viewer_APPSETTINGS_FILES}
SLPlugin
media_plugin_cef
media_plugin_libvlc
media_plugin_example
- winmm_shim
)
if (ADDRESS_SIZE EQUAL 64)
- list(APPEND COPY_INPUT_DEPENDENCIES
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk_x64.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp_x64.dll
- ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1-x64.dll
- ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1-x64.dll
- )
+ list(APPEND COPY_INPUT_DEPENDENCIES
+ ${SHARED_LIB_STAGING_DIR}/vivoxsdk_x64.dll
+ ${SHARED_LIB_STAGING_DIR}/ortp_x64.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1-x64.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1-x64.dll
+ )
else (ADDRESS_SIZE EQUAL 64)
- list(APPEND COPY_INPUT_DEPENDENCIES
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll
- ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1.dll
- ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1.dll
- )
+ list(APPEND COPY_INPUT_DEPENDENCIES
+ ${SHARED_LIB_STAGING_DIR}/vivoxsdk.dll
+ ${SHARED_LIB_STAGING_DIR}/ortp.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1.dll
+ )
endif (ADDRESS_SIZE EQUAL 64)
- if (FMODSTUDIO)
+ if (TARGET ll::fmodstudio)
list(APPEND COPY_INPUT_DEPENDENCIES
- ${SHARED_LIB_STAGING_DIR}/Release/fmod.dll
- ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll
+ ${SHARED_LIB_STAGING_DIR}/fmod.dll
${SHARED_LIB_STAGING_DIR}/Debug/fmodL.dll
)
- endif (FMODSTUDIO)
+ endif ()
- if (OPENAL)
+ if (TARGET ll::openal)
list(APPEND COPY_INPUT_DEPENDENCIES
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/OpenAL32.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/alut.dll
+ ${SHARED_LIB_STAGING_DIR}/OpenAL32.dll
+ ${SHARED_LIB_STAGING_DIR}/alut.dll
)
- endif (OPENAL)
+ endif ()
add_custom_command(
OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat
@@ -1889,16 +1743,16 @@ if (WINDOWS)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
- --buildtype=${CMAKE_BUILD_TYPE}
+ --buildtype=$<CONFIG>
"--channel=${VIEWER_CHANNEL}"
--configuration=${CMAKE_CFG_INTDIR}
- --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ --dest=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>
--grid=${GRID}
--source=${CMAKE_CURRENT_SOURCE_DIR}
- --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat
+ --touch=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/copy_touched.bat
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
@@ -1945,21 +1799,21 @@ if (WINDOWS)
OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat
COMMAND ${PYTHON_EXECUTABLE}
ARGS
- ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
- --arch=${ARCH}
- --artwork=${ARTWORK_DIR}
- "--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
- --build=${CMAKE_CURRENT_BINARY_DIR}
- --buildtype=${CMAKE_BUILD_TYPE}
- "--channel=${VIEWER_CHANNEL}"
- --configuration=${CMAKE_CFG_INTDIR}
- --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- --grid=${GRID}
- --source=${CMAKE_CURRENT_SOURCE_DIR}
- --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat
- --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ --arch=${ARCH}
+ --artwork=${ARTWORK_DIR}
+ "--bugsplat=${BUGSPLAT_DB}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
+ --build=${CMAKE_CURRENT_BINARY_DIR}
+ --buildtype=$<CONFIG>
+ "--channel=${VIEWER_CHANNEL}"
+ --configuration=${CMAKE_CFG_INTDIR}
+ --dest=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>
+ --grid=${GRID}
+ --source=${CMAKE_CURRENT_SOURCE_DIR}
+ --touch=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/touched.bat
+ --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
DEPENDS
${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
@@ -1968,8 +1822,7 @@ if (WINDOWS)
)
add_custom_target(llpackage ALL DEPENDS
- ${CMAKE_CFG_INTDIR}/touched.bat
- windows-setup-build-all
+ ${CMAKE_CFG_INTDIR}/touched.bat
)
# temporarily disable packaging of event_host until hg subrepos get
# sorted out on the parabuild cluster...
@@ -2018,61 +1871,38 @@ endif (WINDOWS)
# modern version.
target_link_libraries(${VIEWER_BINARY_NAME}
- ${LEGACY_STDIO_LIBS}
- ${PNG_PRELOAD_ARCHIVES}
- ${ZLIBNG_PRELOAD_ARCHIVES}
- ${URIPARSER_PRELOAD_ARCHIVES}
- ${GOOGLE_PERFTOOLS_LIBRARIES}
- ${LLAUDIO_LIBRARIES}
- ${LLCHARACTER_LIBRARIES}
- ${LLIMAGE_LIBRARIES}
- ${LLINVENTORY_LIBRARIES}
- ${LLMESHOPTIMIZER_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLPLUGIN_LIBRARIES}
- ${LLPRIMITIVE_LIBRARIES}
- ${LLRENDER_LIBRARIES}
- ${FREETYPE_LIBRARIES}
- ${LLUI_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLWINDOW_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${NDOF_LIBRARY}
- ${NVAPI_LIBRARY}
- ${HUNSPELL_LIBRARY}
- ${viewer_LIBRARIES}
- ${BOOST_PROGRAM_OPTIONS_LIBRARY}
- ${BOOST_REGEX_LIBRARY}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${DBUSGLIB_LIBRARIES}
- ${OPENGL_LIBRARIES}
- ${FMODWRAPPER_LIBRARY} # must come after LLAudio
- ${OPENGL_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- ${SDL_LIBRARY}
- ${SMARTHEAP_LIBRARY}
- ${UI_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${EXPAT_LIBRARIES}
- ${XMLRPCEPI_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${LLLOGIN_LIBRARIES}
- ${LLPHYSICS_LIBRARIES}
- ${LLPHYSICSEXTENSIONS_LIBRARIES}
- ${LLAPPEARANCE_LIBRARIES}
- ${TRACY_LIBRARY}
- )
+ llaudio
+ llcharacter
+ llimage
+ llinventory
+ llmessage
+ llplugin
+ llprimitive
+ llrender
+ llui
+ llfilesystem
+ llwindow
+ llxml
+ llmath
+ llcorehttp
+ llcommon
+ llmeshoptimizer
+ ll::ndof
+ lllogin
+ llprimitive
+ llappearance
+ ${LLPHYSICSEXTENSIONS_LIBRARIES}
+ ll::bugsplat
+ ll::tracy
+ )
-if (USE_BUGSPLAT)
- target_link_libraries(${VIEWER_BINARY_NAME}
- ${BUGSPLAT_LIBRARIES}
- )
-endif (USE_BUGSPLAT)
+if( TARGET ll::intel_memops )
+ target_link_libraries(${VIEWER_BINARY_NAME} ll::intel_memops )
+endif()
+
+if( TARGET ll::nvapi )
+ target_link_libraries(${VIEWER_BINARY_NAME} ll::nvapi )
+endif()
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
"Path to artwork files.")
@@ -2084,14 +1914,13 @@ if (LINUX)
set(COPY_INPUT_DEPENDENCIES
${VIEWER_BINARY_NAME}
SLPlugin
- media_plugin_gstreamer010
- media_plugin_libvlc
+ #media_plugin_gstreamer010
llcommon
)
- if (NOT USE_BUGSPLAT)
- LIST(APPEND COPY_INPUT_DEPENDENCIES linux-crash-logger)
- endif (NOT USE_BUGSPLAT)
+ #if (NOT USE_BUGSPLAT)
+ # LIST(APPEND COPY_INPUT_DEPENDENCIES linux-crash-logger)
+ #endif (NOT USE_BUGSPLAT)
add_custom_command(
OUTPUT ${product}.tar.bz2
@@ -2101,8 +1930,8 @@ if (LINUX)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"
@@ -2129,8 +1958,8 @@ if (LINUX)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"
@@ -2188,7 +2017,7 @@ if (DARWIN)
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${MACOSX_BUNDLE_GUI_IDENTIFIER}"
)
- set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app")
+ set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/${product}.app")
set(VIEWER_APP_EXE "${VIEWER_APP_BUNDLE}/Contents/MacOS/${product}")
set(VIEWER_APP_DSYM "${VIEWER_APP_EXE}.dSYM")
set(VIEWER_APP_XCARCHIVE "${VIEWER_APP_BUNDLE}/../${product}.xcarchive.zip")
@@ -2207,10 +2036,10 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
- --buildtype=${CMAKE_BUILD_TYPE}
+ --buildtype=$<CONFIG>
--bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER}
"--channel=${VIEWER_CHANNEL}"
--configuration=${CMAKE_CFG_INTDIR}
@@ -2238,22 +2067,22 @@ if (DARWIN)
TARGET llpackage POST_BUILD
COMMAND ${PYTHON_EXECUTABLE}
ARGS
- ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
- --arch=${ARCH}
- --artwork=${ARTWORK_DIR}
- "--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
- --build=${CMAKE_CURRENT_BINARY_DIR}
- --buildtype=${CMAKE_BUILD_TYPE}
- "--channel=${VIEWER_CHANNEL}"
- --configuration=${CMAKE_CFG_INTDIR}
- --dest=${VIEWER_APP_BUNDLE}
- --grid=${GRID}
- --source=${CMAKE_CURRENT_SOURCE_DIR}
- --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
- --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
- ${SIGNING_SETTING}
+ ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ --arch=${ARCH}
+ --artwork=${ARTWORK_DIR}
+ "--bugsplat=${BUGSPLAT_DB}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
+ --build=${CMAKE_CURRENT_BINARY_DIR}
+ --buildtype=$<CONFIG>
+ "--channel=${VIEWER_CHANNEL}"
+ --configuration=${CMAKE_CFG_INTDIR}
+ --dest=${VIEWER_APP_BUNDLE}
+ --grid=${GRID}
+ --source=${CMAKE_CURRENT_SOURCE_DIR}
+ --touch=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/.${product}.bat
+ --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
+ ${SIGNING_SETTING}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
@@ -2382,10 +2211,15 @@ if (LL_TESTS)
)
set(test_libs
- ${LLCOMMON_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- ${CURL_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
+ llcommon
+ llfilesystem
+ llxml
+ llmessage
+ llcharacter
+ llui
+ lllogin
+ llplugin
+ llappearance
)
set_source_files_properties(
@@ -2394,17 +2228,6 @@ if (LL_TESTS)
LL_TEST_ADDITIONAL_LIBRARIES "${test_libs}"
)
- set_source_files_properties(
- llviewerhelputil.cpp
- PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
- )
-
- set_source_files_properties(
- llremoteparcelrequest.cpp
- PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
- )
set_source_files_properties(
llworldmap.cpp
@@ -2412,83 +2235,49 @@ if (LL_TESTS)
PROPERTIES
LL_TEST_ADDITIONAL_SOURCE_FILES
tests/llviewertexture_stub.cpp
- #llviewertexturelist.cpp
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
)
set_source_files_properties(
llmediadataclient.cpp
PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${LLPRIMITIVE_LIBRARIES}"
- )
-
- set_source_files_properties(
- llagentaccess.cpp
- PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
+ LL_TEST_ADDITIONAL_LIBRARIES llprimitive
)
set_source_files_properties(
lllogininstance.cpp
PROPERTIES
LL_TEST_ADDITIONAL_SOURCE_FILES llversioninfo.cpp
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
+ )
+ set_property( SOURCE
+ ${viewer_TEST_SOURCE_FILES}
+ PROPERTY
+ LL_TEST_ADDITIONAL_LIBRARIES ${test_libs}
)
- ##################################################
- # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
- ##################################################
- # if(USE_PRECOMPILED_HEADERS)
- # set_source_files_properties(
- # ${viewer_TEST_SOURCE_FILES}
- # PROPERTIES
- # LL_TEST_ADDITIONAL_SOURCE_FILES llviewerprecompiledheaders.cpp
- # )
- # endif(USE_PRECOMPILED_HEADERS)
LL_ADD_PROJECT_UNIT_TESTS(${VIEWER_BINARY_NAME} "${viewer_TEST_SOURCE_FILES}")
#set(TEST_DEBUG on)
- ##################################################
- # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
- ##################################################
- # if(USE_PRECOMPILED_HEADERS)
- # set(test_sources "${test_sources}" llviewerprecompiledheaders.cpp)
- # endif(USE_PRECOMPILED_HEADERS)
- set(test_libs
- ${LLMESSAGE_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- )
-
- if (LINUX)
- # llcommon uses `clock_gettime' which is provided by librt on linux.
- set(LIBRT_LIBRARY
- rt
- )
- endif (LINUX)
set(test_libs
- ${WINDOWS_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${LIBRT_LIBRARY}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- )
+ llfilesystem
+ llmath
+ llcommon
+ llmessage
+ llcorehttp
+ llxml
+ llui
+ llplugin
+ llappearance
+ lllogin
+ llprimitive
+ lllogin
+ )
LL_ADD_INTEGRATION_TEST(cppfeatures
""
"${test_libs}"
)
+
LL_ADD_INTEGRATION_TEST(llsechandler_basic
llsechandler_basic.cpp
"${test_libs}"
@@ -2504,7 +2293,6 @@ if (LL_TESTS)
llviewernetwork.cpp
)
-
LL_ADD_INTEGRATION_TEST(llslurl
"${llslurl_test_sources}"
"${test_libs}"
@@ -2527,15 +2315,6 @@ if (LL_TESTS)
#ADD_VIEWER_BUILD_TEST(lltextureinfo viewer)
#ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer)
-include(LLAddBuildTest)
-SET(viewer_TEST_SOURCE_FILES
- llagentaccess.cpp
- )
-set_source_files_properties(
- ${viewer_TEST_SOURCE_FILES}
- PROPERTIES
- LL_TEST_ADDITIONAL_SOURCE_FILES llviewerprecompiledheaders.cpp
- )
endif (LL_TESTS)