Introduce build system and preprocessor support for ARM64
parent
465fbf6946
commit
a455d3ee7d
|
|
@ -11,6 +11,8 @@
|
||||||
## We're not there yet, but once done, there is a kludge in Linking.cmake
|
## We're not there yet, but once done, there is a kludge in Linking.cmake
|
||||||
# "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed
|
# "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed
|
||||||
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
|
||||||
|
cmake_policy(SET CMP0156 NEW)
|
||||||
|
cmake_policy(SET CMP0179 NEW)
|
||||||
|
|
||||||
set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING
|
set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING
|
||||||
"The root project/makefile/solution name. Defaults to SecondLife.")
|
"The root project/makefile/solution name. Defaults to SecondLife.")
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS)
|
||||||
|
|
||||||
# Force enable SSE2 instructions in GLM per the manual
|
# Force enable SSE2 instructions in GLM per the manual
|
||||||
# https://github.com/g-truc/glm/blob/master/manual.md#section2_10
|
# https://github.com/g-truc/glm/blob/master/manual.md#section2_10
|
||||||
add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_FORCE_SSE2=1)
|
add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_ENABLE_EXPERIMENTAL=1)
|
||||||
|
|
||||||
# Configure crash reporting
|
# Configure crash reporting
|
||||||
set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
|
set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,13 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
|
||||||
target_include_directories (PROJECT_${project}_TEST_${name} PRIVATE ${LIBS_OPEN_DIR}/test )
|
target_include_directories (PROJECT_${project}_TEST_${name} PRIVATE ${LIBS_OPEN_DIR}/test )
|
||||||
|
|
||||||
set_target_properties(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
|
set_target_properties(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
|
||||||
|
if (DARWIN)
|
||||||
|
set_target_properties(PROJECT_${project}_TEST_${name}
|
||||||
|
PROPERTIES
|
||||||
|
BUILD_WITH_INSTALL_RPATH 1
|
||||||
|
INSTALL_RPATH "@executable_path/Resources"
|
||||||
|
)
|
||||||
|
endif(DARWIN)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Per-codefile additional / external project dep and lib dep property extraction
|
# Per-codefile additional / external project dep and lib dep property extraction
|
||||||
|
|
@ -225,7 +232,10 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
|
||||||
# test binaries always need to be signed for local development
|
# test binaries always need to be signed for local development
|
||||||
set_target_properties(INTEGRATION_TEST_${testname}
|
set_target_properties(INTEGRATION_TEST_${testname}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-")
|
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-"
|
||||||
|
BUILD_WITH_INSTALL_RPATH 1
|
||||||
|
INSTALL_RPATH "@executable_path/Resources"
|
||||||
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Add link deps to the executable
|
# Add link deps to the executable
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,17 @@ add_library( ll::kdu INTERFACE IMPORTED )
|
||||||
if (USE_KDU)
|
if (USE_KDU)
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
use_prebuilt_binary(kdu)
|
use_prebuilt_binary(kdu)
|
||||||
if (WINDOWS)
|
|
||||||
target_link_libraries( ll::kdu INTERFACE kdu.lib)
|
find_library(KDU_LIBRARY
|
||||||
else (WINDOWS)
|
NAMES
|
||||||
target_link_libraries( ll::kdu INTERFACE libkdu.a)
|
kdu
|
||||||
endif (WINDOWS)
|
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
target_link_libraries(ll::kdu INTERFACE ${KDU_LIBRARY})
|
||||||
|
|
||||||
target_include_directories( ll::kdu SYSTEM INTERFACE
|
target_include_directories( ll::kdu SYSTEM INTERFACE
|
||||||
${AUTOBUILD_INSTALL_DIR}/include/kdu
|
${AUTOBUILD_INSTALL_DIR}/include/kdu
|
||||||
${LIBS_OPEN_DIR}/llkdu
|
${LIBS_OPEN_DIR}/llkdu
|
||||||
)
|
)
|
||||||
target_compile_definitions(ll::kdu INTERFACE KDU_X86_INTRINSICS=1 KDU_NO_THREADS=1)
|
target_compile_definitions(ll::kdu INTERFACE KDU_NO_THREADS=1)
|
||||||
endif (USE_KDU)
|
endif (USE_KDU)
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,10 @@ endif ()
|
||||||
# windows) and CMAKE_BUILD_TYPE on Makefile based generators (like linux). The reason for this is
|
# windows) and CMAKE_BUILD_TYPE on Makefile based generators (like linux). The reason for this is
|
||||||
# that CMAKE_BUILD_TYPE is essentially meaningless at configuration time for IDE generators and
|
# that CMAKE_BUILD_TYPE is essentially meaningless at configuration time for IDE generators and
|
||||||
# CMAKE_CFG_INTDIR is meaningless at build time for Makefile generators
|
# CMAKE_CFG_INTDIR is meaningless at build time for Makefile generators
|
||||||
|
if(NOT DARWIN)
|
||||||
link_directories(${AUTOBUILD_INSTALL_DIR}/lib/$<LOWER_CASE:$<CONFIG>>)
|
link_directories(${AUTOBUILD_INSTALL_DIR}/lib/$<LOWER_CASE:$<CONFIG>>)
|
||||||
link_directories(${AUTOBUILD_INSTALL_DIR}/lib/release)
|
link_directories(${AUTOBUILD_INSTALL_DIR}/lib/release)
|
||||||
|
endif(NOT DARWIN)
|
||||||
|
|
||||||
add_library( ll::oslibraries INTERFACE IMPORTED )
|
add_library( ll::oslibraries INTERFACE IMPORTED )
|
||||||
|
|
||||||
|
|
@ -75,6 +76,8 @@ else()
|
||||||
find_library(AGL_LIBRARY AGL)
|
find_library(AGL_LIBRARY AGL)
|
||||||
find_library(APPKIT_LIBRARY AppKit)
|
find_library(APPKIT_LIBRARY AppKit)
|
||||||
find_library(COREAUDIO_LIBRARY CoreAudio)
|
find_library(COREAUDIO_LIBRARY CoreAudio)
|
||||||
|
find_library(COREGRAPHICS_LIBRARY CoreGraphics)
|
||||||
|
find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
||||||
|
|
||||||
target_link_libraries( ll::oslibraries INTERFACE
|
target_link_libraries( ll::oslibraries INTERFACE
|
||||||
${COCOA_LIBRARY}
|
${COCOA_LIBRARY}
|
||||||
|
|
@ -84,6 +87,8 @@ else()
|
||||||
${AGL_LIBRARY}
|
${AGL_LIBRARY}
|
||||||
${APPKIT_LIBRARY}
|
${APPKIT_LIBRARY}
|
||||||
${COREAUDIO_LIBRARY}
|
${COREAUDIO_LIBRARY}
|
||||||
|
${AUDIOTOOLBOX_LIBRARY}
|
||||||
|
${COREGRAPHICS_LIBRARY}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,24 @@
|
||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
|
include_guard()
|
||||||
|
|
||||||
include(Linking)
|
include(Linking)
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
|
|
||||||
include_guard()
|
|
||||||
|
|
||||||
add_library( ll::webrtc INTERFACE IMPORTED )
|
add_library( ll::webrtc INTERFACE IMPORTED )
|
||||||
target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp")
|
target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp")
|
||||||
use_prebuilt_binary(webrtc)
|
use_prebuilt_binary(webrtc)
|
||||||
|
|
||||||
if (WINDOWS)
|
find_library(WEBRTC_LIBRARY
|
||||||
target_link_libraries( ll::webrtc INTERFACE webrtc.lib )
|
NAMES
|
||||||
elseif (DARWIN)
|
webrtc
|
||||||
FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio)
|
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)
|
||||||
FIND_LIBRARY(COREGRAPHICS_LIBRARY CoreGraphics)
|
|
||||||
FIND_LIBRARY(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
|
||||||
FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation)
|
|
||||||
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
|
|
||||||
|
|
||||||
target_link_libraries( ll::webrtc INTERFACE
|
target_link_libraries( ll::webrtc INTERFACE ${WEBRTC_LIBRARY} )
|
||||||
libwebrtc.a
|
|
||||||
${COREAUDIO_LIBRARY}
|
if (DARWIN)
|
||||||
${AUDIOTOOLBOX_LIBRARY}
|
target_link_libraries( ll::webrtc INTERFACE ll::oslibraries )
|
||||||
${COREGRAPHICS_LIBRARY}
|
|
||||||
${COREFOUNDATION_LIBRARY}
|
|
||||||
${COCOA_LIBRARY}
|
|
||||||
)
|
|
||||||
elseif (LINUX)
|
elseif (LINUX)
|
||||||
target_link_libraries( ll::webrtc INTERFACE libwebrtc.a X11 )
|
target_link_libraries( ll::webrtc INTERFACE X11 )
|
||||||
endif (WINDOWS)
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
if (XXHASH_CMAKE_INCLUDED)
|
include_guard()
|
||||||
return()
|
|
||||||
endif (XXHASH_CMAKE_INCLUDED)
|
|
||||||
set (XXHASH_CMAKE_INCLUDED TRUE)
|
|
||||||
|
|
||||||
include(Prebuilt)
|
include(Prebuilt)
|
||||||
use_prebuilt_binary(xxhash)
|
use_prebuilt_binary(xxhash)
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,23 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Set up CPU architecture defines
|
||||||
|
#if LL_MSVC && defined(_M_ARM64)
|
||||||
|
# define LL_ARM64 1
|
||||||
|
#elif LL_GNUC && (defined(__arm64__) || defined(__aarch64__))
|
||||||
|
# define LL_ARM64 1
|
||||||
|
#elif LL_MSVC && _M_X64
|
||||||
|
# define LL_X86_64 1
|
||||||
|
# define LL_X86 1
|
||||||
|
#elif LL_MSVC && _M_IX86
|
||||||
|
# define LL_X86 1
|
||||||
|
#elif LL_GNUC && ( defined(__amd64__) || defined(__x86_64__) )
|
||||||
|
# define LL_X86_64 1
|
||||||
|
# define LL_X86 1
|
||||||
|
#elif LL_GNUC && ( defined(__i386__) )
|
||||||
|
# define LL_X86 1
|
||||||
|
#endif
|
||||||
|
|
||||||
// Deal with minor differences on Unixy OSes.
|
// Deal with minor differences on Unixy OSes.
|
||||||
#if LL_DARWIN || LL_LINUX
|
#if LL_DARWIN || LL_LINUX
|
||||||
// Different name, same functionality.
|
// Different name, same functionality.
|
||||||
|
|
@ -118,11 +135,8 @@
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
#define LL_DLLEXPORT __declspec(dllexport)
|
#define LL_DLLEXPORT __declspec(dllexport)
|
||||||
#define LL_DLLIMPORT __declspec(dllimport)
|
#define LL_DLLIMPORT __declspec(dllimport)
|
||||||
#elif LL_LINUX
|
|
||||||
#define LL_DLLEXPORT __attribute__ ((visibility("default")))
|
|
||||||
#define LL_DLLIMPORT
|
|
||||||
#else
|
#else
|
||||||
#define LL_DLLEXPORT
|
#define LL_DLLEXPORT __attribute__ ((visibility("default")))
|
||||||
#define LL_DLLIMPORT
|
#define LL_DLLIMPORT
|
||||||
#endif // LL_WINDOWS
|
#endif // LL_WINDOWS
|
||||||
|
|
||||||
|
|
@ -187,4 +201,16 @@
|
||||||
#define LL_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
#define LL_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LL_ARM64
|
||||||
|
#define GLM_FORCE_NEON 1
|
||||||
|
#else
|
||||||
|
#define GLM_FORCE_SSE2 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LL_ARM64
|
||||||
|
#define KDU_NEON_INTRINSICS 1
|
||||||
|
#else
|
||||||
|
#define KDU_X86_INTRINSICS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // not LL_LINDEN_PREPROCESSOR_H
|
#endif // not LL_LINDEN_PREPROCESSOR_H
|
||||||
|
|
|
||||||
|
|
@ -28,20 +28,7 @@
|
||||||
#ifndef LLPROCESSOR_H
|
#ifndef LLPROCESSOR_H
|
||||||
#define LLPROCESSOR_H
|
#define LLPROCESSOR_H
|
||||||
#include "llunits.h"
|
#include "llunits.h"
|
||||||
|
#include "llpreprocessor.h"
|
||||||
#if LL_MSVC && _M_X64
|
|
||||||
# define LL_X86_64 1
|
|
||||||
# define LL_X86 1
|
|
||||||
#elif LL_MSVC && _M_IX86
|
|
||||||
# define LL_X86 1
|
|
||||||
#elif LL_GNUC && ( defined(__amd64__) || defined(__x86_64__) )
|
|
||||||
# define LL_X86_64 1
|
|
||||||
# define LL_X86 1
|
|
||||||
#elif LL_GNUC && ( defined(__i386__) )
|
|
||||||
# define LL_X86 1
|
|
||||||
#elif LL_GNUC && ( defined(__powerpc__) || defined(__ppc__) )
|
|
||||||
# define LL_PPC 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class LLProcessorInfoImpl;
|
class LLProcessorInfoImpl;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,6 @@ set(llkdu_HEADER_FILES
|
||||||
|
|
||||||
list(APPEND llkdu_SOURCE_FILES ${llkdu_HEADER_FILES})
|
list(APPEND llkdu_SOURCE_FILES ${llkdu_HEADER_FILES})
|
||||||
|
|
||||||
# Our KDU package is built with KDU_X86_INTRINSICS in its .vcxproj file.
|
|
||||||
# Unless that macro is also set for every consumer build, KDU freaks out,
|
|
||||||
# spamming the viewer log with alignment FUD.
|
|
||||||
set_source_files_properties(${llkdu_SOURCE_FILES}
|
|
||||||
PROPERTIES
|
|
||||||
COMPILE_DEFINITIONS
|
|
||||||
"KDU_X86_INTRINSICS")
|
|
||||||
|
|
||||||
if (USE_KDU)
|
if (USE_KDU)
|
||||||
add_library (llkdu ${llkdu_SOURCE_FILES})
|
add_library (llkdu ${llkdu_SOURCE_FILES})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@
|
||||||
#ifndef LL_LLIMAGEJ2CKDU_H
|
#ifndef LL_LLIMAGEJ2CKDU_H
|
||||||
#define LL_LLIMAGEJ2CKDU_H
|
#define LL_LLIMAGEJ2CKDU_H
|
||||||
|
|
||||||
|
#include "llpreprocessor.h"
|
||||||
|
|
||||||
#include "llimagej2c.h"
|
#include "llimagej2c.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@
|
||||||
#ifndef LL_LLKDUMEM_H
|
#ifndef LL_LLKDUMEM_H
|
||||||
#define LL_LLKDUMEM_H
|
#define LL_LLKDUMEM_H
|
||||||
|
|
||||||
|
#include "llpreprocessor.h"
|
||||||
|
|
||||||
// Support classes for reading and writing from memory buffers in KDU
|
// Support classes for reading and writing from memory buffers in KDU
|
||||||
#define kdu_xxxx "kdu_image.h"
|
#define kdu_xxxx "kdu_image.h"
|
||||||
#include "include_kdu_xxxx.h"
|
#include "include_kdu_xxxx.h"
|
||||||
|
|
|
||||||
|
|
@ -31,14 +31,6 @@ set(llplugin_HEADER_FILES
|
||||||
llpluginsharedmemory.h
|
llpluginsharedmemory.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
|
||||||
if(WINDOWS)
|
|
||||||
##add_definitions(/FIXED:NO)
|
|
||||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
|
||||||
add_definitions(-fPIC)
|
|
||||||
endif(WINDOWS)
|
|
||||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
|
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
|
||||||
|
|
||||||
add_library (llplugin ${llplugin_SOURCE_FILES})
|
add_library (llplugin ${llplugin_SOURCE_FILES})
|
||||||
|
|
|
||||||
|
|
@ -30,18 +30,6 @@ add_executable(SLPlugin
|
||||||
${SLPlugin_SOURCE_FILES}
|
${SLPlugin_SOURCE_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WINDOWS)
|
|
||||||
set_target_properties(SLPlugin
|
|
||||||
PROPERTIES
|
|
||||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMTD\""
|
|
||||||
)
|
|
||||||
else ()
|
|
||||||
set_target_properties(SLPlugin
|
|
||||||
PROPERTIES
|
|
||||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist
|
|
||||||
)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
target_link_libraries(SLPlugin
|
target_link_libraries(SLPlugin
|
||||||
llplugin
|
llplugin
|
||||||
llmessage
|
llmessage
|
||||||
|
|
@ -49,7 +37,20 @@ target_link_libraries(SLPlugin
|
||||||
ll::pluginlibraries
|
ll::pluginlibraries
|
||||||
)
|
)
|
||||||
|
|
||||||
if (DARWIN)
|
if (WINDOWS)
|
||||||
|
set_target_properties(SLPlugin
|
||||||
|
PROPERTIES
|
||||||
|
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMTD\""
|
||||||
|
)
|
||||||
|
elseif (DARWIN)
|
||||||
|
set_target_properties(SLPlugin
|
||||||
|
PROPERTIES
|
||||||
|
BUILD_WITH_INSTALL_RPATH 1
|
||||||
|
INSTALL_RPATH "@executable_path/../../../../Frameworks;@executable_path/../Frameworks;@executable_path/../Frameworks/plugins"
|
||||||
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist
|
||||||
|
XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
|
||||||
|
)
|
||||||
|
|
||||||
# Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later)
|
# Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET SLPlugin POST_BUILD
|
TARGET SLPlugin POST_BUILD
|
||||||
|
|
@ -58,7 +59,7 @@ if (DARWIN)
|
||||||
-p
|
-p
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/SLPlugin.app/Contents/Resources
|
${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/SLPlugin.app/Contents/Resources
|
||||||
)
|
)
|
||||||
endif (DARWIN)
|
endif ()
|
||||||
|
|
||||||
if (LL_TESTS)
|
if (LL_TESTS)
|
||||||
ll_deploy_sharedlibs_command(SLPlugin)
|
ll_deploy_sharedlibs_command(SLPlugin)
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,5 @@ endif (SDL_FOUND)
|
||||||
target_include_directories(llwindow INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(llwindow INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
if (DARWIN)
|
if (DARWIN)
|
||||||
find_library(CARBON_LIBRARY Carbon)
|
|
||||||
target_link_libraries(llwindow ${CARBON_LIBRARY})
|
target_link_libraries(llwindow ${CARBON_LIBRARY})
|
||||||
endif (DARWIN)
|
endif (DARWIN)
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,6 @@ include(PluginAPI)
|
||||||
|
|
||||||
### media_plugin_base
|
### media_plugin_base
|
||||||
|
|
||||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
|
||||||
if(WINDOWS)
|
|
||||||
##add_definitions(/FIXED:NO)
|
|
||||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
|
||||||
add_definitions(-fPIC)
|
|
||||||
endif(WINDOWS)
|
|
||||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
set(media_plugin_base_SOURCE_FILES
|
set(media_plugin_base_SOURCE_FILES
|
||||||
media_plugin_base.cpp
|
media_plugin_base.cpp
|
||||||
|
|
@ -34,5 +27,5 @@ add_library(media_plugin_base
|
||||||
${media_plugin_base_SOURCE_FILES}
|
${media_plugin_base_SOURCE_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries( media_plugin_base llplugin )
|
target_link_libraries( media_plugin_base llplugin ll::pluginlibraries)
|
||||||
target_include_directories( media_plugin_base INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories( media_plugin_base INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
|
||||||
|
|
@ -170,10 +170,8 @@ void MediaPluginBase::sendStatus()
|
||||||
|
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
# define LLSYMEXPORT __declspec(dllexport)
|
# define LLSYMEXPORT __declspec(dllexport)
|
||||||
#elif LL_LINUX
|
|
||||||
# define LLSYMEXPORT __attribute__ ((visibility("default")))
|
|
||||||
#else
|
#else
|
||||||
# define LLSYMEXPORT /**/
|
# define LLSYMEXPORT __attribute__ ((visibility("default")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,6 @@ include(CEFPlugin)
|
||||||
|
|
||||||
### media_plugin_cef
|
### media_plugin_cef
|
||||||
|
|
||||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
|
||||||
if(WINDOWS)
|
|
||||||
##add_definitions(/FIXED:NO)
|
|
||||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
|
||||||
add_definitions(-fPIC)
|
|
||||||
endif(WINDOWS)
|
|
||||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
set(media_plugin_cef_SOURCE_FILES
|
set(media_plugin_cef_SOURCE_FILES
|
||||||
media_plugin_cef.cpp
|
media_plugin_cef.cpp
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,6 @@ include(ExamplePlugin)
|
||||||
|
|
||||||
### media_plugin_example
|
### media_plugin_example
|
||||||
|
|
||||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
|
||||||
if(WINDOWS)
|
|
||||||
##add_definitions(/FIXED:NO)
|
|
||||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
|
||||||
add_definitions(-fPIC)
|
|
||||||
endif(WINDOWS)
|
|
||||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
set(media_plugin_example_SOURCE_FILES
|
set(media_plugin_example_SOURCE_FILES
|
||||||
media_plugin_example.cpp
|
media_plugin_example.cpp
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,6 @@ include(LibVLCPlugin)
|
||||||
|
|
||||||
### media_plugin_libvlc
|
### media_plugin_libvlc
|
||||||
|
|
||||||
if(NOT ADDRESS_SIZE EQUAL 32)
|
|
||||||
if(WINDOWS)
|
|
||||||
##add_definitions(/FIXED:NO)
|
|
||||||
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
|
|
||||||
add_definitions(-fPIC)
|
|
||||||
endif(WINDOWS)
|
|
||||||
endif(NOT ADDRESS_SIZE EQUAL 32)
|
|
||||||
|
|
||||||
set(media_plugin_libvlc_SOURCE_FILES
|
set(media_plugin_libvlc_SOURCE_FILES
|
||||||
media_plugin_libvlc.cpp
|
media_plugin_libvlc.cpp
|
||||||
|
|
|
||||||
|
|
@ -1405,7 +1405,7 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt"
|
||||||
"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}\n")
|
"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}\n")
|
||||||
|
|
||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
llversioninfo.cpp tests/llversioninfo_test.cpp
|
llversioninfo.cpp tests/llversioninfo_test.cpp
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
|
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
|
||||||
)
|
)
|
||||||
|
|
@ -1417,11 +1417,24 @@ if (DARWIN)
|
||||||
LIST(APPEND viewer_SOURCE_FILES llfilepicker_mac.mm)
|
LIST(APPEND viewer_SOURCE_FILES llfilepicker_mac.mm)
|
||||||
LIST(APPEND viewer_HEADER_FILES llfilepicker_mac.h)
|
LIST(APPEND viewer_HEADER_FILES llfilepicker_mac.h)
|
||||||
|
|
||||||
|
set_source_files_properties(
|
||||||
|
llappviewermacosx-objc.mm
|
||||||
|
PROPERTIES
|
||||||
|
SKIP_PRECOMPILE_HEADERS TRUE
|
||||||
|
)
|
||||||
|
|
||||||
|
set_source_files_properties(
|
||||||
|
llfilepicker_mac.mm
|
||||||
|
PROPERTIES
|
||||||
|
SKIP_PRECOMPILE_HEADERS TRUE
|
||||||
|
)
|
||||||
|
|
||||||
# This should be compiled with the viewer.
|
# This should be compiled with the viewer.
|
||||||
LIST(APPEND viewer_SOURCE_FILES llappdelegate-objc.mm)
|
LIST(APPEND viewer_SOURCE_FILES llappdelegate-objc.mm)
|
||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
llappdelegate-objc.mm
|
llappdelegate-objc.mm
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
|
SKIP_PRECOMPILE_HEADERS TRUE
|
||||||
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
|
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
|
||||||
# BugsplatMac is a module, imported with @import. That language feature
|
# BugsplatMac is a module, imported with @import. That language feature
|
||||||
# demands these -f switches.
|
# demands these -f switches.
|
||||||
|
|
@ -1606,7 +1619,7 @@ endif (WINDOWS)
|
||||||
file(GLOB_RECURSE viewer_XUI_FILES LIST_DIRECTORIES FALSE
|
file(GLOB_RECURSE viewer_XUI_FILES LIST_DIRECTORIES FALSE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/skins/*.xml)
|
${CMAKE_CURRENT_SOURCE_DIR}/skins/*.xml)
|
||||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/skins PREFIX "XUI Files" FILES ${viewer_XUI_FILES})
|
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)
|
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||||
list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
|
list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
|
||||||
|
|
||||||
|
|
@ -1614,7 +1627,7 @@ list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
|
||||||
file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES FALSE
|
file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES FALSE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders/*.glsl)
|
${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders/*.glsl)
|
||||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders PREFIX "Shaders" FILES ${viewer_SHADER_FILES})
|
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)
|
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||||
list(APPEND viewer_SOURCE_FILES ${viewer_SHADER_FILES})
|
list(APPEND viewer_SOURCE_FILES ${viewer_SHADER_FILES})
|
||||||
|
|
||||||
|
|
@ -1705,6 +1718,10 @@ list(APPEND EVENT_HOST_SCRIPTS ${EVENT_HOST_SCRIPT_GLOB_LIST})
|
||||||
set(PACKAGE ON CACHE BOOL
|
set(PACKAGE ON CACHE BOOL
|
||||||
"Add a package target that builds an installer package.")
|
"Add a package target that builds an installer package.")
|
||||||
|
|
||||||
|
if(USE_PRECOMPILED_HEADERS)
|
||||||
|
target_precompile_headers( ${VIEWER_BINARY_NAME} PRIVATE llviewerprecompiledheaders.h )
|
||||||
|
endif(USE_PRECOMPILED_HEADERS)
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
set_target_properties(${VIEWER_BINARY_NAME}
|
set_target_properties(${VIEWER_BINARY_NAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
|
|
@ -1715,10 +1732,6 @@ if (WINDOWS)
|
||||||
)
|
)
|
||||||
target_compile_options(${VIEWER_BINARY_NAME} PRIVATE /bigobj)
|
target_compile_options(${VIEWER_BINARY_NAME} PRIVATE /bigobj)
|
||||||
|
|
||||||
if(USE_PRECOMPILED_HEADERS)
|
|
||||||
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
|
# If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency
|
||||||
# here.
|
# here.
|
||||||
# *NOTE:Mani - This is a crappy hack to have important dependencies for the viewer_manifest copy action
|
# *NOTE:Mani - This is a crappy hack to have important dependencies for the viewer_manifest copy action
|
||||||
|
|
@ -1732,7 +1745,7 @@ if (WINDOWS)
|
||||||
# And of course it's straightforward to read a text file in Python.
|
# And of course it's straightforward to read a text file in Python.
|
||||||
|
|
||||||
set(COPY_INPUT_DEPENDENCIES
|
set(COPY_INPUT_DEPENDENCIES
|
||||||
# The following commented dependencies are determined at variably at build time. Can't do this here.
|
# The following commented dependencies are determined variably at build time. Can't do this here.
|
||||||
${CMAKE_SOURCE_DIR}/../etc/message.xml
|
${CMAKE_SOURCE_DIR}/../etc/message.xml
|
||||||
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
|
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
|
||||||
${SHARED_LIB_STAGING_DIR}/openjp2.dll
|
${SHARED_LIB_STAGING_DIR}/openjp2.dll
|
||||||
|
|
@ -1933,7 +1946,7 @@ endif (WINDOWS)
|
||||||
# one of these being libz where you can find four or more versions in play
|
# 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
|
# at once. On Linux, libz can be found at link and run time via a number
|
||||||
# of paths:
|
# of paths:
|
||||||
#
|
#
|
||||||
# => -lfreetype
|
# => -lfreetype
|
||||||
# => libz.so.1 (on install machine, not build)
|
# => libz.so.1 (on install machine, not build)
|
||||||
# => -lSDL
|
# => -lSDL
|
||||||
|
|
@ -2005,7 +2018,7 @@ foreach(elem ${country_codes})
|
||||||
set(emoji_mapping_src_file
|
set(emoji_mapping_src_file
|
||||||
"${emoji_mapping_src_folder}/${elem}/emoji_characters.xml")
|
"${emoji_mapping_src_folder}/${elem}/emoji_characters.xml")
|
||||||
set(emoji_mapping_dst_file
|
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)
|
configure_file(${emoji_mapping_src_file} ${emoji_mapping_dst_file} COPYONLY)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
@ -2145,9 +2158,6 @@ if (DARWIN)
|
||||||
--grid=${GRID}
|
--grid=${GRID}
|
||||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
||||||
DEPENDS
|
|
||||||
${VIEWER_BINARY_NAME}
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef)
|
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef)
|
||||||
|
|
@ -2181,8 +2191,6 @@ if (DARWIN)
|
||||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/.${product}.bat
|
--touch=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/.${product}.bat
|
||||||
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
|
||||||
${SIGNING_SETTING}
|
${SIGNING_SETTING}
|
||||||
DEPENDS
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
|
||||||
)
|
)
|
||||||
endif (PACKAGE)
|
endif (PACKAGE)
|
||||||
endif (DARWIN)
|
endif (DARWIN)
|
||||||
|
|
@ -2222,7 +2230,7 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
|
XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
|
||||||
XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/dSYMs")
|
XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/dSYMs")
|
||||||
|
|
||||||
add_custom_command(OUTPUT "${VIEWER_APP_XCARCHIVE}"
|
add_custom_command(OUTPUT "${VIEWER_APP_XCARCHIVE}"
|
||||||
COMMAND "zip"
|
COMMAND "zip"
|
||||||
ARGS
|
ARGS
|
||||||
|
|
@ -2257,7 +2265,7 @@ if (LL_TESTS)
|
||||||
# llremoteparcelrequest.cpp
|
# llremoteparcelrequest.cpp
|
||||||
llviewerhelputil.cpp
|
llviewerhelputil.cpp
|
||||||
llversioninfo.cpp
|
llversioninfo.cpp
|
||||||
# llvocache.cpp
|
# llvocache.cpp
|
||||||
llworldmap.cpp
|
llworldmap.cpp
|
||||||
llworldmipmap.cpp
|
llworldmipmap.cpp
|
||||||
)
|
)
|
||||||
|
|
@ -2266,7 +2274,7 @@ if (LL_TESTS)
|
||||||
llworldmap.cpp
|
llworldmap.cpp
|
||||||
llworldmipmap.cpp
|
llworldmipmap.cpp
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
LL_TEST_ADDITIONAL_SOURCE_FILES
|
LL_TEST_ADDITIONAL_SOURCE_FILES
|
||||||
tests/llviewertexture_stub.cpp
|
tests/llviewertexture_stub.cpp
|
||||||
#llviewertexturelist.cpp
|
#llviewertexturelist.cpp
|
||||||
)
|
)
|
||||||
|
|
@ -2300,7 +2308,7 @@ if (LL_TESTS)
|
||||||
llworldmap.cpp
|
llworldmap.cpp
|
||||||
llworldmipmap.cpp
|
llworldmipmap.cpp
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
LL_TEST_ADDITIONAL_SOURCE_FILES
|
LL_TEST_ADDITIONAL_SOURCE_FILES
|
||||||
tests/llviewertexture_stub.cpp
|
tests/llviewertexture_stub.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ if (LL_TESTS)
|
||||||
# but the CMake $<TARGET_FILE_DIR> generator expression isn't evaluated by
|
# but the CMake $<TARGET_FILE_DIR> generator expression isn't evaluated by
|
||||||
# CREATE_LINK, so fudge it.
|
# CREATE_LINK, so fudge it.
|
||||||
add_custom_command( TARGET lltest POST_BUILD
|
add_custom_command( TARGET lltest POST_BUILD
|
||||||
COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/test/Resources
|
COMMAND ${CMAKE_COMMAND} -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/test/Resources
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif (LL_TESTS)
|
endif (LL_TESTS)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue