mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-05 17:06:49 +02:00
Github actions
This commit is contained in:
parent
f112ca4890
commit
d4b3a9ba49
65 changed files with 1154 additions and 600 deletions
248
.github/workflows/cmake.yml
vendored
Normal file
248
.github/workflows/cmake.yml
vendored
Normal file
|
@ -0,0 +1,248 @@
|
|||
name: CMake CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- stable
|
||||
|
||||
env:
|
||||
CI_BUILD: Github
|
||||
BUILD_TYPE: Release
|
||||
RELEASE_TYPE: PR
|
||||
RELEASE_NUMBER: ${{ github.event.number }}
|
||||
VERSION_CODE: ${{ github.event.number }}
|
||||
GIT_PR_COMMIT: ${{ github.sha }}
|
||||
# FIXME should be a shortened version of the SHA
|
||||
GIT_PR_COMMIT_SHORT: ${{ github.sha }}
|
||||
HIFI_VCPKG_BOOTSTRAP: true
|
||||
|
||||
AWS_ACCESS_KEY_ID: AKIAJOF5R5WQWQL6C7UQ
|
||||
|
||||
# Settings for uploading
|
||||
APP_NAME: interface
|
||||
#APP_NAME: gpu-frame-player
|
||||
BUCKET_NAME: hifi-public
|
||||
UPLOAD_PREFIX: austin/builds
|
||||
|
||||
# OSX specific variables
|
||||
DEVELOPER_DIR: /Applications/Xcode_11.2.app/Contents/Developer
|
||||
MACOSX_DEPLOYMENT_TARGET: '10.11'
|
||||
# WIN32 specific variables
|
||||
PreferredToolArchitecture: X64
|
||||
|
||||
BS_USERNAME: gustavo@highfidelity.io
|
||||
BS_PASSWORD: ${MASKED_BUGSPLAT_PASSWORD}
|
||||
CMAKE_BACKTRACE_URL: https://highfidelity.sp.backtrace.io:6098
|
||||
GA_TRACKING_ID: UA-39558647-8
|
||||
OCULUS_APP_ID: '1255907384473836'
|
||||
# CMAKE_BACKTRACE_TOKEN: ${MASKED_CMAKE_BACKTRACE_TOKEN}
|
||||
# CMAKE_BACKTRACE_SYMBOLS_TOKEN: ${MASKED_BACKTRACE_UPLOAD_TOKEN}
|
||||
|
||||
# Mac OS
|
||||
#PLATFORM_CMAKE_GENERATOR=Xcode
|
||||
#PLATFORM_BUILD_ARGUMENTS=--config Release --target package
|
||||
#ARTIFACT_EXPRESSION=build/*.dmg,build/*.zip
|
||||
|
||||
# Windows
|
||||
#PLATFORM_CMAKE_GENERATOR=Visual Studio 15 2017 Win64
|
||||
#PLATFORM_BUILD_ARGUMENTS=--target package --config release
|
||||
#ARTIFACT_EXPRESSION=build/*.exe,build/*.zip,*-symbols.zip
|
||||
|
||||
# Ubuntu
|
||||
#PLATFORM_CMAKE_GENERATOR=Unix Makefiles
|
||||
#PLATFORM_BUILD_ARGUMENTS=--target all -- -j4
|
||||
#ARTIFACT_EXPRESSION=build/assignment-client/**,build/domain-server/**,build/ice-server/ice-server,build/tools/ice-client/ice-client,build/tools/ac-client/ac-client,build/tools/oven,build/ext/makefiles/nvtt/project/lib/**,build/ext/makefiles/quazip/project/lib/**
|
||||
|
||||
# Android
|
||||
#OAUTH_CLIENT_SECRET=${MASKED_ANDROID_OAUTH_CLIENT_SECRET_NIGHTLY}
|
||||
#OAUTH_CLIENT_ID=6c7d2349c0614640150db37457a1f75dce98a28ffe8f14d47f6cfae4de5b262a
|
||||
#OAUTH_REDIRECT_URI=https://dev-android-interface.highfidelity.com/auth
|
||||
#ARTIFACT_EXPRESSION=android/*.apk
|
||||
#SHA7=${GIT_PR_COMMIT_SHORT}
|
||||
#ANDROID_APK_NAME=HighFidelity-Beta-PR${RELEASE_NUMBER}-${GIT_PR_COMMIT_SHORT}.apk
|
||||
#ANDROID_BUILT_APK_NAME=interface-debug.apk
|
||||
#ANDROID_APP=interface
|
||||
#ANDROID_BUILD_DIR=debug
|
||||
#ANDROID_BUILD_TARGET=assembleDebug
|
||||
#STABLE_BUILD=0
|
||||
|
||||
jobs:
|
||||
unlabel:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.action == 'labeled'
|
||||
steps:
|
||||
- name: Install python modules
|
||||
run: pip install PyGithub
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
- name: Remove Trigger Labels
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_REPO_TOKEN }}
|
||||
LABEL_PREFIX: rebuild
|
||||
run: python "$GITHUB_WORKSPACE/tools/ci-scripts/remove-labels.py"
|
||||
|
||||
|
||||
build_client_mac:
|
||||
runs-on: macOS-latest
|
||||
if: github.event.action != 'labeled' || github.event.label.name == 'rebuild-mac' || github.event.label.name == 'rebuild'
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
- name: Install python modules
|
||||
run: pip3 install awscli boto3 PyGithub
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
- name: Configure CMake
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DCLIENT_ONLY:BOOLEAN=TRUE -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -G Xcode -DVCPKG_APPLOCAL_DEPS=OFF
|
||||
- name: Build Console
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target packaged-server-console
|
||||
- name: Build Application
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target $APP_NAME
|
||||
- name: Build Installer
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target package
|
||||
- name: Upload Artifact
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_REPO_TOKEN }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
|
||||
ARTIFACT_PATTERN: HighFidelity-Beta-Interface-PR${{ github.event.number }}-*.dmg
|
||||
run: python3 "$GITHUB_WORKSPACE/tools/ci-scripts/upload.py"
|
||||
|
||||
|
||||
build_full_mac:
|
||||
runs-on: macOS-latest
|
||||
if: github.event.action != 'labeled' || github.event.label.name == 'rebuild-mac' || github.event.label.name == 'rebuild'
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
- name: Install python modules
|
||||
run: pip3 install awscli boto3 PyGithub
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
- name: Configure CMake
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -G Xcode -DVCPKG_APPLOCAL_DEPS=OFF
|
||||
- name: Build Console
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target packaged-server-console
|
||||
- name: Build Application
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target $APP_NAME
|
||||
- name: Build Domain Server
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target domain-server
|
||||
- name: Build Assignment Client
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target assignment-client
|
||||
- name: Build Installer
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target package
|
||||
- name: Upload Artifact
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_REPO_TOKEN }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
|
||||
ARTIFACT_PATTERN: HighFidelity-Beta-PR${{ github.event.number }}-*.dmg
|
||||
run: python3 "$GITHUB_WORKSPACE/tools/ci-scripts/upload.py"
|
||||
|
||||
build_client_win32:
|
||||
runs-on: windows-latest
|
||||
if: github.event.action != 'labeled' || github.event.label.name == 'rebuild-win' || github.event.label.name == 'rebuild'
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
- name: Install python modules
|
||||
run: pip install awscli boto3 PyGithub
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCLIENT_ONLY:BOOLEAN=TRUE -A x64
|
||||
- name: Build Console
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target packaged-server-console
|
||||
- name: Build Application
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target $APP_NAME
|
||||
- name: Build Installer
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target package
|
||||
- name: Upload Artifact
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_REPO_TOKEN }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
|
||||
ARTIFACT_PATTERN: HighFidelity-Beta-Interface-PR${{ github.event.number }}-*.exe
|
||||
run: python "$GITHUB_WORKSPACE\tools\ci-scripts\upload.py"
|
||||
|
||||
build_full_win32:
|
||||
runs-on: windows-latest
|
||||
if: github.event.action != 'labeled' || github.event.label.name == 'rebuild-win' || github.event.label.name == 'rebuild'
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
- name: Install python modules
|
||||
run: pip install awscli boto3 PyGithub
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -A x64
|
||||
- name: Build Console
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target packaged-server-console
|
||||
- name: Build Application
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target $APP_NAME
|
||||
- name: Build Domain Server
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target domain-server
|
||||
- name: Build Assignment Client
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target assignment-client
|
||||
- name: Build Installer
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE --target package
|
||||
- name: Upload Artifact
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_REPO_TOKEN }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
|
||||
ARTIFACT_PATTERN: HighFidelity-Beta-PR${{ github.event.number }}-*.exe
|
||||
run: python "$GITHUB_WORKSPACE\tools\ci-scripts\upload.py"
|
|
@ -19,7 +19,7 @@ endif()
|
|||
# (needs to be set before first project() call and before prebuild.py)
|
||||
# Will affect VCPKG dependencies
|
||||
if (APPLE)
|
||||
set(ENV{MACOSX_DEPLOYMENT_TARGET} 10.9)
|
||||
set(ENV{MACOSX_DEPLOYMENT_TARGET} 10.11)
|
||||
endif()
|
||||
|
||||
set(RELEASE_TYPE "$ENV{RELEASE_TYPE}")
|
||||
|
@ -48,6 +48,15 @@ if(NOT EXISTS "${CMAKE_BINARY_DIR}/vcpkg.cmake")
|
|||
endif()
|
||||
include("${CMAKE_BINARY_DIR}/vcpkg.cmake")
|
||||
|
||||
if (HIFI_ANDROID)
|
||||
set(QT_CMAKE_PREFIX_PATH "$ENV{HIFI_ANDROID_PRECOMPILED}/qt/lib/cmake")
|
||||
else()
|
||||
if(NOT EXISTS "${CMAKE_BINARY_DIR}/qt.cmake")
|
||||
message(FATAL_ERROR "qt configuration missing.")
|
||||
endif()
|
||||
include("${CMAKE_BINARY_DIR}/qt.cmake")
|
||||
endif()
|
||||
|
||||
project(hifi)
|
||||
include("cmake/init.cmake")
|
||||
include("cmake/compiler.cmake")
|
||||
|
|
|
@ -29,6 +29,7 @@ docker run \
|
|||
-e CMAKE_BACKTRACE_TOKEN \
|
||||
-e CMAKE_BACKTRACE_SYMBOLS_TOKEN \
|
||||
-e GA_TRACKING_ID \
|
||||
-e GIT_PR_COMMIT \
|
||||
-e OAUTH_CLIENT_SECRET \
|
||||
-e OAUTH_CLIENT_ID \
|
||||
-e OAUTH_REDIRECT_URI \
|
||||
|
|
33
cmake/externals/glad32es/CMakeLists.txt
vendored
33
cmake/externals/glad32es/CMakeLists.txt
vendored
|
@ -1,33 +0,0 @@
|
|||
set(EXTERNAL_NAME glad32es)
|
||||
|
||||
include(ExternalProject)
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/glad/glad32es.zip
|
||||
URL_MD5 6a641d8c49dee4c895fa59315f5682a6
|
||||
CONFIGURE_COMMAND CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
LOG_DOWNLOAD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_BUILD 1
|
||||
)
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
|
||||
if (UNIX)
|
||||
set(LIB_PREFIX "lib")
|
||||
set(LIB_EXT "a")
|
||||
elseif (WIN32)
|
||||
set(LIB_EXT "lib")
|
||||
endif ()
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/${LIB_PREFIX}glad_d.${LIB_EXT})
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/${LIB_PREFIX}glad.${LIB_EXT})
|
||||
select_library_configurations(${EXTERNAL_NAME_UPPER})
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE PATH "List of glad include directories")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY ${${EXTERNAL_NAME_UPPER}_LIBRARY} CACHE INTERNAL "glad libraries")
|
33
cmake/externals/glad41/CMakeLists.txt
vendored
33
cmake/externals/glad41/CMakeLists.txt
vendored
|
@ -1,33 +0,0 @@
|
|||
set(EXTERNAL_NAME glad41)
|
||||
|
||||
include(ExternalProject)
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/glad/glad41.zip
|
||||
URL_MD5 1324eeec33abe91e67d19ae551ba624d
|
||||
CONFIGURE_COMMAND CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
LOG_DOWNLOAD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_BUILD 1
|
||||
)
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
|
||||
if (UNIX)
|
||||
set(LIB_PREFIX "lib")
|
||||
set(LIB_EXT "a")
|
||||
elseif (WIN32)
|
||||
set(LIB_EXT "lib")
|
||||
endif ()
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/${LIB_PREFIX}glad_d.${LIB_EXT})
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/${LIB_PREFIX}glad.${LIB_EXT})
|
||||
select_library_configurations(${EXTERNAL_NAME_UPPER})
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE PATH "List of glad include directories")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY ${${EXTERNAL_NAME_UPPER}_LIBRARY} CACHE INTERNAL "glad libraries")
|
33
cmake/externals/glad45/CMakeLists.txt
vendored
33
cmake/externals/glad45/CMakeLists.txt
vendored
|
@ -1,33 +0,0 @@
|
|||
set(EXTERNAL_NAME glad45)
|
||||
|
||||
include(ExternalProject)
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/glad/glad45.zip
|
||||
URL_MD5 cfb19b3cb5b2f8f1d1669fb3150e5f05
|
||||
CONFIGURE_COMMAND CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
LOG_DOWNLOAD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_BUILD 1
|
||||
)
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
|
||||
if (UNIX)
|
||||
set(LIB_PREFIX "lib")
|
||||
set(LIB_EXT "a")
|
||||
elseif (WIN32)
|
||||
set(LIB_EXT "lib")
|
||||
endif ()
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/${LIB_PREFIX}glad_d.${LIB_EXT})
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/${LIB_PREFIX}glad.${LIB_EXT})
|
||||
select_library_configurations(${EXTERNAL_NAME_UPPER})
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE PATH "List of glad include directories")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY ${${EXTERNAL_NAME_UPPER}_LIBRARY} CACHE INTERNAL "glad libraries")
|
78
cmake/externals/polyvox/CMakeLists.txt
vendored
78
cmake/externals/polyvox/CMakeLists.txt
vendored
|
@ -1,78 +0,0 @@
|
|||
set(EXTERNAL_NAME polyvox)
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/polyvox-master-2015-7-15.zip
|
||||
URL_MD5 9ec6323b87e849ae36e562ae1c7494a9
|
||||
CMAKE_ARGS -DENABLE_EXAMPLES=OFF -DENABLE_BINDINGS=OFF -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
||||
BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
LOG_DOWNLOAD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_BUILD 1
|
||||
)
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
|
||||
if (APPLE)
|
||||
set(INSTALL_NAME_LIBRARY_DIR ${INSTALL_DIR}/lib)
|
||||
|
||||
ExternalProject_Add_Step(
|
||||
${EXTERNAL_NAME}
|
||||
change-install-name-debug
|
||||
COMMENT "Calling install_name_tool on libraries to fix install name for dylib linking"
|
||||
COMMAND ${CMAKE_COMMAND} -DINSTALL_NAME_LIBRARY_DIR=${INSTALL_NAME_LIBRARY_DIR}/Debug -P ${EXTERNAL_PROJECT_DIR}/OSXInstallNameChange.cmake
|
||||
DEPENDEES install
|
||||
WORKING_DIRECTORY <SOURCE_DIR>
|
||||
LOG 1
|
||||
)
|
||||
|
||||
ExternalProject_Add_Step(
|
||||
${EXTERNAL_NAME}
|
||||
change-install-name-release
|
||||
COMMENT "Calling install_name_tool on libraries to fix install name for dylib linking"
|
||||
COMMAND ${CMAKE_COMMAND} -DINSTALL_NAME_LIBRARY_DIR=${INSTALL_NAME_LIBRARY_DIR}/Release -P ${EXTERNAL_PROJECT_DIR}/OSXInstallNameChange.cmake
|
||||
DEPENDEES install
|
||||
WORKING_DIRECTORY <SOURCE_DIR>
|
||||
LOG 1
|
||||
)
|
||||
endif ()
|
||||
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
if (WIN32)
|
||||
set(${EXTERNAL_NAME_UPPER}_CORE_INCLUDE_DIRS ${INSTALL_DIR}/PolyVoxCore/include CACHE FILEPATH
|
||||
"Path to polyvox core include directory")
|
||||
set(${EXTERNAL_NAME_UPPER}_UTIL_INCLUDE_DIRS ${INSTALL_DIR}/PolyVoxUtil/include CACHE FILEPATH
|
||||
"Path to polyvox util include directory")
|
||||
else ()
|
||||
set(${EXTERNAL_NAME_UPPER}_CORE_INCLUDE_DIRS ${INSTALL_DIR}/include/PolyVoxCore CACHE FILEPATH
|
||||
"Path to polyvox core include directory")
|
||||
set(${EXTERNAL_NAME_UPPER}_UTIL_INCLUDE_DIRS ${INSTALL_DIR}/include/PolyVoxUtil CACHE FILEPATH
|
||||
"Path to polyvox util include directory")
|
||||
endif ()
|
||||
|
||||
|
||||
if (WIN32)
|
||||
set(${EXTERNAL_NAME_UPPER}_CORE_LIBRARY_DEBUG ${INSTALL_DIR}/PolyVoxCore/lib/Debug/PolyVoxCore.lib CACHE FILEPATH "polyvox core library")
|
||||
|
||||
# use generator expression to ensure the correct library is found when building different configurations in VS
|
||||
set(_LIB_FOLDER "$<$<CONFIG:RelWithDebInfo>:PolyVoxCore/lib/RelWithDebInfo>")
|
||||
set(_LIB_FOLDER "${_LIB_FOLDER}$<$<CONFIG:MinSizeRel>:build/library/PolyVoxCore/MinSizeRel>")
|
||||
set(_LIB_FOLDER "${_LIB_FOLDER}$<$<OR:$<CONFIG:Release>,$<CONFIG:Debug>>:PolyVoxCore/lib/Release>")
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_CORE_LIBRARY_RELEASE "${INSTALL_DIR}/${_LIB_FOLDER}/PolyVoxCore.lib" CACHE FILEPATH "polyvox core library")
|
||||
# set(${EXTERNAL_NAME_UPPER}_UTIL_LIBRARY ${INSTALL_DIR}/PolyVoxUtil/lib/PolyVoxUtil.lib CACHE FILEPATH "polyvox util library")
|
||||
elseif (APPLE)
|
||||
set(${EXTERNAL_NAME_UPPER}_CORE_LIBRARY_DEBUG ${INSTALL_DIR}/lib/Debug/libPolyVoxCore.dylib CACHE FILEPATH "polyvox core library")
|
||||
set(${EXTERNAL_NAME_UPPER}_CORE_LIBRARY_RELEASE ${INSTALL_DIR}/lib/Release/libPolyVoxCore.dylib CACHE FILEPATH "polyvox core library")
|
||||
# set(${EXTERNAL_NAME_UPPER}_UTIL_LIBRARY ${INSTALL_DIR}/lib/libPolyVoxUtil.dylib CACHE FILEPATH "polyvox util library")
|
||||
else ()
|
||||
set(${EXTERNAL_NAME_UPPER}_CORE_LIBRARY_DEBUG ${INSTALL_DIR}/lib/Debug/libPolyVoxCore.so CACHE FILEPATH "polyvox core library")
|
||||
set(${EXTERNAL_NAME_UPPER}_CORE_LIBRARY_RELEASE ${INSTALL_DIR}/lib/Release/libPolyVoxCore.so CACHE FILEPATH "polyvox core library")
|
||||
# set(${EXTERNAL_NAME_UPPER}_UTIL_LIBRARY ${INSTALL_DIR}/lib/libPolyVoxUtil.so CACHE FILEPATH "polyvox util library")
|
||||
endif ()
|
60
cmake/externals/quazip/CMakeLists.txt
vendored
60
cmake/externals/quazip/CMakeLists.txt
vendored
|
@ -1,60 +0,0 @@
|
|||
set(EXTERNAL_NAME quazip)
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
set(QUAZIP_CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
||||
-DCMAKE_PREFIX_PATH=${QT_CMAKE_PREFIX_PATH}
|
||||
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DZLIB_ROOT=${VCPKG_INSTALL_ROOT}
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON)
|
||||
|
||||
if (NOT APPLE)
|
||||
set(QUAZIP_CMAKE_ARGS ${QUAZIP_CMAKE_ARGS} -DCMAKE_CXX_STANDARD=11)
|
||||
endif ()
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/quazip-0.7.3.zip
|
||||
URL_MD5 ed03754d39b9da1775771819b8001d45
|
||||
BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
CMAKE_ARGS ${QUAZIP_CMAKE_ARGS}
|
||||
LOG_DOWNLOAD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_BUILD 1
|
||||
)
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES
|
||||
FOLDER "hidden/externals"
|
||||
INSTALL_NAME_DIR ${INSTALL_DIR}/lib
|
||||
BUILD_WITH_INSTALL_RPATH True)
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIR ${INSTALL_DIR}/include CACHE PATH "List of QuaZip include directories")
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${${EXTERNAL_NAME_UPPER}_INCLUDE_DIR} CACHE PATH "List of QuaZip include directories")
|
||||
set(${EXTERNAL_NAME_UPPER}_DLL_PATH ${INSTALL_DIR}/lib CACHE FILEPATH "Location of QuaZip DLL")
|
||||
|
||||
if (APPLE)
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libquazip5.1.0.0.dylib CACHE FILEPATH "Location of QuaZip release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libquazip5d.1.0.0.dylib CACHE FILEPATH "Location of QuaZip release library")
|
||||
elseif (WIN32)
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/quazip5.lib CACHE FILEPATH "Location of QuaZip release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/quazip5d.lib CACHE FILEPATH "Location of QuaZip release library")
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libquazip5.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libquazip5d.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
else ()
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libquazip5.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libquazip5.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
endif ()
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(${EXTERNAL_NAME_UPPER})
|
||||
|
||||
# Force selected libraries into the cache
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY ${${EXTERNAL_NAME_UPPER}_LIBRARY} CACHE FILEPATH "Location of QuaZip libraries")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${${EXTERNAL_NAME_UPPER}_LIBRARIES} CACHE FILEPATH "Location of QuaZip libraries")
|
40
cmake/externals/vhacd/CMakeLists.txt
vendored
40
cmake/externals/vhacd/CMakeLists.txt
vendored
|
@ -1,40 +0,0 @@
|
|||
set(EXTERNAL_NAME vhacd)
|
||||
|
||||
if (ANDROID)
|
||||
set(ANDROID_CMAKE_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" "-DANDROID_NATIVE_API_LEVEL=19")
|
||||
endif ()
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/v-hacd-master.zip
|
||||
URL_MD5 3bfc94f8dd3dfbfe8f4dc088f4820b3e
|
||||
CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
||||
BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
LOG_DOWNLOAD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_BUILD 1
|
||||
)
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
if (WIN32)
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/Debug/VHACD_LIB.lib CACHE FILEPATH "Path to V-HACD debug library")
|
||||
|
||||
# use generator expression to ensure the correct library is found when building different configurations in VS
|
||||
set(_LIB_FOLDER "$<$<CONFIG:RelWithDebInfo>:build/src/VHACD_Lib/RelWithDebInfo>")
|
||||
set(_LIB_FOLDER "${_LIB_FOLDER}$<$<CONFIG:MinSizeRel>:build/src/VHACD_Lib/MinSizeRel>")
|
||||
set(_LIB_FOLDER "${_LIB_FOLDER}$<$<OR:$<CONFIG:Release>,$<CONFIG:Debug>>:lib/Release>")
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/${_LIB_FOLDER}/VHACD_LIB.lib CACHE FILEPATH "Path to V-HACD release library")
|
||||
else ()
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG "" CACHE FILEPATH "Path to V-HACD debug library")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libVHACD.a CACHE FILEPATH "Path to V-HACD release library")
|
||||
endif ()
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE FILEPATH "Path to V-HACD include directory")
|
|
@ -61,4 +61,6 @@ endif ()
|
|||
|
||||
if (APPLE)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
|
||||
endif()
|
14
cmake/macros/DumpCmakeVariables.cmake
Normal file
14
cmake/macros/DumpCmakeVariables.cmake
Normal file
|
@ -0,0 +1,14 @@
|
|||
function(dump_cmake_variables)
|
||||
get_cmake_property(_variableNames VARIABLES)
|
||||
list (SORT _variableNames)
|
||||
foreach (_variableName ${_variableNames})
|
||||
if (ARGV0)
|
||||
unset(MATCHED)
|
||||
string(REGEX MATCH ${ARGV0} MATCHED ${_variableName})
|
||||
if (NOT MATCHED)
|
||||
continue()
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "${_variableName}=${${_variableName}}")
|
||||
endforeach()
|
||||
endfunction()
|
|
@ -91,37 +91,11 @@ macro(SET_PACKAGING_PARAMETERS)
|
|||
endif ()
|
||||
|
||||
if ((PRODUCTION_BUILD OR PR_BUILD) AND NOT STABLE_BUILD)
|
||||
set(GIT_PR_COMMIT $ENV{GIT_PR_COMMIT})
|
||||
#set(GIT_COMMIT_HASH ${GIT_PR_COMMIT})
|
||||
string(SUBSTRING ${GIT_PR_COMMIT} 0 7 GIT_COMMIT_HASH)
|
||||
# append the abbreviated commit SHA to the build version
|
||||
# since this is a PR build or master/nightly builds
|
||||
|
||||
# for PR_BUILDS, we need to grab the abbreviated SHA
|
||||
# for the second parent of HEAD (not HEAD) since that is the
|
||||
# SHA of the commit merged to master for the build
|
||||
if (PR_BUILD)
|
||||
set(_GIT_LOG_FORMAT "%p %h")
|
||||
else ()
|
||||
set(_GIT_LOG_FORMAT "%h")
|
||||
endif ()
|
||||
|
||||
execute_process(
|
||||
COMMAND git log -1 --abbrev=7 --format=${_GIT_LOG_FORMAT}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _GIT_LOG_OUTPUT
|
||||
ERROR_VARIABLE _GIT_LOG_ERROR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if (PR_BUILD)
|
||||
separate_arguments(_COMMIT_PARENTS UNIX_COMMAND ${_GIT_LOG_OUTPUT})
|
||||
list(GET _COMMIT_PARENTS 1 GIT_COMMIT_HASH)
|
||||
else ()
|
||||
set(GIT_COMMIT_HASH ${_GIT_LOG_OUTPUT})
|
||||
endif ()
|
||||
|
||||
if (_GIT_LOG_ERROR OR NOT GIT_COMMIT_HASH)
|
||||
message(FATAL_ERROR "Could not retreive abbreviated SHA for PR or production master build")
|
||||
endif ()
|
||||
|
||||
set(BUILD_VERSION_NO_SHA ${BUILD_VERSION})
|
||||
set(BUILD_VERSION "${BUILD_VERSION}-${GIT_COMMIT_HASH}")
|
||||
|
||||
|
|
|
@ -48,19 +48,13 @@ macro(setup_qt)
|
|||
# if we are in a development build and QT_CMAKE_PREFIX_PATH is specified
|
||||
# then use it,
|
||||
# otherwise, use the vcpkg'ed version
|
||||
if(NOT DEFINED VCPKG_QT_CMAKE_PREFIX_PATH)
|
||||
message(FATAL_ERROR "VCPKG_QT_CMAKE_PREFIX_PATH should have been set by hifi_vcpkg.py")
|
||||
if(NOT DEFINED QT_CMAKE_PREFIX_PATH)
|
||||
message(FATAL_ERROR "QT_CMAKE_PREFIX_PATH should have been set by hifi_qt.py")
|
||||
endif()
|
||||
if (NOT DEV_BUILD)
|
||||
message("override QT_CMAKE_PREFIX_PATH with VCPKG_QT_CMAKE_PREFIX_PATH")
|
||||
set(QT_CMAKE_PREFIX_PATH ${VCPKG_QT_CMAKE_PREFIX_PATH})
|
||||
else()
|
||||
# DEV_BUILD
|
||||
if (DEFINED ENV{QT_CMAKE_PREFIX_PATH})
|
||||
set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH})
|
||||
else()
|
||||
set(QT_CMAKE_PREFIX_PATH ${VCPKG_QT_CMAKE_PREFIX_PATH})
|
||||
endif()
|
||||
if (DEV_BUILD)
|
||||
if (DEFINED ENV{QT_CMAKE_PREFIX_PATH})
|
||||
set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message("QT_CMAKE_PREFIX_PATH = " ${QT_CMAKE_PREFIX_PATH})
|
||||
|
|
|
@ -16,21 +16,15 @@ macro(TARGET_GLAD)
|
|||
find_library(EGL EGL)
|
||||
target_link_libraries(${TARGET_NAME} ${EGL})
|
||||
else()
|
||||
if (USE_GLES)
|
||||
set(GLAD_VER "32es")
|
||||
else()
|
||||
set(GLAD_VER "45")
|
||||
endif()
|
||||
find_package(OpenGL REQUIRED)
|
||||
list(APPEND GLAD_EXTRA_LIBRARIES ${OPENGL_LIBRARY})
|
||||
find_library(GLAD_LIBRARY_RELEASE glad PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(GLAD_LIBRARY_DEBUG glad_d PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
select_library_configurations(GLAD)
|
||||
if (NOT WIN32)
|
||||
list(APPEND GLAD_EXTRA_LIBRARIES dl)
|
||||
endif()
|
||||
set(GLAD "glad${GLAD_VER}")
|
||||
string(TOUPPER ${GLAD} GLAD_UPPER)
|
||||
add_dependency_external_projects(${GLAD})
|
||||
set(GLAD_INCLUDE_DIRS ${${GLAD_UPPER}_INCLUDE_DIRS})
|
||||
set(GLAD_LIBRARY ${${GLAD_UPPER}_LIBRARY})
|
||||
endif()
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${GLAD_INCLUDE_DIRS})
|
||||
|
|
|
@ -13,12 +13,16 @@ macro(TARGET_POLYVOX)
|
|||
list(APPEND POLYVOX_LIBRARIES ${LIB_DIR}/libPolyVoxUtil.so)
|
||||
list(APPEND POLYVOX_LIBRARIES ${LIB_DIR}/Release/libPolyVoxCore.so)
|
||||
else()
|
||||
add_dependency_external_projects(polyvox)
|
||||
find_package(PolyVox REQUIRED)
|
||||
find_library(POLYVOX_LIBRARY_RELEASE PolyVoxCore PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(POLYVOX_UTIL_LIBRARY_RELEASE PolyVoxUtil PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
list(APPEND POLYVOX_LIBRARY_RELEASE ${POLYVOX_UTIL_LIBRARY_RELEASE})
|
||||
find_library(POLYVOX_LIBRARY_DEBUG PolyVoxCore PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
find_library(POLYVOX_UTIL_LIBRARY_DEBUG PolyVoxUtil PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
list(APPEND POLYVOX_LIBRARY_DEBUG ${POLYVOX_UTIL_LIBRARY_DEBUG})
|
||||
select_library_configurations(POLYVOX)
|
||||
list(APPEND POLYVOX_INCLUDE_DIRS ${VCPKG_INSTALL_ROOT}/include)
|
||||
endif()
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${POLYVOX_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${POLYVOX_LIBRARIES})
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${POLYVOX_INCLUDE_DIRS})
|
||||
endmacro()
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_QUAZIP)
|
||||
add_dependency_external_projects(quazip)
|
||||
find_package(QuaZip REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${QUAZIP_INCLUDE_DIRS})
|
||||
find_library(QUAZIP_LIBRARY_RELEASE quazip5 PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(QUAZIP_LIBRARY_DEBUG quazip5 PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
select_library_configurations(QUAZIP)
|
||||
target_link_libraries(${TARGET_NAME} ${QUAZIP_LIBRARIES})
|
||||
if (WIN32)
|
||||
add_paths_to_fixup_libs(${QUAZIP_DLL_PATH})
|
||||
endif ()
|
||||
endmacro()
|
|
@ -1,15 +0,0 @@
|
|||
macro(TARGET_SPIRV)
|
||||
add_dependency_external_projects(spirv_cross)
|
||||
target_link_libraries(${TARGET_NAME} ${SPIRV_CROSS_LIBRARIES})
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${SPIRV_CROSS_INCLUDE_DIRS})
|
||||
|
||||
# spirv-tools requires spirv-headers
|
||||
add_dependency_external_projects(spirv_headers)
|
||||
add_dependency_external_projects(spirv_tools)
|
||||
target_link_libraries(${TARGET_NAME} ${SPIRV_TOOLS_LIBRARIES})
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${SPIRV_TOOLS_INCLUDE_DIRS})
|
||||
|
||||
add_dependency_external_projects(glslang)
|
||||
target_link_libraries(${TARGET_NAME} ${GLSLANG_LIBRARIES})
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${GLSLANG_INCLUDE_DIRS})
|
||||
endmacro()
|
|
@ -1,10 +0,0 @@
|
|||
#
|
||||
# Created by Bradley Austin Davis on 2016/02/16
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_SPIRV_BINARIES)
|
||||
add_dependency_external_projects(spirv_binaries)
|
||||
endmacro()
|
||||
|
|
@ -15,11 +15,6 @@ if (ANDROID)
|
|||
set(TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY})
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${TBB_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${TBB_LIBRARIES})
|
||||
elseif(APPLE)
|
||||
add_dependency_external_projects(tbb)
|
||||
find_package(TBB REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} ${TBB_LIBRARIES})
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${TBB_INCLUDE_DIRS})
|
||||
else()
|
||||
# using VCPKG for TBB
|
||||
find_package(TBB CONFIG REQUIRED)
|
||||
|
|
6
cmake/macros/TargetVHACD.cmake
Normal file
6
cmake/macros/TargetVHACD.cmake
Normal file
|
@ -0,0 +1,6 @@
|
|||
macro(TARGET_VHACD)
|
||||
find_library(VHACD_LIBRARY_RELEASE VHACD PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(VHACD_LIBRARY_DEBUG VHACD PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
select_library_configurations(VHACD)
|
||||
target_link_libraries(${TARGET_NAME} ${VHACD_LIBRARIES})
|
||||
endmacro()
|
1
cmake/ports/.gitattributes
vendored
Normal file
1
cmake/ports/.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
* eol=lf
|
3
cmake/ports/glad/CONTROL
Normal file
3
cmake/ports/glad/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: glad
|
||||
Version: 20191029
|
||||
Description: OpenGL function loader
|
20
cmake/ports/glad/copyright
Normal file
20
cmake/ports/glad/copyright
Normal file
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2018 David Herberth
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
36
cmake/ports/glad/portfile.cmake
Normal file
36
cmake/ports/glad/portfile.cmake
Normal file
|
@ -0,0 +1,36 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
if (ANDROID)
|
||||
vcpkg_download_distfile(
|
||||
SOURCE_ARCHIVE
|
||||
URLS https://public.highfidelity.com/dependencies/glad/glad32es.zip
|
||||
SHA512 2e02ac633eed8f2ba2adbf96ea85d08998f48dd2e9ec9a88ec3c25f48eaf1405371d258066327c783772fcb3793bdb82bd7375fdabb2ba5e2ce0835468b17f65
|
||||
)
|
||||
else()
|
||||
# else Linux desktop
|
||||
vcpkg_download_distfile(
|
||||
SOURCE_ARCHIVE
|
||||
URLS https://public.highfidelity.com/dependencies/glad/glad45.zip
|
||||
SHA512 653a7b873f9fbc52e0ab95006cc3143bc7b6f62c6e032bc994e87669273468f37978525c9af5efe36f924cb4acd221eb664ad9af0ce4bf711b4f1be724c0065e
|
||||
FILENAME glad45.zip
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${SOURCE_ARCHIVE}
|
||||
NO_REMOVE_ONE_LEVEL
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/glad)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
Source: hifi-client-deps
|
||||
Version: 0
|
||||
Description: Collected dependencies for High Fidelity applications
|
||||
Build-Depends: hifi-deps, glslang, nlohmann-json, openvr (windows), sdl2 (!android), spirv-cross (!android), spirv-tools (!android), vulkanmemoryallocator
|
||||
Build-Depends: hifi-deps, glslang, nlohmann-json, openvr (windows), quazip (!android), sdl2 (!android), spirv-cross (!android), spirv-tools (!android), vulkanmemoryallocator
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Source: hifi-deps
|
||||
Version: 0.3
|
||||
Version: 0.1.4-github-actions
|
||||
Description: Collected dependencies for High Fidelity applications
|
||||
Build-Depends: bullet3, draco, etc2comp, glm, nvtt, openexr (!android), openssl (windows), tbb (!android&!osx), zlib, webrtc (!android)
|
||||
Build-Depends: bullet3, draco, etc2comp, glad, glm, nvtt, openexr (!android), openssl (!android&!osx), polyvox, tbb (!android), vhacd, webrtc (!android), zlib
|
||||
|
|
|
@ -26,6 +26,7 @@ get_filename_component(COMPILER_ROOT "${CMAKE_C_COMPILER}" DIRECTORY)
|
|||
message("CMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
|
||||
message("COMPILER_ROOT=${COMPILER_ROOT}")
|
||||
message("CMAKE_SYSROOT=${CMAKE_SYSROOT}")
|
||||
message("CMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}")
|
||||
message("CMAKE_C_FLAGS=${CMAKE_C_FLAGS}")
|
||||
message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}")
|
||||
message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}")
|
||||
|
@ -43,6 +44,8 @@ if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN)
|
|||
endif()
|
||||
if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT)
|
||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}")
|
||||
elseif(CMAKE_OSX_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT)
|
||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_OSX_SYSROOT}")
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "^ " "" CFLAGS "${CFLAGS}")
|
||||
|
@ -73,9 +76,27 @@ file(WRITE "${BUILDDIR}/Configure" "${_contents}")
|
|||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(SHARED shared)
|
||||
file(STRINGS "${BUILDDIR}/crypto/opensslv.h" SHLIB_VERSION
|
||||
REGEX "^#[\t ]*define[\t ]+SHLIB_VERSION_NUMBER[\t ]+\".*\".*")
|
||||
string(REGEX REPLACE "^.*SHLIB_VERSION_NUMBER[\t ]+\"([^\"]*)\".*$" "\\1"
|
||||
SHLIB_VERSION "${SHLIB_VERSION}")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(LIB_EXT dylib)
|
||||
set(LIB_EXTS ${SHLIB_VERSION}.${LIB_EXT})
|
||||
else()
|
||||
set(LIB_EXT so)
|
||||
set(LIB_EXTS ${LIB_EXT}.${SHLIB_VERSION})
|
||||
endif()
|
||||
list(APPEND LIB_EXTS ${LIB_EXT})
|
||||
else()
|
||||
set(SHARED no-shared)
|
||||
set(LIB_EXTS a)
|
||||
endif()
|
||||
foreach(lib ssl crypto)
|
||||
foreach(ext ${LIB_EXTS})
|
||||
list(APPEND INSTALL_LIBS "${BUILDDIR}/lib${lib}.${ext}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
set(ENV_COMMAND set)
|
||||
|
@ -127,10 +148,10 @@ add_custom_target(build_libs ALL
|
|||
VERBATIM
|
||||
WORKING_DIRECTORY "${BUILDDIR}"
|
||||
DEPENDS depend
|
||||
BYPRODUCTS "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
|
||||
BYPRODUCTS ${INSTALL_LIBS}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
|
||||
FILES ${INSTALL_LIBS}
|
||||
DESTINATION lib
|
||||
)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
Source: openssl-unix
|
||||
Version: 1.0.2p
|
||||
Version: 1.0.2s-1
|
||||
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.
|
||||
|
|
|
@ -1,25 +1,37 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME)
|
||||
message(FATAL_ERROR "This port is only for openssl on Unix-like systems")
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(OPENSSL_VERSION 1.0.2p)
|
||||
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION})
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h")
|
||||
message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl")
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
endif()
|
||||
|
||||
vcpkg_find_acquire_program(PERL)
|
||||
|
||||
set(OPENSSL_VERSION 1.0.2s)
|
||||
|
||||
vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE
|
||||
URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz"
|
||||
FILENAME "openssl-${OPENSSL_VERSION}.tar.gz"
|
||||
SHA512 958c5a7c3324bbdc8f07dfb13e11329d9a1b4452c07cf41fbd2d42b5fe29c95679332a3476d24c2dc2b88be16e4a24744aba675a05a388c0905756c77a8a2f16
|
||||
SHA512 9f745452c4f777df694158e95003cde78a2cf8199bc481a563ec36644664c3c1415a774779b9791dd18f2aeb57fa1721cb52b3db12d025955e970071d5b66d2a
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE})
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${MASTER_COPY_SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH MASTER_COPY_SOURCE_PATH
|
||||
ARCHIVE ${OPENSSL_SOURCE_ARCHIVE}
|
||||
REF ${OPENSSL_VERSION}
|
||||
PATCHES
|
||||
ConfigureIncludeQuotesFix.patch
|
||||
STRINGIFYPatch.patch
|
||||
EmbedSymbolsInStaticLibsZ7.patch
|
||||
)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
|
|
3
cmake/ports/polyvox/CONTROL
Normal file
3
cmake/ports/polyvox/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: polyvox
|
||||
Version: 20150715
|
||||
Description: Polyvox
|
89
cmake/ports/polyvox/portfile.cmake
Normal file
89
cmake/ports/polyvox/portfile.cmake
Normal file
|
@ -0,0 +1,89 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
# else Linux desktop
|
||||
vcpkg_download_distfile(
|
||||
SOURCE_ARCHIVE
|
||||
URLS https://public.highfidelity.com/dependencies/polyvox-master-2015-7-15.zip
|
||||
SHA512 cc04cd43ae74b9c7bb065953540c0048053fcba6b52dc4218b3d9431fba178d65ad4f6c53cc1122ba61d0ab4061e99a7ebbb15db80011d607c5070ebebf8eddc
|
||||
FILENAME polyvox.zip
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${SOURCE_ARCHIVE}
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS -DENABLE_EXAMPLES=OFF -DENABLE_BINDINGS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/polyvox RENAME copyright)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
if(WIN32)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/PolyVoxCore/lib/Release/PolyVoxCore.lib ${CURRENT_PACKAGES_DIR}/lib/PolyVoxCore.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/PolyVoxCore/lib/Debug/PolyVoxCore.lib ${CURRENT_PACKAGES_DIR}/debug/lib/PolyVoxCore.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/PolyVoxUtil/lib/PolyVoxUtil.lib ${CURRENT_PACKAGES_DIR}/lib/PolyVoxUtil.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/PolyVoxUtil/lib/PolyVoxUtil.lib ${CURRENT_PACKAGES_DIR}/debug/lib/PolyVoxUtil.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/PolyVoxCore/include/PolyVoxCore ${CURRENT_PACKAGES_DIR}/include/PolyVoxCore)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/PolyVoxUtil/include/PolyVoxUtil ${CURRENT_PACKAGES_DIR}/include/PolyVoxUtil)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/PolyVoxConfig.cmake ${CURRENT_PACKAGES_DIR}/share/polyvox/polyvoxConfig.cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/PolyVoxCore)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/PolyVoxUtil)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/PolyVoxUtil)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/PolyVoxCore)
|
||||
else()
|
||||
file(GLOB LIBS ${CURRENT_PACKAGES_DIR}/lib/Release/*)
|
||||
foreach(_lib ${LIBS})
|
||||
file(RELATIVE_PATH _libName ${CURRENT_PACKAGES_DIR}/lib/Release ${_lib})
|
||||
file(RENAME ${_lib} ${CURRENT_PACKAGES_DIR}/lib/${_libName})
|
||||
endforeach()
|
||||
file(GLOB LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/Debug/*)
|
||||
foreach(_lib ${LIBS})
|
||||
file(RELATIVE_PATH _libName ${CURRENT_PACKAGES_DIR}/debug/lib/Debug ${_lib})
|
||||
file(RENAME ${_lib} ${CURRENT_PACKAGES_DIR}/debug/lib/${_libName})
|
||||
endforeach()
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/PolyVoxCore ${CURRENT_PACKAGES_DIR}/include/PolyVoxCore.temp)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/PolyVoxCore.temp/PolyVoxCore ${CURRENT_PACKAGES_DIR}/include/PolyVoxCore)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/PolyVoxCore.temp)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/PolyVoxUtil ${CURRENT_PACKAGES_DIR}/include/PolyVoxUtil.temp)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/PolyVoxUtil.temp/PolyVoxUtil ${CURRENT_PACKAGES_DIR}/include/PolyVoxUtil)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/PolyVoxUtil.temp)
|
||||
endif()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/Release)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/RelWithDebInfo)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/Debug)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/Release)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/RelWithDebInfo)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/Debug)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
# if (APPLE)
|
||||
# set(INSTALL_NAME_LIBRARY_DIR ${INSTALL_DIR}/lib)
|
||||
# ExternalProject_Add_Step(
|
||||
# ${EXTERNAL_NAME}
|
||||
# change-install-name-debug
|
||||
# COMMENT "Calling install_name_tool on libraries to fix install name for dylib linking"
|
||||
# COMMAND ${CMAKE_COMMAND} -DINSTALL_NAME_LIBRARY_DIR=${INSTALL_NAME_LIBRARY_DIR}/Debug -P ${EXTERNAL_PROJECT_DIR}/OSXInstallNameChange.cmake
|
||||
# DEPENDEES install
|
||||
# WORKING_DIRECTORY <SOURCE_DIR>
|
||||
# LOG 1
|
||||
# )
|
||||
# ExternalProject_Add_Step(
|
||||
# ${EXTERNAL_NAME}
|
||||
# change-install-name-release
|
||||
# COMMENT "Calling install_name_tool on libraries to fix install name for dylib linking"
|
||||
# COMMAND ${CMAKE_COMMAND} -DINSTALL_NAME_LIBRARY_DIR=${INSTALL_NAME_LIBRARY_DIR}/Release -P ${EXTERNAL_PROJECT_DIR}/OSXInstallNameChange.cmake
|
||||
# DEPENDEES install
|
||||
# WORKING_DIRECTORY <SOURCE_DIR>
|
||||
# LOG 1
|
||||
# )
|
||||
# endif ()
|
4
cmake/ports/quazip/CONTROL
Normal file
4
cmake/ports/quazip/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: quazip
|
||||
Version: 0.7.3
|
||||
Description: Zip file manipulation for Qt
|
||||
Build-Depends: zlib
|
85
cmake/ports/quazip/portfile.cmake
Normal file
85
cmake/ports/quazip/portfile.cmake
Normal file
|
@ -0,0 +1,85 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_download_distfile(
|
||||
SOURCE_ARCHIVE
|
||||
URLS https://public.highfidelity.com/dependencies/quazip-0.7.3.zip
|
||||
SHA512 b2d812b6346317fd6d8f4f1344ad48b721d697c429acc8b7e7cb776ce5cba15a59efd64b2c5ae1f31b5a3c928014f084aa1379fd55d8a452a6cf4fd510b3afcc
|
||||
FILENAME quazip.zip
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${SOURCE_ARCHIVE}
|
||||
NO_REMOVE_ONE_LEVEL
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_PREFIX_PATH=$ENV{QT_CMAKE_PREFIX_PATH} -DBUILD_WITH_QT4=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
if (WIN32)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/quazip5.dll ${CURRENT_PACKAGES_DIR}/bin/quazip5.dll)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/quazip5d.dll ${CURRENT_PACKAGES_DIR}/debug/bin/quazip5.dll)
|
||||
endif()
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/quazip RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# set(QUAZIP_CMAKE_ARGS
|
||||
# -DCMAKE_PREFIX_PATH=${QT_CMAKE_PREFIX_PATH}
|
||||
# -DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
|
||||
# -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
# -DZLIB_ROOT=${VCPKG_INSTALL_ROOT}
|
||||
# -DCMAKE_POSITION_INDEPENDENT_CODE=ON)
|
||||
|
||||
# if (NOT APPLE)
|
||||
# set(QUAZIP_CMAKE_ARGS ${QUAZIP_CMAKE_ARGS} -DCMAKE_CXX_STANDARD=11)
|
||||
# endif ()
|
||||
|
||||
# ExternalProject_Add(
|
||||
# ${EXTERNAL_NAME}
|
||||
# URL
|
||||
# URL_MD5 ed03754d39b9da1775771819b8001d45
|
||||
# BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
# CMAKE_ARGS ${QUAZIP_CMAKE_ARGS}
|
||||
# LOG_DOWNLOAD 1
|
||||
# LOG_CONFIGURE 1
|
||||
# LOG_BUILD 1
|
||||
# )
|
||||
|
||||
# # Hide this external target (for ide users)
|
||||
# set_target_properties(${EXTERNAL_NAME} PROPERTIES
|
||||
# FOLDER "hidden/externals"
|
||||
# INSTALL_NAME_DIR ${INSTALL_DIR}/lib
|
||||
# BUILD_WITH_INSTALL_RPATH True)
|
||||
|
||||
# ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
# set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIR ${INSTALL_DIR}/include CACHE PATH "List of QuaZip include directories")
|
||||
# set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${${EXTERNAL_NAME_UPPER}_INCLUDE_DIR} CACHE PATH "List of QuaZip include directories")
|
||||
# set(${EXTERNAL_NAME_UPPER}_DLL_PATH ${INSTALL_DIR}/lib CACHE FILEPATH "Location of QuaZip DLL")
|
||||
|
||||
# if (APPLE)
|
||||
# set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libquazip5.1.0.0.dylib CACHE FILEPATH "Location of QuaZip release library")
|
||||
# set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libquazip5d.1.0.0.dylib CACHE FILEPATH "Location of QuaZip release library")
|
||||
# elseif (WIN32)
|
||||
# set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/quazip5.lib CACHE FILEPATH "Location of QuaZip release library")
|
||||
# set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/quazip5d.lib CACHE FILEPATH "Location of QuaZip release library")
|
||||
# elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libquazip5.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
# set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libquazip5d.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
# else ()
|
||||
# set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libquazip5.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
# set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libquazip5.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
# endif ()
|
||||
|
||||
# include(SelectLibraryConfigurations)
|
||||
# select_library_configurations(${EXTERNAL_NAME_UPPER})
|
||||
|
||||
# # Force selected libraries into the cache
|
||||
# set(${EXTERNAL_NAME_UPPER}_LIBRARY ${${EXTERNAL_NAME_UPPER}_LIBRARY} CACHE FILEPATH "Location of QuaZip libraries")
|
||||
# set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${${EXTERNAL_NAME_UPPER}_LIBRARIES} CACHE FILEPATH "Location of QuaZip libraries")
|
|
@ -1,3 +1,8 @@
|
|||
Source: sdl2
|
||||
Version: 2.0.8-1
|
||||
Version: 2.0.10-1
|
||||
Homepage: https://github.com/SDL-Mirror/SDL
|
||||
Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.
|
||||
|
||||
Feature: vulkan
|
||||
Description: Vulkan functionality for SDL
|
||||
Build-Depends: vulkan
|
||||
|
|
75
cmake/ports/sdl2/SDL-2.0.9-bug-4391-fix.patch
Normal file
75
cmake/ports/sdl2/SDL-2.0.9-bug-4391-fix.patch
Normal file
|
@ -0,0 +1,75 @@
|
|||
# HG changeset patch
|
||||
# User Sam Lantinga <slouken@libsdl.org>
|
||||
# Date 1542691020 28800
|
||||
# Node ID 9091b20040cf04cdc348d290ca22373b36364c39
|
||||
# Parent 144400e4630d885d2eb0761b7174433b4c0d90bb
|
||||
Fixed bug 4391 - hid_enumerate() sometimes causes game to freeze for a few seconds
|
||||
|
||||
Daniel Gibson
|
||||
|
||||
Even though my game (dhewm3) doesn't use SDL_INIT_JOYSTICK, SDL_PumpEvent() calls SDL_JoystickUpdate() which ends up calling hid_enumerate() every three seconds, and sometimes on my Win7 box hid_enumerate() takes about 5 seconds, which causes the whole game to freeze for that time.
|
||||
|
||||
diff -r 144400e4630d -r 9091b20040cf include/SDL_bits.h
|
||||
--- a/include/SDL_bits.h Sun Nov 18 19:28:20 2018 +0300
|
||||
+++ b/include/SDL_bits.h Mon Nov 19 21:17:00 2018 -0800
|
||||
@@ -101,6 +101,15 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
+SDL_FORCE_INLINE SDL_bool
|
||||
+SDL_HasExactlyOneBitSet32(Uint32 x)
|
||||
+{
|
||||
+ if (x && !(x & (x - 1))) {
|
||||
+ return SDL_TRUE;
|
||||
+ }
|
||||
+ return SDL_FALSE;
|
||||
+}
|
||||
+
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
diff -r 144400e4630d -r 9091b20040cf src/SDL.c
|
||||
--- a/src/SDL.c Sun Nov 18 19:28:20 2018 +0300
|
||||
+++ b/src/SDL.c Mon Nov 19 21:17:00 2018 -0800
|
||||
@@ -348,6 +348,12 @@
|
||||
int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount);
|
||||
Uint32 initialized = 0;
|
||||
|
||||
+ /* Fast path for checking one flag */
|
||||
+ if (SDL_HasExactlyOneBitSet32(flags)) {
|
||||
+ int subsystem_index = SDL_MostSignificantBitIndex32(flags);
|
||||
+ return SDL_SubsystemRefCount[subsystem_index] ? flags : 0;
|
||||
+ }
|
||||
+
|
||||
if (!flags) {
|
||||
flags = SDL_INIT_EVERYTHING;
|
||||
}
|
||||
diff -r 144400e4630d -r 9091b20040cf src/joystick/SDL_joystick.c
|
||||
--- a/src/joystick/SDL_joystick.c Sun Nov 18 19:28:20 2018 +0300
|
||||
+++ b/src/joystick/SDL_joystick.c Mon Nov 19 21:17:00 2018 -0800
|
||||
@@ -1016,6 +1016,10 @@
|
||||
int i;
|
||||
SDL_Joystick *joystick;
|
||||
|
||||
+ if (!SDL_WasInit(SDL_INIT_JOYSTICK)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
SDL_LockJoysticks();
|
||||
|
||||
if (SDL_updating_joystick) {
|
||||
diff -r 144400e4630d -r 9091b20040cf src/sensor/SDL_sensor.c
|
||||
--- a/src/sensor/SDL_sensor.c Sun Nov 18 19:28:20 2018 +0300
|
||||
+++ b/src/sensor/SDL_sensor.c Mon Nov 19 21:17:00 2018 -0800
|
||||
@@ -505,6 +505,10 @@
|
||||
int i;
|
||||
SDL_Sensor *sensor;
|
||||
|
||||
+ if (!SDL_WasInit(SDL_INIT_SENSOR)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
SDL_LockSensors();
|
||||
|
||||
if (SDL_updating_sensor) {
|
||||
|
11
cmake/ports/sdl2/disable-hidapi-for-uwp.patch
Normal file
11
cmake/ports/sdl2/disable-hidapi-for-uwp.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -172,7 +172,7 @@
|
||||
# requires root permissions to open devices, so that's not generally
|
||||
# useful, and we'll disable this by default on Unix. Windows and macOS
|
||||
# can use it without root access, though, so enable by default there.
|
||||
-if(WINDOWS OR APPLE OR ANDROID)
|
||||
+if((WINDOWS AND NOT WINDOWS_STORE) OR APPLE OR ANDROID)
|
||||
set(HIDAPI_SKIP_LIBUSB TRUE)
|
||||
else()
|
||||
set(HIDAPI_SKIP_LIBUSB FALSE)
|
|
@ -1,102 +1,75 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 73d9407..082fbc5 100644
|
||||
index 0128c7a..bd534e4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -3,7 +3,11 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
@@ -5,6 +5,18 @@ endif()
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
-project(SDL2 C)
|
||||
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
+ project(SDL2 C CXX)
|
||||
+else()
|
||||
+ project(SDL2 C)
|
||||
+endif()
|
||||
project(SDL2 C CXX)
|
||||
|
||||
+if(WINDOWS_STORE)
|
||||
+ enable_language(CXX)
|
||||
+ cmake_minimum_required(VERSION 3.11)
|
||||
+ add_definitions(-DSDL_BUILDING_WINRT=1 -ZW)
|
||||
+ link_libraries(
|
||||
+ -nodefaultlib:vccorlib$<$<CONFIG:Debug>:d>
|
||||
+ -nodefaultlib:msvcrt$<$<CONFIG:Debug>:d>
|
||||
+ vccorlib$<$<CONFIG:Debug>:d>.lib
|
||||
+ msvcrt$<$<CONFIG:Debug>:d>.lib
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
|
||||
# !!! FIXME: for the SDL2 shared library (so you get an
|
||||
@@ -358,7 +362,6 @@ file(GLOB SOURCE_FILES
|
||||
${SDL2_SOURCE_DIR}/src/timer/*.c
|
||||
${SDL2_SOURCE_DIR}/src/video/*.c)
|
||||
|
||||
-
|
||||
if(ASSERTIONS STREQUAL "auto")
|
||||
# Do nada - use optimization settings to determine the assertion level
|
||||
elseif(ASSERTIONS STREQUAL "disabled")
|
||||
@@ -1132,6 +1135,22 @@ elseif(WINDOWS)
|
||||
# !!! FIXME: install_name ("soname") of "@rpath/libSDL-whatever.dylib"
|
||||
@@ -1209,6 +1221,11 @@ elseif(WINDOWS)
|
||||
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||
|
||||
+ if(WINDOWS_STORE)
|
||||
+ cmake_minimum_required(VERSION 3.0)
|
||||
+ add_definitions(-DSDL_BUILDING_WINRT=1 -ZW)
|
||||
+ link_libraries(
|
||||
+ -nodefaultlib:vccorlib$<$<CONFIG:Debug>:d>
|
||||
+ -nodefaultlib:msvcrt$<$<CONFIG:Debug>:d>
|
||||
+ vccorlib$<$<CONFIG:Debug>:d>.lib
|
||||
+ msvcrt$<$<CONFIG:Debug>:d>.lib
|
||||
+ )
|
||||
+ endif()
|
||||
+
|
||||
+ if(WINDOWS_STORE)
|
||||
+ file(GLOB WINRT_SOURCE_FILES ${SDL2_SOURCE_DIR}/src/core/winrt/*.c ${SDL2_SOURCE_DIR}/src/core/winrt/*.cpp)
|
||||
+ set(SOURCE_FILES ${SOURCE_FILES} ${WINRT_SOURCE_FILES})
|
||||
+ list(APPEND SOURCE_FILES ${WINRT_SOURCE_FILES})
|
||||
+ endif()
|
||||
+
|
||||
if(MSVC)
|
||||
# Prevent codegen that would use the VC runtime libraries.
|
||||
set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-")
|
||||
@@ -1176,7 +1195,11 @@ elseif(WINDOWS)
|
||||
check_include_file(d3d11_1.h HAVE_D3D11_H)
|
||||
@@ -1254,6 +1271,9 @@ elseif(WINDOWS)
|
||||
check_include_file(ddraw.h HAVE_DDRAW_H)
|
||||
check_include_file(dsound.h HAVE_DSOUND_H)
|
||||
- check_include_file(dinput.h HAVE_DINPUT_H)
|
||||
+ if(WINDOWS_STORE)
|
||||
check_include_file(dinput.h HAVE_DINPUT_H)
|
||||
+ if(WINDOWS_STORE OR VCPKG_TARGET_TRIPLET MATCHES "arm-windows")
|
||||
+ set(HAVE_DINPUT_H 0)
|
||||
+ else()
|
||||
+ check_include_file(dinput.h HAVE_DINPUT_H)
|
||||
+ endif()
|
||||
check_include_file(xaudio2.h HAVE_XAUDIO2_H)
|
||||
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
|
||||
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
|
||||
@@ -1193,12 +1216,14 @@ elseif(WINDOWS)
|
||||
endif()
|
||||
check_include_file(dxgi.h HAVE_DXGI_H)
|
||||
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H)
|
||||
set(HAVE_DIRECTX TRUE)
|
||||
@@ -1272,18 +1292,20 @@ elseif(WINDOWS)
|
||||
check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H)
|
||||
|
||||
if(SDL_AUDIO)
|
||||
- set(SDL_AUDIO_DRIVER_WINMM 1)
|
||||
- file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
|
||||
- set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES})
|
||||
- set(HAVE_SDL_AUDIO TRUE)
|
||||
+ if(NOT WINDOWS_STORE)
|
||||
+ set(SDL_AUDIO_DRIVER_WINMM 1)
|
||||
+ file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
|
||||
+ set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES})
|
||||
+ set(HAVE_SDL_AUDIO TRUE)
|
||||
set(SDL_AUDIO_DRIVER_WINMM 1)
|
||||
file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES})
|
||||
+ endif()
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
|
||||
- if(HAVE_DSOUND_H)
|
||||
+ if(HAVE_DSOUND_H AND NOT WINDOWS_STORE)
|
||||
set(SDL_AUDIO_DRIVER_DSOUND 1)
|
||||
file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
|
||||
@@ -1208,9 +1233,10 @@ elseif(WINDOWS)
|
||||
set(SDL_AUDIO_DRIVER_XAUDIO2 1)
|
||||
file(GLOB XAUDIO2_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/xaudio2/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${XAUDIO2_AUDIO_SOURCES})
|
||||
+ set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
|
||||
- if(HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
|
||||
+ if(HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H AND NOT WINDOWS_STORE)
|
||||
- if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
|
||||
+ if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H AND NOT WINDOWS_STORE)
|
||||
set(SDL_AUDIO_DRIVER_WASAPI 1)
|
||||
file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES})
|
||||
@@ -1222,11 +1248,20 @@ elseif(WINDOWS)
|
||||
@@ -1295,11 +1317,20 @@ elseif(WINDOWS)
|
||||
if(NOT SDL_LOADSO)
|
||||
message_error("SDL_VIDEO requires SDL_LOADSO, which is not enabled")
|
||||
endif()
|
||||
- set(SDL_VIDEO_DRIVER_WINDOWS 1)
|
||||
- file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c)
|
||||
+ if(WINDOWS_STORE)
|
||||
+ set(SDL_VIDEO_DRIVER_WINRT 1)
|
||||
+ file(GLOB WIN_VIDEO_SOURCES
|
||||
|
@ -105,8 +78,8 @@ index 73d9407..082fbc5 100644
|
|||
+ ${SDL2_SOURCE_DIR}/src/render/direct3d11/*.cpp
|
||||
+ )
|
||||
+ else()
|
||||
+ set(SDL_VIDEO_DRIVER_WINDOWS 1)
|
||||
+ file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c)
|
||||
set(SDL_VIDEO_DRIVER_WINDOWS 1)
|
||||
file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c)
|
||||
+ endif()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES})
|
||||
|
||||
|
@ -115,43 +88,39 @@ index 73d9407..082fbc5 100644
|
|||
set(SDL_VIDEO_RENDER_D3D 1)
|
||||
set(HAVE_RENDER_D3D TRUE)
|
||||
endif()
|
||||
@@ -1249,20 +1284,31 @@ elseif(WINDOWS)
|
||||
@@ -1322,20 +1353,31 @@ elseif(WINDOWS)
|
||||
endif()
|
||||
|
||||
if(SDL_POWER)
|
||||
- set(SDL_POWER_WINDOWS 1)
|
||||
- set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c)
|
||||
+ if(WINDOWS_STORE)
|
||||
+ set(SDL_POWER_WINRT 1)
|
||||
+ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/winrt/SDL_syspower.cpp)
|
||||
+ else()
|
||||
+ set(SDL_POWER_WINDOWS 1)
|
||||
+ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c)
|
||||
set(SDL_POWER_WINDOWS 1)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c)
|
||||
+ endif()
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL_FILESYSTEM)
|
||||
set(SDL_FILESYSTEM_WINDOWS 1)
|
||||
- file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c)
|
||||
+ if(WINDOWS_STORE)
|
||||
+ file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/winrt/*.cpp)
|
||||
+ else()
|
||||
+ file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c)
|
||||
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c)
|
||||
+ endif()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
|
||||
set(HAVE_SDL_FILESYSTEM TRUE)
|
||||
endif()
|
||||
|
||||
# Libraries for Win32 native and MinGW
|
||||
- list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid)
|
||||
+ if(NOT WINDOWS_STORE)
|
||||
+ list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid)
|
||||
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
|
||||
+ endif()
|
||||
|
||||
# TODO: in configure.in the check for timers is set on
|
||||
# TODO: in configure.ac the check for timers is set on
|
||||
# cygwin | mingw32* - does this include mingw32CE?
|
||||
@@ -1284,7 +1330,7 @@ elseif(WINDOWS)
|
||||
@@ -1357,7 +1399,7 @@ elseif(WINDOWS)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||
|
||||
if(SDL_VIDEO)
|
||||
|
@ -160,26 +129,26 @@ index 73d9407..082fbc5 100644
|
|||
set(SDL_VIDEO_OPENGL 1)
|
||||
set(SDL_VIDEO_OPENGL_WGL 1)
|
||||
set(SDL_VIDEO_RENDER_OGL 1)
|
||||
@@ -1688,9 +1734,11 @@ endif()
|
||||
@@ -1788,12 +1830,14 @@ endif()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
|
||||
|
||||
# Always build SDLmain
|
||||
-add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
|
||||
-target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
-set(_INSTALL_LIBS "SDL2main")
|
||||
+if(NOT WINDOWS_STORE)
|
||||
+ add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
|
||||
+ target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
+ set(_INSTALL_LIBS "SDL2main")
|
||||
add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
|
||||
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
|
||||
set(_INSTALL_LIBS "SDL2main")
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
if(SDL_SHARED)
|
||||
add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
|
||||
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
|
||||
index 9b20398..7ae6e35 100644
|
||||
index 48dd2d4..0c4fa28 100644
|
||||
--- a/include/SDL_config.h.cmake
|
||||
+++ b/include/SDL_config.h.cmake
|
||||
@@ -298,6 +298,7 @@
|
||||
@@ -326,6 +326,7 @@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
|
||||
|
@ -187,7 +156,7 @@ index 9b20398..7ae6e35 100644
|
|||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@
|
||||
@@ -365,6 +366,7 @@
|
||||
@@ -391,6 +392,7 @@
|
||||
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
|
||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
||||
|
@ -195,7 +164,7 @@ index 9b20398..7ae6e35 100644
|
|||
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
|
||||
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
|
||||
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
|
||||
@@ -387,7 +389,7 @@
|
||||
@@ -413,7 +415,7 @@
|
||||
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
|
||||
|
||||
/* Platform specific definitions */
|
||||
|
|
14
cmake/ports/sdl2/fix-arm64-headers.patch
Normal file
14
cmake/ports/sdl2/fix-arm64-headers.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- a/include/SDL_cpuinfo.h Tue Jul 23 21:41:00 2019 -0400
|
||||
+++ b/include/SDL_cpuinfo.h Tue Aug 13 20:26:27 2019 -0700
|
||||
@@ -73,8 +73,8 @@
|
||||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# endif
|
||||
# if defined (_M_ARM64)
|
||||
-# include <armintr.h>
|
||||
-# include <arm_neon.h>
|
||||
+# include <arm64intr.h>
|
||||
+# include <arm64_neon.h>
|
||||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# endif
|
||||
# endif
|
||||
|
15
cmake/ports/sdl2/fix-x86-windows.patch
Normal file
15
cmake/ports/sdl2/fix-x86-windows.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
|
||||
index ff23c5e..fc90bba 100644
|
||||
--- a/src/events/SDL_mouse.c
|
||||
+++ b/src/events/SDL_mouse.c
|
||||
@@ -20,6 +20,10 @@
|
||||
*/
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
+#ifdef __WIN32__
|
||||
+#include "../core/windows/SDL_windows.h"
|
||||
+#endif
|
||||
+
|
||||
/* General mouse handling code for SDL */
|
||||
|
||||
#include "SDL_assert.h"
|
|
@ -3,29 +3,32 @@ include(vcpkg_common_functions)
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO SDL-Mirror/SDL
|
||||
REF release-2.0.8
|
||||
SHA512 5922dbeb14bb22991160251664b417d3f846867c18b5ecc1bd19c328ffd69b16252b7d45b9a317bafd1207fdb66d93a022dfb239e02447db9babd941956b6b37
|
||||
REF release-2.0.10
|
||||
SHA512 c5fe59eed7ba9c6a82cceaf513623480793727fceec84b01d819e7cbefc8229a84be93067d7539f12d5811c49d3d54fd407272786aef3e419f439d0105c34b21
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/export-symbols-only-in-shared-build.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/enable-winrt-cmake.patch
|
||||
export-symbols-only-in-shared-build.patch
|
||||
enable-winrt-cmake.patch
|
||||
fix-arm64-headers.patch
|
||||
disable-hidapi-for-uwp.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SDL_SHARED)
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" FORCE_STATIC_VCRT)
|
||||
|
||||
set(VULKAN_VIDEO OFF)
|
||||
if("vulkan" IN_LIST FEATURES)
|
||||
set(VULKAN_VIDEO ON)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DSDL_STATIC=${SDL_STATIC}
|
||||
-DSDL_SHARED=${SDL_SHARED}
|
||||
-DVIDEO_VULKAN=OFF
|
||||
-DVIDEO_VULKAN=${VULKAN_VIDEO}
|
||||
-DFORCE_STATIC_VCRT=${FORCE_STATIC_VCRT}
|
||||
-DLIBC=ON
|
||||
)
|
||||
|
@ -33,11 +36,11 @@ vcpkg_configure_cmake(
|
|||
vcpkg_install_cmake()
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
||||
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/SDL2")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/SDL2")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SDL2)
|
||||
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/SDL2.framework/Resources")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "SDL2.framework/Resources")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH SDL2.framework/Resources)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
|
@ -75,5 +78,6 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
vcpkg_copy_pdbs()
|
||||
|
|
8
cmake/ports/sdl2/vcpkg-cmake-wrapper.cmake
Normal file
8
cmake/ports/sdl2/vcpkg-cmake-wrapper.cmake
Normal file
|
@ -0,0 +1,8 @@
|
|||
_find_package(${ARGS})
|
||||
if(TARGET SDL2::SDL2 AND NOT TARGET SDL2::SDL2-static)
|
||||
add_library( SDL2::SDL2-static INTERFACE IMPORTED)
|
||||
set_target_properties(SDL2::SDL2-static PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2")
|
||||
elseif(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2)
|
||||
add_library( SDL2::SDL2 INTERFACE IMPORTED)
|
||||
set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static")
|
||||
endif()
|
|
@ -4,7 +4,14 @@ file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*)
|
|||
file(COPY ${SOURCES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
|
||||
include(${CMAKE_CURRENT_BINARY_DIR}/src/cmake/TBBBuild.cmake REQUIRED)
|
||||
tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS extra_inc=big_iron.inc)
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
set(TBB_STATIC_INCLUDE extra_inc=big_iron.inc)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(FORWARD_SDK_ROOT "SDKROOT=${CMAKE_OSX_SYSROOT}")
|
||||
endif()
|
||||
|
||||
tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS ${TBB_STATIC_INCLUDE} ${FORWARD_SDK_ROOT})
|
||||
|
||||
set(SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
Source: tbb
|
||||
Version: 2018_U5-4
|
||||
Version: 2019_U8-1
|
||||
Homepage: https://github.com/01org/tbb
|
||||
Description: Intel's Threading Building Blocks.
|
||||
|
|
13
cmake/ports/tbb/fix-static-build.patch
Normal file
13
cmake/ports/tbb/fix-static-build.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/tbb/cilk-tbb-interop.h b/src/tbb/cilk-tbb-interop.h
|
||||
index 295734b..f35531e 100644
|
||||
--- a/src/tbb/cilk-tbb-interop.h
|
||||
+++ b/src/tbb/cilk-tbb-interop.h
|
||||
@@ -29,6 +29,8 @@
|
||||
#else
|
||||
#ifdef IN_CILK_RUNTIME
|
||||
#define CILK_EXPORT __declspec(dllexport)
|
||||
+#elif defined(IN_CILK_STATIC)
|
||||
+#define CILK_EXPORT /* nothing */
|
||||
#else
|
||||
#define CILK_EXPORT __declspec(dllimport)
|
||||
#endif // IN_CILK_RUNTIME
|
|
@ -1,20 +1,17 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO 01org/tbb
|
||||
REF 2018_U5
|
||||
SHA512 3e8d20276ccb1b50099f96b6cf968e3d0ada53caea1fa836ecb8652f1dca236fbbbf2c783e64ea2f761f7f21725064d19b72d176e35e4dc29706b8a30965153b
|
||||
HEAD_REF tbb_2018
|
||||
REPO intel/tbb
|
||||
REF 4bdba61bafc6ba2d636f31564f1de5702d365cf7
|
||||
SHA512 0b00c9deefdac5dc1f4fbae314e91eb3513b54b47ff6dec08ed2460486fc7d211ab36d6130e5787bfd50523cb613c65f03f9217d967292ca9056e2d3f5010bf8
|
||||
HEAD_REF tbb_2019
|
||||
PATCHES fix-static-build.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
if (NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
|
@ -22,7 +19,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStor
|
|||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Settings for TBBConfigForSource.cmake.in
|
||||
# Settings for TBBConfigInternal.cmake.in
|
||||
set(TBB_LIB_EXT a)
|
||||
set(TBB_LIB_PREFIX lib)
|
||||
else()
|
||||
|
@ -33,6 +30,32 @@ else()
|
|||
set(RELEASE_CONFIGURATION Release)
|
||||
set(DEBUG_CONFIGURATION Debug)
|
||||
endif()
|
||||
|
||||
macro(CONFIGURE_PROJ_FILE arg)
|
||||
set(CONFIGURE_FILE_NAME ${arg})
|
||||
set(CONFIGURE_BAK_FILE_NAME ${arg}.bak)
|
||||
if (NOT EXISTS ${CONFIGURE_BAK_FILE_NAME})
|
||||
configure_file(${CONFIGURE_FILE_NAME} ${CONFIGURE_BAK_FILE_NAME} COPYONLY)
|
||||
endif()
|
||||
configure_file(${CONFIGURE_BAK_FILE_NAME} ${CONFIGURE_FILE_NAME} COPYONLY)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(READ ${CONFIGURE_FILE_NAME} SLN_CONFIGURE)
|
||||
string(REPLACE "<ConfigurationType>DynamicLibrary<\/ConfigurationType>"
|
||||
"<ConfigurationType>StaticLibrary<\/ConfigurationType>" SLN_CONFIGURE "${SLN_CONFIGURE}")
|
||||
string(REPLACE "\/D_CRT_SECURE_NO_DEPRECATE"
|
||||
"\/D_CRT_SECURE_NO_DEPRECATE \/DIN_CILK_STATIC" SLN_CONFIGURE "${SLN_CONFIGURE}")
|
||||
file(WRITE ${CONFIGURE_FILE_NAME} "${SLN_CONFIGURE}")
|
||||
else()
|
||||
file(READ ${CONFIGURE_FILE_NAME} SLN_CONFIGURE)
|
||||
string(REPLACE "\/D_CRT_SECURE_NO_DEPRECATE"
|
||||
"\/D_CRT_SECURE_NO_DEPRECATE \/DIN_CILK_RUNTIME" SLN_CONFIGURE "${SLN_CONFIGURE}")
|
||||
file(WRITE ${CONFIGURE_FILE_NAME} "${SLN_CONFIGURE}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbb.vcxproj)
|
||||
CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbbmalloc.vcxproj)
|
||||
CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbbmalloc_proxy.vcxproj)
|
||||
|
||||
vcpkg_install_msbuild(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
|
@ -40,7 +63,7 @@ else()
|
|||
RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION}
|
||||
DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION}
|
||||
)
|
||||
# Settings for TBBConfigForSource.cmake.in
|
||||
# Settings for TBBConfigInternal.cmake.in
|
||||
set(TBB_LIB_EXT lib)
|
||||
set(TBB_LIB_PREFIX)
|
||||
endif()
|
||||
|
@ -50,12 +73,13 @@ file(COPY
|
|||
${SOURCE_PATH}/include/serial
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
# Settings for TBBConfigForSource.cmake.in
|
||||
# Settings for TBBConfigInternal.cmake.in
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc)
|
||||
else()
|
||||
set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc tbbmalloc_proxy)
|
||||
endif()
|
||||
|
||||
file(READ "${SOURCE_PATH}/include/tbb/tbb_stddef.h" _tbb_stddef)
|
||||
string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" _tbb_ver_major "${_tbb_stddef}")
|
||||
string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_minor "${_tbb_stddef}")
|
||||
|
@ -65,7 +89,7 @@ set(TBB_RELEASE_DIR "\${_tbb_root}/lib")
|
|||
set(TBB_DEBUG_DIR "\${_tbb_root}/debug/lib")
|
||||
|
||||
configure_file(
|
||||
${SOURCE_PATH}/cmake/templates/TBBConfigForSource.cmake.in
|
||||
${SOURCE_PATH}/cmake/templates/TBBConfigInternal.cmake.in
|
||||
${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
@ -76,6 +100,18 @@ string(REPLACE
|
|||
_contents
|
||||
"${_contents}"
|
||||
)
|
||||
string(REPLACE
|
||||
"set(_tbb_release_lib \"/${TBB_LIB_PREFIX}"
|
||||
"set(_tbb_release_lib \"\${_tbb_root}/lib/${TBB_LIB_PREFIX}"
|
||||
_contents
|
||||
"${_contents}"
|
||||
)
|
||||
string(REPLACE
|
||||
"set(_tbb_debug_lib \"/${TBB_LIB_PREFIX}"
|
||||
"set(_tbb_debug_lib \"\${_tbb_root}/debug/lib/${TBB_LIB_PREFIX}"
|
||||
_contents
|
||||
"${_contents}"
|
||||
)
|
||||
string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}")
|
||||
|
||||
|
@ -84,3 +120,4 @@ file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${C
|
|||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb/copyright)
|
||||
|
||||
vcpkg_test_cmake(PACKAGE_NAME TBB)
|
||||
#
|
||||
|
|
3
cmake/ports/vhacd/CONTROL
Normal file
3
cmake/ports/vhacd/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: vhacd
|
||||
Version: 20191029
|
||||
Description: vhacd
|
29
cmake/ports/vhacd/copyright
Normal file
29
cmake/ports/vhacd/copyright
Normal file
|
@ -0,0 +1,29 @@
|
|||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2011, Khaled Mamou (kmamou at gmail dot com)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
cmake/ports/vhacd/portfile.cmake
Normal file
31
cmake/ports/vhacd/portfile.cmake
Normal file
|
@ -0,0 +1,31 @@
|
|||
include(vcpkg_common_functions)
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
# else Linux desktop
|
||||
vcpkg_download_distfile(
|
||||
SOURCE_ARCHIVE
|
||||
URLS https://public.highfidelity.com/dependencies/v-hacd-master.zip
|
||||
SHA512 5d9bd4872ead9eb3574e4806d6c4f490353a04036fd5f571e1e44f47cb66b709e311abcd53af30bae0015a690152170aeed93209a626c28ebcfd6591f3bb036f
|
||||
FILENAME vhacd.zip
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${SOURCE_ARCHIVE}
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/vhacd)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
if (WIN32)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Release/VHACD_LIB.lib ${CURRENT_PACKAGES_DIR}/lib/VHACD.lib)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/Release)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Debug/VHACD_LIB.lib ${CURRENT_PACKAGES_DIR}/debug/lib/VHACD.lib)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/Debug)
|
||||
endif()
|
78
hifi_qt.py
Normal file
78
hifi_qt.py
Normal file
|
@ -0,0 +1,78 @@
|
|||
import hifi_utils
|
||||
import hifi_android
|
||||
import hashlib
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import shutil
|
||||
import tempfile
|
||||
import json
|
||||
import xml.etree.ElementTree as ET
|
||||
import functools
|
||||
|
||||
print = functools.partial(print, flush=True)
|
||||
|
||||
# Encapsulates the vcpkg system
|
||||
class QtDownloader:
|
||||
CMAKE_TEMPLATE = """
|
||||
# this file auto-generated by hifi_qt.py
|
||||
get_filename_component(QT_CMAKE_PREFIX_PATH "{}" ABSOLUTE CACHE)
|
||||
get_filename_component(QT_CMAKE_PREFIX_PATH_UNCACHED "{}" ABSOLUTE)
|
||||
|
||||
# If the cached cmake toolchain path is different from the computed one, exit
|
||||
if(NOT (QT_CMAKE_PREFIX_PATH_UNCACHED STREQUAL QT_CMAKE_PREFIX_PATH))
|
||||
message(FATAL_ERROR "QT_CMAKE_PREFIX_PATH has changed, please wipe the build directory and rerun cmake")
|
||||
endif()
|
||||
"""
|
||||
def __init__(self, args):
|
||||
self.args = args
|
||||
self.configFilePath = os.path.join(args.build_root, 'qt.cmake')
|
||||
self.version = '5.12.3'
|
||||
|
||||
defaultBasePath = os.path.expanduser('~/hifi/qt')
|
||||
self.basePath = os.getenv('HIFI_QT_BASE', defaultBasePath)
|
||||
if (not os.path.isdir(self.basePath)):
|
||||
os.makedirs(self.basePath)
|
||||
self.path = os.path.join(self.basePath, self.version)
|
||||
self.fullPath = os.path.join(self.path, 'qt5-install')
|
||||
self.cmakePath = os.path.join(self.fullPath, 'lib/cmake')
|
||||
|
||||
print("Using qt path {}".format(self.path))
|
||||
lockDir, lockName = os.path.split(self.path)
|
||||
lockName += '.lock'
|
||||
if not os.path.isdir(lockDir):
|
||||
os.makedirs(lockDir)
|
||||
|
||||
self.lockFile = os.path.join(lockDir, lockName)
|
||||
|
||||
# OS dependent information
|
||||
system = platform.system()
|
||||
|
||||
if 'Windows' == system:
|
||||
self.qtUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows3.tar.gz?versionId=5ADqP0M0j5ZfimUHrx4zJld6vYceHEsI'
|
||||
elif 'Darwin' == system:
|
||||
self.qtUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos.tar.gz?versionId=bLAgnoJ8IMKpqv8NFDcAu8hsyQy3Rwwz'
|
||||
elif 'Linux' == system:
|
||||
if platform.linux_distribution()[1][:3] == '16.':
|
||||
self.qtUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz'
|
||||
elif platform.linux_distribution()[1][:3] == '18.':
|
||||
self.qtUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz'
|
||||
else:
|
||||
raise Exception('UNKNOWN LINUX VERSION!!!')
|
||||
else:
|
||||
raise Exception('UNKNOWN OPERATING SYSTEM!!!')
|
||||
|
||||
def writeConfig(self):
|
||||
print("Writing cmake config to {}".format(self.configFilePath))
|
||||
# Write out the configuration for use by CMake
|
||||
cmakeConfig = QtDownloader.CMAKE_TEMPLATE.format(self.cmakePath, self.cmakePath).replace('\\', '/')
|
||||
with open(self.configFilePath, 'w') as f:
|
||||
f.write(cmakeConfig)
|
||||
|
||||
def installQt(self):
|
||||
if not os.path.isdir(self.fullPath):
|
||||
print ('Downloading Qt from AWS')
|
||||
print('Extracting ' + self.qtUrl + ' to ' + self.path)
|
||||
hifi_utils.downloadAndExtract(self.qtUrl, self.path)
|
||||
else:
|
||||
print ('Qt has already been downloaded')
|
|
@ -113,7 +113,7 @@ def downloadFile(url, hash=None, hasher=hashlib.sha512(), retries=3):
|
|||
|
||||
def downloadAndExtract(url, destPath, hash=None, hasher=hashlib.sha512(), isZip=False):
|
||||
tempFileName = downloadFile(url, hash, hasher)
|
||||
if isZip:
|
||||
if isZip or ".zip" in url:
|
||||
with zipfile.ZipFile(tempFileName) as zip:
|
||||
zip.extractall(destPath)
|
||||
else:
|
||||
|
|
121
hifi_vcpkg.py
121
hifi_vcpkg.py
|
@ -20,7 +20,6 @@ get_filename_component(CMAKE_TOOLCHAIN_FILE "{}" ABSOLUTE CACHE)
|
|||
get_filename_component(CMAKE_TOOLCHAIN_FILE_UNCACHED "{}" ABSOLUTE)
|
||||
set(VCPKG_INSTALL_ROOT "{}")
|
||||
set(VCPKG_TOOLS_DIR "{}")
|
||||
set(VCPKG_QT_CMAKE_PREFIX_PATH "{}")
|
||||
"""
|
||||
|
||||
CMAKE_TEMPLATE_NON_ANDROID = """
|
||||
|
@ -36,20 +35,24 @@ endif()
|
|||
self.sourcePortsPath = args.ports_path
|
||||
self.id = hifi_utils.hashFolder(self.sourcePortsPath)[:8]
|
||||
self.configFilePath = os.path.join(args.build_root, 'vcpkg.cmake')
|
||||
# The noClean flag indicates we're doing weird dependency maintenance stuff
|
||||
# i.e. we've got an explicit checkout of vcpkg and we don't want the script to
|
||||
# do stuff it might otherwise do. It typically indicates that we're using our
|
||||
# own git checkout of vcpkg and manually managing it
|
||||
self.noClean = False
|
||||
|
||||
# OS dependent information
|
||||
system = platform.system()
|
||||
|
||||
if self.args.vcpkg_root is not None:
|
||||
if 'HIFI_VCPKG_PATH' in os.environ:
|
||||
self.path = os.environ['HIFI_VCPKG_PATH']
|
||||
self.noClean = True
|
||||
elif self.args.vcpkg_root is not None:
|
||||
self.path = args.vcpkg_root
|
||||
self.noClean = True
|
||||
else:
|
||||
if 'Darwin' == system:
|
||||
defaultBasePath = os.path.expanduser('~/hifi/vcpkg')
|
||||
else:
|
||||
defaultBasePath = os.path.join(tempfile.gettempdir(), 'hifi', 'vcpkg')
|
||||
defaultBasePath = os.path.expanduser('~/hifi/vcpkg')
|
||||
self.basePath = os.getenv('HIFI_VCPKG_BASE', defaultBasePath)
|
||||
if self.basePath == defaultBasePath:
|
||||
print("Warning: Environment variable HIFI_VCPKG_BASE not set, using {}".format(defaultBasePath))
|
||||
if self.args.android:
|
||||
self.basePath = os.path.join(self.basePath, 'android')
|
||||
if (not os.path.isdir(self.basePath)):
|
||||
|
@ -64,27 +67,35 @@ endif()
|
|||
|
||||
self.lockFile = os.path.join(lockDir, lockName)
|
||||
self.tagFile = os.path.join(self.path, '.id')
|
||||
self.prebuildTagFile = os.path.join(self.path, '.prebuild')
|
||||
# A format version attached to the tag file... increment when you want to force the build systems to rebuild
|
||||
# without the contents of the ports changing
|
||||
self.version = 1
|
||||
self.tagContents = "{}_{}".format(self.id, self.version)
|
||||
self.bootstrapEnv = os.environ.copy()
|
||||
self.buildEnv = os.environ.copy()
|
||||
self.prebuiltArchive = None
|
||||
|
||||
if 'Windows' == system:
|
||||
self.exe = os.path.join(self.path, 'vcpkg.exe')
|
||||
self.bootstrapCmd = 'bootstrap-vcpkg.bat'
|
||||
self.vcpkgUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/vcpkg-win32.tar.gz?versionId=YZYkDejDRk7L_hrK_WVFthWvisAhbDzZ'
|
||||
self.vcpkgHash = '3e0ff829a74956491d57666109b3e6b5ce4ed0735c24093884317102387b2cb1b2cd1ff38af9ed9173501f6e32ffa05cc6fe6d470b77a71ca1ffc3e0aa46ab9e'
|
||||
self.bootstrapCmds = [ os.path.join(self.path, 'bootstrap-vcpkg.bat') ]
|
||||
self.vcpkgUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/builds/vcpkg-win32-client.zip?versionId=tSFzbw01VkkVFeRQ6YuAY4dro2HxJR9U'
|
||||
self.vcpkgHash = 'a650db47a63ccdc9904b68ddd16af74772e7e78170b513ea8de5a3b47d032751a3b73dcc7526d88bcb500753ea3dd9880639ca842bb176e2bddb1710f9a58cd3'
|
||||
self.hostTriplet = 'x64-windows'
|
||||
if ('CI_BUILD' in os.environ) and os.environ["CI_BUILD"] == "Github" and (not self.noClean):
|
||||
self.prebuiltArchive = "https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/builds/vcpkg-win32.zip?versionId=LtGKnBydCxteY3Ub1W_UNBN5sH.Ccp5g"
|
||||
elif 'Darwin' == system:
|
||||
self.exe = os.path.join(self.path, 'vcpkg')
|
||||
self.bootstrapCmd = 'bootstrap-vcpkg.sh'
|
||||
self.vcpkgUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/vcpkg-osx.tar.gz?versionId=_fhqSxjfrtDJBvEsQ8L_ODcdUjlpX9cc'
|
||||
self.bootstrapCmds = [ os.path.join(self.path, 'bootstrap-vcpkg.sh'), '--allowAppleClang' ]
|
||||
self.vcpkgUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/builds/vcpkg-osx-client.tgz?versionId=j0b4azo_zTlH_Q9DElEWOz1UMYZ2nqQw'
|
||||
self.vcpkgHash = '519d666d02ef22b87c793f016ca412e70f92e1d55953c8f9bd4ee40f6d9f78c1df01a6ee293907718f3bbf24075cc35492fb216326dfc50712a95858e9cbcb4d'
|
||||
self.hostTriplet = 'x64-osx'
|
||||
if ('CI_BUILD' in os.environ) and os.environ["CI_BUILD"] == "Github" and (not self.noClean):
|
||||
self.prebuiltArchive = "https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/builds/vcpkg-osx.tgz?versionId=6JrIMTdvpBF3MAsjA92BMkO79Psjzs6Z"
|
||||
else:
|
||||
self.exe = os.path.join(self.path, 'vcpkg')
|
||||
self.bootstrapCmd = 'bootstrap-vcpkg.sh'
|
||||
self.vcpkgUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/vcpkg-linux.tar.gz?versionId=97Nazh24etEVKWz33XwgLY0bvxEfZgMU'
|
||||
self.bootstrapCmds = [ os.path.join(self.path, 'bootstrap-vcpkg.sh') ]
|
||||
self.vcpkgUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/builds/vcpkg-linux-client.tgz?versionId=y7mct0gFicEXz5hJy3KROBugcLR56YWf'
|
||||
self.vcpkgHash = '6a1ce47ef6621e699a4627e8821ad32528c82fce62a6939d35b205da2d299aaa405b5f392df4a9e5343dd6a296516e341105fbb2dd8b48864781d129d7fba10d'
|
||||
self.hostTriplet = 'x64-linux'
|
||||
|
||||
|
@ -96,7 +107,7 @@ endif()
|
|||
|
||||
def upToDate(self):
|
||||
# Prevent doing a clean if we've explcitly set a directory for vcpkg
|
||||
if self.args.vcpkg_root is not None:
|
||||
if self.noClean:
|
||||
return True
|
||||
|
||||
if self.args.force_build:
|
||||
|
@ -126,8 +137,10 @@ endif()
|
|||
if self.upToDate():
|
||||
return
|
||||
|
||||
self.clean()
|
||||
if self.prebuiltArchive is not None:
|
||||
return
|
||||
|
||||
self.clean()
|
||||
downloadVcpkg = False
|
||||
if self.args.force_bootstrap:
|
||||
print("Forcing bootstrap")
|
||||
|
@ -146,12 +159,12 @@ endif()
|
|||
if downloadVcpkg:
|
||||
if "HIFI_VCPKG_BOOTSTRAP" in os.environ:
|
||||
print("Cloning vcpkg from github to {}".format(self.path))
|
||||
hifi_utils.executeSubprocess(['git', 'clone', 'git@github.com:microsoft/vcpkg.git', self.path])
|
||||
hifi_utils.executeSubprocess(['git', 'clone', 'https://github.com/microsoft/vcpkg.git', self.path])
|
||||
print("Bootstrapping vcpkg")
|
||||
hifi_utils.executeSubprocess([self.bootstrapCmd], folder=self.path)
|
||||
hifi_utils.executeSubprocess(self.bootstrapCmds, folder=self.path, env=self.bootstrapEnv)
|
||||
else:
|
||||
print("Fetching vcpkg from {} to {}".format(self.vcpkgUrl, self.path))
|
||||
hifi_utils.downloadAndExtract(self.vcpkgUrl, self.path, self.vcpkgHash)
|
||||
hifi_utils.downloadAndExtract(self.vcpkgUrl, self.path)
|
||||
|
||||
print("Replacing port files")
|
||||
portsPath = os.path.join(self.path, 'ports')
|
||||
|
@ -166,9 +179,19 @@ endif()
|
|||
actualCommands.extend(commands)
|
||||
print("Running command")
|
||||
print(actualCommands)
|
||||
hifi_utils.executeSubprocess(actualCommands, folder=self.path)
|
||||
hifi_utils.executeSubprocess(actualCommands, folder=self.path, env=self.buildEnv)
|
||||
|
||||
def setupDependencies(self, qt=None):
|
||||
if self.prebuiltArchive:
|
||||
if not os.path.isfile(self.prebuildTagFile):
|
||||
print('Extracting ' + self.prebuiltArchive + ' to ' + self.path)
|
||||
hifi_utils.downloadAndExtract(self.prebuiltArchive, self.path)
|
||||
self.writePrebuildTag()
|
||||
return
|
||||
|
||||
if qt is not None:
|
||||
self.buildEnv['QT_CMAKE_PREFIX_PATH'] = qt
|
||||
|
||||
def setupDependencies(self):
|
||||
# Special case for android, grab a bunch of binaries
|
||||
# FIXME remove special casing for android builds eventually
|
||||
if self.args.android:
|
||||
|
@ -182,13 +205,10 @@ endif()
|
|||
if not self.args.android:
|
||||
print("Installing build dependencies")
|
||||
self.run(['install', '--triplet', self.triplet, 'hifi-client-deps'])
|
||||
|
||||
# If not android, install our Qt build
|
||||
if not self.args.android:
|
||||
print("Installing Qt")
|
||||
self.installQt()
|
||||
|
||||
def cleanBuilds(self):
|
||||
if self.noClean:
|
||||
return
|
||||
# Remove temporary build artifacts
|
||||
builddir = os.path.join(self.path, 'buildtrees')
|
||||
if os.path.isdir(builddir):
|
||||
|
@ -218,16 +238,18 @@ endif()
|
|||
hifi_utils.downloadAndExtract(url, dest, isZip=zipFile, hash=package['checksum'], hasher=hashlib.md5())
|
||||
|
||||
def writeTag(self):
|
||||
if self.noClean:
|
||||
return
|
||||
print("Writing tag {} to {}".format(self.tagContents, self.tagFile))
|
||||
if not os.path.isdir(self.path):
|
||||
os.makedirs(self.path)
|
||||
with open(self.tagFile, 'w') as f:
|
||||
f.write(self.tagContents)
|
||||
|
||||
def getQt5InstallPath(self):
|
||||
qt5InstallPath = os.path.join(self.path, 'installed', 'qt5-install')
|
||||
if self.args.android:
|
||||
precompiled = os.path.realpath(self.androidPackagePath)
|
||||
qt5InstallPath = os.path.realpath(os.path.join(precompiled, 'qt'))
|
||||
return qt5InstallPath
|
||||
def writePrebuildTag(self):
|
||||
print("Writing tag {} to {}".format(self.tagContents, self.tagFile))
|
||||
with open(self.prebuildTagFile, 'w') as f:
|
||||
f.write(self.tagContents)
|
||||
|
||||
def writeConfig(self):
|
||||
print("Writing cmake config to {}".format(self.configFilePath))
|
||||
|
@ -242,9 +264,7 @@ endif()
|
|||
cmakeTemplate += 'set(HIFI_ANDROID_PRECOMPILED "{}")\n'.format(precompiled)
|
||||
else:
|
||||
cmakeTemplate += VcpkgRepo.CMAKE_TEMPLATE_NON_ANDROID
|
||||
|
||||
qtCmakePrefixPath = os.path.join(self.getQt5InstallPath(), "lib/cmake")
|
||||
cmakeConfig = cmakeTemplate.format(cmakeScript, cmakeScript, installPath, toolsPath, qtCmakePrefixPath).replace('\\', '/')
|
||||
cmakeConfig = cmakeTemplate.format(cmakeScript, cmakeScript, installPath, toolsPath).replace('\\', '/')
|
||||
with open(self.configFilePath, 'w') as f:
|
||||
f.write(cmakeConfig)
|
||||
|
||||
|
@ -253,32 +273,3 @@ endif()
|
|||
# update the tag file on every run, we can scan the base dir for sub directories containing
|
||||
# a tag file that is older than N days, and if found, delete the directory, recovering space
|
||||
print("Not implemented")
|
||||
|
||||
|
||||
def installQt(self):
|
||||
qt5InstallPath = self.getQt5InstallPath()
|
||||
if not os.path.isdir(qt5InstallPath):
|
||||
print ('Downloading Qt from AWS')
|
||||
dest, tail = os.path.split(qt5InstallPath)
|
||||
|
||||
url = 'NOT DEFINED'
|
||||
if platform.system() == 'Windows':
|
||||
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows3.tar.gz'
|
||||
elif platform.system() == 'Darwin':
|
||||
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos.tar.gz?versionId=bLAgnoJ8IMKpqv8NFDcAu8hsyQy3Rwwz'
|
||||
elif platform.system() == 'Linux':
|
||||
if platform.linux_distribution()[1][:3] == '16.':
|
||||
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz'
|
||||
elif platform.linux_distribution()[1][:3] == '18.':
|
||||
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz'
|
||||
else:
|
||||
print('UNKNOWN LINUX VERSION!!!')
|
||||
return;
|
||||
else:
|
||||
print('UNKNOWN OPERATING SYSTEM!!!')
|
||||
return;
|
||||
|
||||
print('Extracting ' + url + ' to ' + dest)
|
||||
hifi_utils.downloadAndExtract(url, dest)
|
||||
else:
|
||||
print ('Qt has already been downloaded')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
set(ENV{MACOSX_DEPLOYMENT_TARGET} 10.9)
|
||||
set(ENV{MACOSX_DEPLOYMENT_TARGET} 10.11)
|
||||
project(HQLauncher)
|
||||
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
|
||||
include("cmake/macros/SetPackagingParameters.cmake")
|
||||
|
|
|
@ -3,18 +3,8 @@ set(TARGET_NAME script-engine)
|
|||
setup_hifi_library(Gui Network Script ScriptTools WebSockets Widgets)
|
||||
|
||||
target_zlib()
|
||||
|
||||
if (NOT ANDROID)
|
||||
|
||||
add_dependency_external_projects(quazip)
|
||||
find_package(QuaZip REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${QUAZIP_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${QUAZIP_LIBRARIES})
|
||||
|
||||
if (WIN32)
|
||||
add_paths_to_fixup_libs(${QUAZIP_DLL_PATH})
|
||||
endif ()
|
||||
|
||||
target_quazip()
|
||||
endif ()
|
||||
|
||||
link_hifi_libraries(shared networking shaders material-networking model-networking recording avatars fbx entities controllers animation audio midi)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
if (APPLE OR WIN32)
|
||||
if (WIN32)
|
||||
|
||||
set(TARGET_NAME hifiNeuron)
|
||||
setup_hifi_plugin(Qml)
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
# See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
set(TARGET_NAME hifiSdl2)
|
||||
setup_hifi_plugin(Qml)
|
||||
link_hifi_libraries(shared controllers ui plugins input-plugins script-engine)
|
||||
target_sdl2()
|
||||
if (NOT APPLE)
|
||||
set(TARGET_NAME hifiSdl2)
|
||||
setup_hifi_plugin(Qml)
|
||||
link_hifi_libraries(shared controllers ui plugins input-plugins script-engine)
|
||||
target_sdl2()
|
||||
endif()
|
|
@ -9,7 +9,7 @@
|
|||
# Windows doesn't need this, and building it currently make Linux unstable.
|
||||
# if (NOT WIN32)
|
||||
|
||||
if (APPLE)
|
||||
if (FALSE AND APPLE)
|
||||
|
||||
set(TARGET_NAME oculusLegacy)
|
||||
setup_hifi_plugin()
|
||||
|
|
21
prebuild.py
21
prebuild.py
|
@ -20,6 +20,7 @@ import hifi_singleton
|
|||
import hifi_utils
|
||||
import hifi_android
|
||||
import hifi_vcpkg
|
||||
import hifi_qt
|
||||
|
||||
import argparse
|
||||
import concurrent
|
||||
|
@ -119,9 +120,27 @@ def main():
|
|||
logger.info('sha=%s' % headSha())
|
||||
logger.info('start')
|
||||
|
||||
# OS dependent information
|
||||
system = platform.system()
|
||||
if 'Windows' == system and 'CI_BUILD' in os.environ and os.environ["CI_BUILD"] == "Github":
|
||||
logger.info("Downloading NSIS")
|
||||
with timer('NSIS'):
|
||||
hifi_utils.downloadAndExtract('https://hifi-public.s3.amazonaws.com/dependencies/NSIS-hifi-plugins-1.0.tgz', "C:/Program Files (x86)")
|
||||
|
||||
qtInstallPath = ''
|
||||
# If not android, install our Qt build
|
||||
if not args.android:
|
||||
qt = hifi_qt.QtDownloader(args)
|
||||
qtInstallPath = qt.cmakePath
|
||||
with hifi_singleton.Singleton(qt.lockFile) as lock:
|
||||
with timer('Qt'):
|
||||
qt.installQt()
|
||||
qt.writeConfig()
|
||||
|
||||
# Only allow one instance of the program to run at a time
|
||||
pm = hifi_vcpkg.VcpkgRepo(args)
|
||||
with hifi_singleton.Singleton(pm.lockFile) as lock:
|
||||
|
||||
with timer('Bootstraping'):
|
||||
if not pm.upToDate():
|
||||
pm.bootstrap()
|
||||
|
@ -135,7 +154,7 @@ def main():
|
|||
# * build host tools, like spirv-cross and scribe
|
||||
# * build client dependencies like openssl and nvtt
|
||||
with timer('Setting up dependencies'):
|
||||
pm.setupDependencies()
|
||||
pm.setupDependencies(qt=qtInstallPath)
|
||||
|
||||
# wipe out the build directories (after writing the tag, since failure
|
||||
# here shouldn't invalidte the vcpkg install)
|
||||
|
|
|
@ -24,11 +24,11 @@ set_target_properties(${TARGET_NAME}-npm-install PROPERTIES FOLDER "hidden/Serve
|
|||
|
||||
# add a dependency from the package target to the server components
|
||||
if (BUILD_CLIENT)
|
||||
add_dependencies(${TARGET_NAME} interface)
|
||||
#add_dependencies(${TARGET_NAME} interface)
|
||||
endif()
|
||||
|
||||
if (BUILD_SERVER)
|
||||
add_dependencies(${TARGET_NAME} assignment-client domain-server)
|
||||
#add_dependencies(${TARGET_NAME} assignment-client domain-server)
|
||||
endif()
|
||||
|
||||
# set the packaged console folder depending on platform, so we can copy it
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
# add the manual test directories
|
||||
file(GLOB TEST_SUBDIRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*")
|
||||
|
||||
if (APPLE)
|
||||
set(CMAKE_MACOSX_BUNDLE TRUE)
|
||||
endif()
|
||||
|
||||
foreach(DIR ${TEST_SUBDIRS})
|
||||
if((IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${DIR}") AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${DIR}/CMakeLists.txt"))
|
||||
set(TEST_PROJ_NAME ${DIR})
|
||||
add_subdirectory(${DIR})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (APPLE)
|
||||
unset(CMAKE_MACOSX_BUNDLE)
|
||||
endif()
|
||||
|
|
|
@ -28,13 +28,9 @@ target_gli()
|
|||
target_glm()
|
||||
|
||||
target_zlib()
|
||||
add_dependency_external_projects(quazip)
|
||||
find_package(QuaZip REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${QUAZIP_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${QUAZIP_LIBRARIES})
|
||||
target_quazip()
|
||||
|
||||
if (WIN32)
|
||||
add_paths_to_fixup_libs(${QUAZIP_DLL_PATH})
|
||||
add_dependency_external_projects(wasapi)
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -5,11 +5,8 @@ macro (setup_testcase_dependencies)
|
|||
package_libraries_for_deployment()
|
||||
target_opengl()
|
||||
target_zlib()
|
||||
find_package(QuaZip REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${QUAZIP_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${QUAZIP_LIBRARIES})
|
||||
target_quazip()
|
||||
if (WIN32)
|
||||
add_paths_to_fixup_libs(${QUAZIP_DLL_PATH})
|
||||
add_dependency_external_projects(wasapi)
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
|
9
tools/ci-scripts/remove-labels.py
Normal file
9
tools/ci-scripts/remove-labels.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
import os, json
|
||||
from github import Github
|
||||
|
||||
label_prefix = os.environ['LABEL_PREFIX']
|
||||
context = json.loads(os.environ['GITHUB_CONTEXT'])
|
||||
pr = Github(os.environ['GITHUB_TOKEN']).get_repo(context['repository']).get_pull(context['event']['number'])
|
||||
for label in pr.get_labels():
|
||||
if label.name.startswith(label_prefix):
|
||||
pr.remove_from_labels(label.name)
|
27
tools/ci-scripts/upload.py
Normal file
27
tools/ci-scripts/upload.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Post build script
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import boto3
|
||||
import glob
|
||||
from github import Github
|
||||
|
||||
|
||||
def main():
|
||||
bucket_name = os.environ['BUCKET_NAME']
|
||||
upload_prefix = os.environ['UPLOAD_PREFIX']
|
||||
context = json.loads(os.environ['GITHUB_CONTEXT'])
|
||||
baseUrl = 'https://{}.s3.amazonaws.com/{}/'.format(bucket_name, upload_prefix)
|
||||
S3 = boto3.client('s3')
|
||||
g = Github(os.environ['GITHUB_TOKEN'])
|
||||
repo = g.get_repo(context['repository'])
|
||||
pr = repo.get_pull(context['event']['number'])
|
||||
|
||||
path = os.path.join(os.getcwd(), os.environ['ARTIFACT_PATTERN'])
|
||||
files = glob.glob(path, recursive=False)
|
||||
for archiveFile in files:
|
||||
filePath, fileName = os.path.split(archiveFile)
|
||||
pr.create_issue_comment("Build artifact uploaded as [{}]({}{})".format(fileName, baseUrl, fileName))
|
||||
S3.upload_file(os.path.join(filePath, fileName), bucket_name, upload_prefix + '/' + fileName)
|
||||
|
||||
main()
|
|
@ -1,9 +1,17 @@
|
|||
|
||||
set(TARGET_NAME gpu-frame-player)
|
||||
|
||||
|
||||
setup_memory_debugger()
|
||||
|
||||
if (APPLE)
|
||||
set(CMAKE_MACOSX_BUNDLE TRUE)
|
||||
endif()
|
||||
|
||||
setup_hifi_project(Gui Widgets)
|
||||
|
||||
if (APPLE)
|
||||
unset(CMAKE_MACOSX_BUNDLE)
|
||||
endif()
|
||||
|
||||
# link in the shared libraries
|
||||
link_hifi_libraries(
|
||||
|
|
|
@ -4,11 +4,7 @@ link_hifi_libraries(shared fbx hfm graphics gpu gl)
|
|||
|
||||
include_hifi_library_headers(image)
|
||||
|
||||
add_dependency_external_projects(vhacd)
|
||||
|
||||
find_package(VHACD REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${VHACD_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${VHACD_LIBRARIES})
|
||||
target_vhacd()
|
||||
|
||||
setup_memory_debugger()
|
||||
|
||||
|
|
Loading…
Reference in a new issue