mirror of
https://github.com/lubosz/overte.git
synced 2025-04-05 21:22:00 +02:00
Vcpkg migration
This commit is contained in:
parent
8c4237b520
commit
8c4f0ec774
143 changed files with 2373 additions and 3303 deletions
|
@ -7,22 +7,36 @@ else()
|
|||
cmake_minimum_required(VERSION 3.2)
|
||||
endif()
|
||||
|
||||
# squelch the Policy CMP0074 warning without requiring an update to cmake 3.12.
|
||||
if ((${CMAKE_MAJOR_VERSION} EQUAL 3 AND ${CMAKE_MINOR_VERSION} GREATER 11) OR ${CMAKE_MAJOR_VERSION} GREATER 3)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/macros/TargetPython.cmake")
|
||||
target_python()
|
||||
|
||||
if (HIFI_ANDROID )
|
||||
execute_process(
|
||||
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --android --build-root ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --build-root ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
# squelch the Policy CMP0074 warning without requiring an update to cmake 3.12.
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${CMAKE_BINARY_DIR}/vcpkg.cmake")
|
||||
message(FATAL_ERROR "vcpkg configuration missing.")
|
||||
endif()
|
||||
|
||||
include("${CMAKE_BINARY_DIR}/vcpkg.cmake")
|
||||
project(hifi)
|
||||
|
||||
include("cmake/init.cmake")
|
||||
|
||||
include("cmake/compiler.cmake")
|
||||
|
||||
if (BUILD_SCRIBE_ONLY)
|
||||
add_subdirectory(tools/scribe)
|
||||
add_subdirectory(tools/shader_reflect)
|
||||
return()
|
||||
endif()
|
||||
add_paths_to_fixup_libs(${VKPKG_INSTALL_ROOT}/bin)
|
||||
add_paths_to_fixup_libs(${VKPKG_INSTALL_ROOT}/debug/bin)
|
||||
|
||||
if (NOT DEFINED CLIENT_ONLY)
|
||||
set(CLIENT_ONLY 0)
|
||||
|
@ -40,7 +54,8 @@ endif()
|
|||
|
||||
set(BUILD_CLIENT_OPTION ON)
|
||||
set(BUILD_SERVER_OPTION ON)
|
||||
set(BUILD_TESTS_OPTION ON)
|
||||
set(BUILD_TESTS_OPTION OFF)
|
||||
set(BUILD_MANUAL_TESTS_OPTION ${BUILD_TESTS_OPTION})
|
||||
set(BUILD_TOOLS_OPTION ON)
|
||||
set(BUILD_INSTALLER_OPTION ON)
|
||||
set(GLES_OPTION OFF)
|
||||
|
@ -77,6 +92,7 @@ endif()
|
|||
option(BUILD_CLIENT "Build client components" ${BUILD_CLIENT_OPTION})
|
||||
option(BUILD_SERVER "Build server components" ${BUILD_SERVER_OPTION})
|
||||
option(BUILD_TESTS "Build tests" ${BUILD_TESTS_OPTION})
|
||||
option(BUILD_MANUAL_TESTS "Build manual tests" ${BUILD_MANUAL_TESTS_OPTION})
|
||||
option(BUILD_TOOLS "Build tools" ${BUILD_TOOLS_OPTION})
|
||||
option(BUILD_INSTALLER "Build installer" ${BUILD_INSTALLER_OPTION})
|
||||
option(USE_GLES "Use OpenGL ES" ${GLES_OPTION})
|
||||
|
@ -144,6 +160,8 @@ list(APPEND CMAKE_PREFIX_PATH "${QT_CMAKE_PREFIX_PATH}")
|
|||
find_package( Threads )
|
||||
|
||||
add_definitions(-DGLM_FORCE_RADIANS)
|
||||
add_definitions(-DGLM_ENABLE_EXPERIMENTAL)
|
||||
add_definitions(-DGLM_FORCE_CTOR_INIT)
|
||||
set(HIFI_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libraries")
|
||||
|
||||
set(EXTERNAL_PROJECT_PREFIX "project")
|
||||
|
@ -191,7 +209,9 @@ if (BUILD_TESTS)
|
|||
include(CTest)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
add_subdirectory(tests-manual)
|
||||
if (BUILD_MANUAL_TESTS)
|
||||
add_subdirectory(tests-manual)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_INSTALLER)
|
||||
|
|
|
@ -23,7 +23,6 @@ android {
|
|||
'-DANDROID_TOOLCHAIN=clang',
|
||||
'-DANDROID_STL=c++_shared',
|
||||
'-DQT_CMAKE_PREFIX_PATH=' + HIFI_ANDROID_PRECOMPILED + '/qt/lib/cmake',
|
||||
'-DNATIVE_SCRIBE=' + HIFI_ANDROID_PRECOMPILED + '/scribe' + EXEC_SUFFIX,
|
||||
'-DHIFI_ANDROID_PRECOMPILED=' + HIFI_ANDROID_PRECOMPILED,
|
||||
'-DRELEASE_NUMBER=' + RELEASE_NUMBER,
|
||||
'-DRELEASE_TYPE=' + RELEASE_TYPE,
|
||||
|
|
|
@ -106,11 +106,6 @@ def packages = [
|
|||
versionId: 'r5Zran.JSCtvrrB6Q4KaqfIoALPw3lYY',
|
||||
checksum: 'a8ee8584cf1ccd34766c7ddd9d5e5449',
|
||||
],
|
||||
glm: [
|
||||
file: 'glm-0.9.8.5-patched.tgz',
|
||||
versionId: 'cskfMoJrFlAeqI3WPxemyO_Cxt7rT9EJ',
|
||||
checksum: '067b5fe16b220b5b1a1039ba51b062ae',
|
||||
],
|
||||
gvr: [
|
||||
file: 'gvrsdk_v1.101.0.tgz',
|
||||
versionId: 'nqBV_j81Uc31rC7bKIrlya_Hah4v3y5r',
|
||||
|
@ -161,21 +156,6 @@ def packages = [
|
|||
]
|
||||
]
|
||||
|
||||
def scribeLocalFile='scribe' + EXEC_SUFFIX
|
||||
def scribeFile='scribe_linux_x86_64'
|
||||
def scribeChecksum='4635c28192724281d2367ce9e94380ab'
|
||||
def scribeVersion='mPAY_N846oZH1tPY1bwChB_hzqkiYyoC'
|
||||
|
||||
if (Os.isFamily(Os.FAMILY_MAC)) {
|
||||
scribeFile = 'scribe_osx_x86_64'
|
||||
scribeChecksum='1ead61c285d265eba9a5ef91ae3b7c26'
|
||||
scribeVersion='4TAXWdo9fviw60N2wUA8HNyQ9TabjZa3'
|
||||
} else if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||
scribeFile = 'scribe_win32_x86_64.exe'
|
||||
scribeChecksum='9c29a62595daf4844f95f6744d568c15'
|
||||
scribeVersion='DUoxjufeX8ZAIVRBKRczWTuZwT13enTv'
|
||||
}
|
||||
|
||||
def options = [
|
||||
files: new TreeSet<File>(),
|
||||
features: new HashSet<String>(),
|
||||
|
@ -434,28 +414,6 @@ task copyDependencies(dependsOn: [ extractDependencies ]) {
|
|||
}
|
||||
}
|
||||
|
||||
task downloadScribe(type: Download) {
|
||||
src baseUrl + scribeFile + '?versionId=' + scribeVersion
|
||||
dest new File(baseFolder, scribeLocalFile)
|
||||
onlyIfNewer true
|
||||
}
|
||||
|
||||
task verifyScribe (type: Verify, dependsOn: downloadScribe) {
|
||||
src new File(baseFolder, scribeLocalFile);
|
||||
checksum scribeChecksum
|
||||
}
|
||||
|
||||
task fixScribePermissions(type: Exec, dependsOn: verifyScribe) {
|
||||
commandLine 'chmod', 'a+x', HIFI_ANDROID_PRECOMPILED + '/' + scribeLocalFile
|
||||
}
|
||||
|
||||
task setupScribe(dependsOn: [verifyScribe]) { }
|
||||
|
||||
// On Windows, we don't need to set the executable bit, but on OSX and Unix we do
|
||||
if (!Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||
setupScribe.dependsOn fixScribePermissions
|
||||
}
|
||||
|
||||
task extractGvrBinaries(dependsOn: extractDependencies) {
|
||||
doLast {
|
||||
def gvrLibFolder = new File(HIFI_ANDROID_PRECOMPILED, 'gvr/gvr-android-sdk-1.101.0/libraries');
|
||||
|
@ -542,7 +500,7 @@ task qtBundle {
|
|||
}
|
||||
}
|
||||
|
||||
task setupDependencies(dependsOn: [setupScribe, copyDependencies, extractGvrBinaries, qtBundle]) { }
|
||||
task setupDependencies(dependsOn: [copyDependencies, extractGvrBinaries, qtBundle]) { }
|
||||
|
||||
task cleanDependencies(type: Delete) {
|
||||
delete HIFI_ANDROID_PRECOMPILED
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <random>
|
||||
|
||||
#include <glm/detail/func_common.hpp>
|
||||
#include <glm/common.hpp>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QJsonArray>
|
||||
|
|
20
cmake/externals/boostconfig/CMakeLists.txt
vendored
20
cmake/externals/boostconfig/CMakeLists.txt
vendored
|
@ -1,20 +0,0 @@
|
|||
set(EXTERNAL_NAME boostconfig)
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
#URL https://github.com/boostorg/config/archive/boost-1.58.0.zip
|
||||
URL https://public.highfidelity.com/dependencies/config-boost-1.58.0.zip
|
||||
URL_MD5 42fa673bae2b7645a22736445e80eb8d
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
LOG_DOWNLOAD 1
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR)
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SOURCE_DIR}/include CACHE TYPE INTERNAL)
|
||||
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
85
cmake/externals/bullet/CMakeLists.txt
vendored
85
cmake/externals/bullet/CMakeLists.txt
vendored
|
@ -1,85 +0,0 @@
|
|||
set(EXTERNAL_NAME bullet)
|
||||
|
||||
if (WIN32)
|
||||
set(PLATFORM_CMAKE_ARGS "-DUSE_MSVC_RUNTIME_LIBRARY_DLL=1")
|
||||
else ()
|
||||
set(PLATFORM_CMAKE_ARGS "-DBUILD_SHARED_LIBS=1")
|
||||
|
||||
if (ANDROID)
|
||||
list(APPEND PLATFORM_CMAKE_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" "-DANDROID_NATIVE_API_LEVEL=19")
|
||||
elseif (APPLE)
|
||||
list(APPEND PLATFORM_CMAKE_ARGS "-DCMAKE_INSTALL_NAME_DIR=<INSTALL_DIR>/lib")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
if (WIN32)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/bullet-2.88.tgz
|
||||
URL_MD5 0a6876607ebe83e227427215f15946fd
|
||||
CMAKE_ARGS ${PLATFORM_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DBUILD_EXTRAS=0 -DINSTALL_LIBS=1 -DBUILD_BULLET3=0 -DBUILD_OPENGL3_DEMOS=0 -DBUILD_BULLET2_DEMOS=0 -DBUILD_UNIT_TESTS=0 -DUSE_GLUT=0 -DUSE_DX11=0
|
||||
LOG_DOWNLOAD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_BUILD 1
|
||||
BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
)
|
||||
else ()
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/bullet-2.88.tgz
|
||||
URL_MD5 0a6876607ebe83e227427215f15946fd
|
||||
CMAKE_ARGS ${PLATFORM_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DBUILD_EXTRAS=0 -DINSTALL_LIBS=1 -DBUILD_BULLET3=0 -DBUILD_OPENGL3_DEMOS=0 -DBUILD_BULLET2_DEMOS=0 -DBUILD_UNIT_TESTS=0 -DUSE_GLUT=0
|
||||
LOG_DOWNLOAD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_BUILD 1
|
||||
BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
)
|
||||
endif ()
|
||||
|
||||
# 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)
|
||||
|
||||
set(BULLET_LIB_DIR "${INSTALL_DIR}/lib")
|
||||
|
||||
if (APPLE OR UNIX OR ANDROID)
|
||||
if (APPLE)
|
||||
set(BULLET_LIB_EXT "dylib")
|
||||
else ()
|
||||
set(BULLET_LIB_EXT "so")
|
||||
endif ()
|
||||
|
||||
set(LIB_PREFIX "lib")
|
||||
elseif (WIN32)
|
||||
set(BULLET_LIB_EXT "lib")
|
||||
endif ()
|
||||
|
||||
if (DEFINED BULLET_LIB_EXT)
|
||||
set(_BULLET_LIB_PAIRS "DYNAMICS_LIBRARY\;BulletDynamics" "COLLISION_LIBRARY\;BulletCollision" "MATH_LIBRARY\;LinearMath" "SOFTBODY_LIBRARY\;BulletSoftBody")
|
||||
|
||||
foreach(_LIB_PAIR ${_BULLET_LIB_PAIRS})
|
||||
list(GET _LIB_PAIR 0 _LIB_VAR_NAME)
|
||||
list(GET _LIB_PAIR 1 _LIB_NAME)
|
||||
|
||||
|
||||
|
||||
if (WIN32)
|
||||
# on windows, we might end up with a library that ends with RelWithDebInfo if Visual Studio is building for that configuration
|
||||
set(${EXTERNAL_NAME_UPPER}_${_LIB_VAR_NAME}_RELEASE "${BULLET_LIB_DIR}/${LIB_PREFIX}${_LIB_NAME}$<$<CONFIG:RelWithDebInfo>:_RelWithDebugInfo>$<$<CONFIG:MinSizeRel>:_MinsizeRel>.${BULLET_LIB_EXT}" CACHE FILEPATH "${_LIB_NAME} release library location")
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_${_LIB_VAR_NAME}_DEBUG ${BULLET_LIB_DIR}/${LIB_PREFIX}${_LIB_NAME}_Debug.${BULLET_LIB_EXT} CACHE FILEPATH "${_LIB_NAME} debug library location")
|
||||
else ()
|
||||
set(${EXTERNAL_NAME_UPPER}_${_LIB_VAR_NAME}_RELEASE ${BULLET_LIB_DIR}/${LIB_PREFIX}${_LIB_NAME}.${BULLET_LIB_EXT} CACHE FILEPATH "${_LIB_NAME} release library location")
|
||||
set(${EXTERNAL_NAME_UPPER}_${_LIB_VAR_NAME}_DEBUG "" CACHE FILEPATH "${_LIB_NAME} debug library location")
|
||||
endif ()
|
||||
endforeach()
|
||||
endif ()
|
||||
|
||||
if (DEFINED ${EXTERNAL_NAME_UPPER}_DYNAMICS_LIBRARY_RELEASE)
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIR ${INSTALL_DIR}/include/bullet CACHE PATH "Path to bullet include directory")
|
||||
endif ()
|
41
cmake/externals/draco/CMakeLists.txt
vendored
41
cmake/externals/draco/CMakeLists.txt
vendored
|
@ -1,41 +0,0 @@
|
|||
set(EXTERNAL_NAME draco)
|
||||
|
||||
if (ANDROID)
|
||||
set(ANDROID_CMAKE_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" "-DANDROID_NATIVE_API_LEVEL=19")
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
set(EXTRA_CMAKE_FLAGS -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++)
|
||||
endif ()
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/draco-1.1.0.zip
|
||||
URL_MD5 208f8b04c91d5f1c73d731a3ea37c5bb
|
||||
CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>-$<CONFIG> ${EXTRA_CMAKE_FLAGS}
|
||||
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)
|
||||
set(SUFFIXED_INSTALL_DIR "${INSTALL_DIR}-$<CONFIG>")
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SUFFIXED_INSTALL_DIR}/include CACHE PATH "List of Draco include directories")
|
||||
|
||||
if (UNIX)
|
||||
set(LIB_PREFIX "lib")
|
||||
set(LIB_EXT "a")
|
||||
elseif (WIN32)
|
||||
set(LIB_EXT "lib")
|
||||
endif ()
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY ${SUFFIXED_INSTALL_DIR}/lib/${LIB_PREFIX}draco.${LIB_EXT} CACHE FILEPATH "Path to Draco release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_ENCODER_LIBRARY ${SUFFIXED_INSTALL_DIR}/lib/${LIB_PREFIX}dracoenc.${LIB_EXT} CACHE FILEPATH "Path to Draco encoder release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_DECODER_LIBRARY ${SUFFIXED_INSTALL_DIR}/lib/${LIB_PREFIX}dracodec.${LIB_EXT} CACHE FILEPATH "Path to Draco decoder release library")
|
58
cmake/externals/etc2comp/CMakeLists.txt
vendored
58
cmake/externals/etc2comp/CMakeLists.txt
vendored
|
@ -1,58 +0,0 @@
|
|||
set(EXTERNAL_NAME etc2comp)
|
||||
|
||||
if (ANDROID)
|
||||
set(ANDROID_CMAKE_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" "-DANDROID_NATIVE_API_LEVEL=19")
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
set(EXTRA_CMAKE_FLAGS -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++)
|
||||
endif ()
|
||||
|
||||
include(ExternalProject)
|
||||
# We use a patched version of etc2comp that properly generates all the necessary mips
|
||||
# See https://github.com/google/etc2comp/pull/29
|
||||
# We also use part of https://github.com/google/etc2comp/pull/1, which fixes a bug
|
||||
# that would override CMAKE_CXX_FLAGS
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/etc2comp-patched.zip
|
||||
URL_MD5 4c96153eb179acbe619e3d99d3330595
|
||||
CMAKE_ARGS ${ANDROID_CMAKE_ARGS} ${EXTRA_CMAKE_FLAGS}
|
||||
BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
INSTALL_COMMAND ""
|
||||
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} SOURCE_DIR)
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
if (WIN32 OR APPLE)
|
||||
if (WIN32)
|
||||
set(_LIB_FILE "EtcLib.lib")
|
||||
else ()
|
||||
set(_LIB_FILE "libEtcLib.a")
|
||||
endif ()
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/build/EtcLib/Debug/${_LIB_FILE} CACHE FILEPATH "Path to Etc2Comp debug library")
|
||||
|
||||
# use generator expression to ensure the correct library is found when building different configurations in VS
|
||||
set(_LIB_FOLDER "$<$<CONFIG:RelWithDebInfo>:build/EtcLib/RelWithDebInfo>")
|
||||
set(_LIB_FOLDER "${_LIB_FOLDER}$<$<CONFIG:MinSizeRel>:build/EtcLib/MinSizeRel>")
|
||||
set(_LIB_FOLDER "${_LIB_FOLDER}$<$<OR:$<CONFIG:Release>,$<CONFIG:Debug>>:build/EtcLib/Release>")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/${_LIB_FOLDER}/${_LIB_FILE} CACHE FILEPATH "Path to Etc2Comp release library")
|
||||
else ()
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG "" CACHE FILEPATH "Path to EtcLib debug library")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/build/EtcLib/libEtcLib.a CACHE FILEPATH "Path to EtcLib release library")
|
||||
|
||||
endif ()
|
||||
|
||||
set(ETC_INCLUDE_DIR ${SOURCE_DIR}/EtcLib/Etc CACHE FILEPATH "Path to Etc2Comp/Etc include directory")
|
||||
set(ETCCODEC_INCLUDE_DIR ${SOURCE_DIR}/EtcLib/EtcCodec CACHE FILEPATH "Path to Etc2Comp/EtcCodec include directory")
|
||||
# ETC2COMP_INCLUDE_DIRS will be set later by FindEtc2Comp
|
21
cmake/externals/gli/CMakeLists.txt
vendored
21
cmake/externals/gli/CMakeLists.txt
vendored
|
@ -1,21 +0,0 @@
|
|||
set(EXTERNAL_NAME gli)
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/gli-0.8.1.0.zip
|
||||
URL_MD5 00c990f59c12bbf367956ef399d6f798
|
||||
BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
LOG_DOWNLOAD 1
|
||||
)
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR)
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SOURCE_DIR} CACHE PATH "List of gli include directories")
|
21
cmake/externals/glm/CMakeLists.txt
vendored
21
cmake/externals/glm/CMakeLists.txt
vendored
|
@ -1,21 +0,0 @@
|
|||
set(EXTERNAL_NAME glm)
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/glm-0.9.8.5-patched.zip
|
||||
URL_MD5 7d39ecc1cea275427534c3cfd6dd63f0
|
||||
BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> ${EXTERNAL_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")
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE PATH "List of glm include directories")
|
42
cmake/externals/glslang/CMakeLists.txt
vendored
42
cmake/externals/glslang/CMakeLists.txt
vendored
|
@ -1,42 +0,0 @@
|
|||
set(EXTERNAL_NAME glslang)
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://github.com/KhronosGroup/glslang/archive/7.8.2853.zip
|
||||
URL_MD5 4f93e3818528176c622c137fba05cbf8
|
||||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>-$<CONFIG>
|
||||
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")
|
||||
|
||||
# includes
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
set(SUFFIXED_INSTALL_DIR "${INSTALL_DIR}-$<CONFIG>")
|
||||
|
||||
list(APPEND INCLUDE_DIRS ${SUFFIXED_INSTALL_DIR}/include)
|
||||
#list(APPEND INCLUDE_DIRS ${INSTALL_DIR}/include)
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIR ${INCLUDE_DIRS} CACHE PATH "List of glslang include directories")
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${${EXTERNAL_NAME_UPPER}_INCLUDE_DIR} CACHE PATH "List of glslang include directories")
|
||||
|
||||
|
||||
set(LIB_DIR ${SUFFIXED_INSTALL_DIR}/lib)
|
||||
list(APPEND LIB_NAMES glslang HLSL OGLCompiler OSDependent SPIRV SPVRemapper)
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
foreach(BASE_LIB ${LIB_NAMES})
|
||||
string(TOUPPER ${BASE_LIB} BASE_LIB_UPPER)
|
||||
list(APPEND ${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE "${LIB_DIR}/${BASE_LIB}.lib")
|
||||
list(APPEND ${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG "${LIB_DIR}/${BASE_LIB}d.lib")
|
||||
endforeach()
|
||||
|
||||
select_library_configurations(${EXTERNAL_NAME_UPPER})
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY ${${EXTERNAL_NAME_UPPER}_LIBRARY} CACHE FILEPATH "Location of glslang libraries")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${${EXTERNAL_NAME_UPPER}_LIBRARIES} CACHE FILEPATH "Location of glslang libraries")
|
22
cmake/externals/json/CMakeLists.txt
vendored
22
cmake/externals/json/CMakeLists.txt
vendored
|
@ -1,22 +0,0 @@
|
|||
set(EXTERNAL_NAME json)
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://hifi-public.s3.amazonaws.com/dependencies/json_3.1.2.zip
|
||||
URL_MD5 94dbf6ea25a7569ddc0ab6e20862cf16
|
||||
BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> ${EXTERNAL_ARGS}
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
LOG_DOWNLOAD 1
|
||||
)
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR)
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SOURCE_DIR} CACHE PATH "List of json include directories")
|
87
cmake/externals/nvtt/CMakeLists.txt
vendored
87
cmake/externals/nvtt/CMakeLists.txt
vendored
|
@ -1,87 +0,0 @@
|
|||
include(ExternalProject)
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
set(EXTERNAL_NAME nvtt)
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
if (WIN32)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/nvtt-win-2.1.0.hifi.zip
|
||||
URL_MD5 10da01cf601f88f6dc12a6bc13c89136
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
LOG_DOWNLOAD 1
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR)
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SOURCE_DIR}/include CACHE PATH "Location of NVTT include directory")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${SOURCE_DIR}/Release/x64/nvtt.lib CACHE FILEPATH "Path to NVTT release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_DLL_PATH "${SOURCE_DIR}/Release>/x64" CACHE PATH "Location of NVTT release DLL")
|
||||
else ()
|
||||
|
||||
if (ANDROID)
|
||||
set(ANDROID_CMAKE_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" "-DANDROID_NATIVE_API_LEVEL=19")
|
||||
endif ()
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/nvidia-texture-tools-2.1.0.hifi-83462e4.zip
|
||||
URL_MD5 602776e08515b54bfa1b8dc455003f0f
|
||||
CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DNVTT_SHARED=1 -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
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE PATH "Location of NVTT include directory")
|
||||
|
||||
if (APPLE)
|
||||
set(_LIB_EXT "dylib")
|
||||
else ()
|
||||
set(_LIB_EXT "so")
|
||||
endif ()
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libnvtt.${_LIB_EXT} CACHE FILEPATH "Path to NVTT library")
|
||||
|
||||
if (APPLE)
|
||||
# on OS X we have to use install_name_tool to fix the paths found in the NVTT shared libraries
|
||||
# so that they can be found and linked during the linking phase
|
||||
set(_NVTT_LIB_DIR "${INSTALL_DIR}/lib")
|
||||
|
||||
# first fix the install names of all present libraries
|
||||
ExternalProject_Add_Step(
|
||||
${EXTERNAL_NAME}
|
||||
change-install-name
|
||||
COMMENT "Calling install_name_tool on NVTT libraries to fix install name for dylib linking"
|
||||
COMMAND ${CMAKE_COMMAND} -DINSTALL_NAME_LIBRARY_DIR=${_NVTT_LIB_DIR} -P ${EXTERNAL_PROJECT_DIR}/OSXInstallNameChange.cmake
|
||||
DEPENDEES install
|
||||
WORKING_DIRECTORY <INSTALL_DIR>
|
||||
LOG 1
|
||||
)
|
||||
|
||||
# then, for the main library (libnvtt) fix the paths to the dependency libraries (core, image, math)
|
||||
ExternalProject_Add_Step(
|
||||
${EXTERNAL_NAME}
|
||||
change-dependency-paths
|
||||
COMMENT "Calling install_name_tool on NVTT libraries to fix paths for dependency libraries"
|
||||
COMMAND install_name_tool -change libnvimage.dylib ${INSTALL_DIR}/lib/libnvimage.dylib libnvtt.dylib
|
||||
COMMAND install_name_tool -change libnvcore.dylib ${INSTALL_DIR}/lib/libnvcore.dylib libnvtt.dylib
|
||||
COMMAND install_name_tool -change libnvmath.dylib ${INSTALL_DIR}/lib/libnvmath.dylib libnvtt.dylib
|
||||
COMMAND install_name_tool -change libnvcore.dylib ${INSTALL_DIR}/lib/libnvcore.dylib libnvimage.dylib
|
||||
COMMAND install_name_tool -change libnvmath.dylib ${INSTALL_DIR}/lib/libnvmath.dylib libnvimage.dylib
|
||||
COMMAND install_name_tool -change libnvcore.dylib ${INSTALL_DIR}/lib/libnvcore.dylib libnvmath.dylib
|
||||
DEPENDEES install
|
||||
WORKING_DIRECTORY <INSTALL_DIR>/lib
|
||||
LOG 1
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Hide this external target (for IDE users)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
49
cmake/externals/openvr/CMakeLists.txt
vendored
49
cmake/externals/openvr/CMakeLists.txt
vendored
|
@ -1,49 +0,0 @@
|
|||
include(ExternalProject)
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
set(EXTERNAL_NAME OpenVR)
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/openvr-1.0.6.zip
|
||||
URL_MD5 f6892cd3a3078f505d03b4297f5a1951
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
LOG_DOWNLOAD 1
|
||||
)
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR)
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SOURCE_DIR}/headers CACHE TYPE INTERNAL)
|
||||
|
||||
if (WIN32)
|
||||
|
||||
# FIXME need to account for different architectures
|
||||
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${SOURCE_DIR}/lib/win64/openvr_api.lib CACHE TYPE INTERNAL)
|
||||
add_paths_to_fixup_libs(${SOURCE_DIR}/bin/win64)
|
||||
else()
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${SOURCE_DIR}/lib/win32/openvr_api.lib CACHE TYPE INTERNAL)
|
||||
add_paths_to_fixup_libs(${SOURCE_DIR}/bin/win32)
|
||||
endif()
|
||||
|
||||
elseif(APPLE)
|
||||
|
||||
# FIXME need to account for different architectures
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${SOURCE_DIR}/lib/osx32/libopenvr_api.dylib CACHE TYPE INTERNAL)
|
||||
add_paths_to_fixup_libs(${SOURCE_DIR}/bin/osx32)
|
||||
|
||||
elseif(NOT ANDROID)
|
||||
|
||||
# FIXME need to account for different architectures
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${SOURCE_DIR}/lib/linux64/libopenvr_api.so CACHE TYPE INTERNAL)
|
||||
add_paths_to_fixup_libs(${SOURCE_DIR}/bin/linux64)
|
||||
|
||||
endif()
|
||||
|
13
cmake/externals/quazip/CMakeLists.txt
vendored
13
cmake/externals/quazip/CMakeLists.txt
vendored
|
@ -3,7 +3,14 @@ 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 -DZLIB_ROOT=${ZLIB_ROOT} -DCMAKE_POSITION_INDEPENDENT_CODE=ON)
|
||||
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=${VKPKG_INSTALL_ROOT}
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON)
|
||||
|
||||
if (NOT APPLE)
|
||||
set(QUAZIP_CMAKE_ARGS ${QUAZIP_CMAKE_ARGS} -DCMAKE_CXX_STANDARD=11)
|
||||
|
@ -20,10 +27,6 @@ ExternalProject_Add(
|
|||
LOG_BUILD 1
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
add_dependencies(quazip zlib)
|
||||
endif ()
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES
|
||||
FOLDER "hidden/externals"
|
||||
|
|
90
cmake/externals/sdl2/CMakeLists.txt
vendored
90
cmake/externals/sdl2/CMakeLists.txt
vendored
|
@ -1,90 +0,0 @@
|
|||
set(EXTERNAL_NAME sdl2)
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
if (WIN32)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/SDL2-devel-2.0.3-VC.zip
|
||||
URL_MD5 30a333bcbe94bc5016e8799c73e86233
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
LOG_DOWNLOAD 1
|
||||
)
|
||||
elseif (APPLE)
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/SDL2-2.0.3.zip
|
||||
URL_MD5 55f1eae5142d20db11c844d8d4d6deed
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DVIDEO_OPENGL=OFF
|
||||
BINARY_DIR ${EXTERNAL_PROJECT_PREFIX}/build
|
||||
LOG_DOWNLOAD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_BUILD 1
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIR ${INSTALL_DIR}/include/SDL2 CACHE PATH "Location of SDL2 include directory")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY "${INSTALL_DIR}/lib/libSDL2-2.0.dylib" CACHE STRING "Path to SDL2 library")
|
||||
|
||||
set(_SDL2_LIB_DIR "${INSTALL_DIR}/lib")
|
||||
|
||||
ExternalProject_Add_Step(
|
||||
${EXTERNAL_NAME}
|
||||
change-install-name
|
||||
COMMENT "Calling install_name_tool on SDL2 libraries to fix install name for dylib linking"
|
||||
COMMAND ${CMAKE_COMMAND} -DINSTALL_NAME_LIBRARY_DIR=${_SDL2_LIB_DIR} -P ${EXTERNAL_PROJECT_DIR}/OSXInstallNameChange.cmake
|
||||
DEPENDEES install
|
||||
WORKING_DIRECTORY <INSTALL_DIR>
|
||||
LOG 1
|
||||
)
|
||||
|
||||
else ()
|
||||
if (ANDROID)
|
||||
set(ANDROID_CMAKE_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" "-DANDROID_NATIVE_API_LEVEL=19")
|
||||
endif ()
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/SDL2-2.0.3.tar.gz
|
||||
URL_MD5 fe6c61d2e9df9ef570e7e80c6e822537
|
||||
CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
||||
LOG_DOWNLOAD 1
|
||||
LOG_CONFIGURE 1
|
||||
LOG_BUILD 1
|
||||
)
|
||||
endif ()
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
||||
|
||||
if (APPLE)
|
||||
|
||||
# NOOP
|
||||
|
||||
elseif (WIN32)
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR)
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIR ${SOURCE_DIR}/include CACHE PATH "Location of SDL2 include directory")
|
||||
|
||||
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_TEMP ${SOURCE_DIR}/lib/x64/SDL2.lib CACHE FILEPATH "Path to SDL2 library")
|
||||
set(${EXTERNAL_NAME_UPPER}_DLL_PATH ${SOURCE_DIR}/lib/x64 CACHE PATH "Location of SDL2 DLL")
|
||||
else()
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_TEMP ${SOURCE_DIR}/lib/x86/SDL2.lib CACHE FILEPATH "Path to SDL2 library")
|
||||
set(${EXTERNAL_NAME_UPPER}_DLL_PATH ${SOURCE_DIR}/lib/x86 CACHE PATH "Location of SDL2 DLL")
|
||||
endif()
|
||||
|
||||
add_paths_to_fixup_libs(${${EXTERNAL_NAME_UPPER}_DLL_PATH})
|
||||
|
||||
else ()
|
||||
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR)
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIR ${INSTALL_DIR}/include/SDL2 CACHE PATH "Location of SDL2 include directory")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_TEMP ${INSTALL_DIR}/lib/libSDL2.so CACHE FILEPATH "Path to SDL2 library")
|
||||
|
||||
endif ()
|
34
cmake/externals/spirv_binaries/CMakeLists.txt
vendored
34
cmake/externals/spirv_binaries/CMakeLists.txt
vendored
|
@ -1,34 +0,0 @@
|
|||
set(EXTERNAL_NAME spirv_binaries)
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
include(ExternalProject)
|
||||
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(DOWNLOAD_URL https://public.highfidelity.com/dependencies/vulkan/vulkansdk-win32-1.1.82.1.tar.gz)
|
||||
set(DOWNLOAD_MD5 3a83ef490bce248b1a4d6726a3e5893e)
|
||||
set(BIN_DIR "Bin")
|
||||
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(DOWNLOAD_URL https://public.highfidelity.com/dependencies/vulkan/vulkansdk-macos-1.1.82.1.tar.gz)
|
||||
set(DOWNLOAD_MD5 a57d37275b2c5db023ba8e84a63461ff)
|
||||
set(BIN_DIR "macOS/bin")
|
||||
else ()
|
||||
set(DOWNLOAD_URL https://public.highfidelity.com/dependencies/vulkan/vulkansdk-linux-x86_64-1.1.82.1.tar.gz)
|
||||
set(DOWNLOAD_MD5 5a7c9eeda8cee6b36724da7f7cbe5ec6)
|
||||
set(BIN_DIR "x86_64/bin")
|
||||
endif ()
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL ${DOWNLOAD_URL}
|
||||
URL_MD5 ${DOWNLOAD_MD5}
|
||||
BUILD_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
LOG_DOWNLOAD ON
|
||||
)
|
||||
|
||||
# Hide this external target (for ide users)
|
||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
||||
ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR)
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_DIR "${SOURCE_DIR}/${BIN_DIR}" CACHE FILEPATH "SPIRV binary tools location")
|
||||
|
35
cmake/externals/spirv_cross/CMakeLists.txt
vendored
35
cmake/externals/spirv_cross/CMakeLists.txt
vendored
|
@ -1,35 +0,0 @@
|
|||
set(EXTERNAL_NAME spirv_cross)
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://github.com/KhronosGroup/SPIRV-Cross/archive/2018-08-07.zip
|
||||
URL_MD5 11198e4dc6a815ffbdb7a0a56d2d9261
|
||||
CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>-$<CONFIG> ${EXTRA_CMAKE_FLAGS}
|
||||
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)
|
||||
set(SUFFIXED_INSTALL_DIR "${INSTALL_DIR}-$<CONFIG>")
|
||||
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SUFFIXED_INSTALL_DIR}/include CACHE PATH "List of Draco include directories")
|
||||
|
||||
if (UNIX)
|
||||
set(LIB_PREFIX "lib")
|
||||
set(LIB_EXT "a")
|
||||
elseif (WIN32)
|
||||
set(LIB_EXT "lib")
|
||||
endif ()
|
||||
|
||||
foreach(lib glsl msl cpp hlsl reflect util core)
|
||||
list(APPEND ${EXTERNAL_NAME_UPPER}_LIBRARIES ${SUFFIXED_INSTALL_DIR}/lib/spirv-cross-${lib}.${LIB_EXT})
|
||||
endforeach()
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${${EXTERNAL_NAME_UPPER}_LIBRARIES} CACHE FILEPATH "Path to SPIRV-Cross libraries")
|
18
cmake/externals/spirv_headers/CMakeLists.txt
vendored
18
cmake/externals/spirv_headers/CMakeLists.txt
vendored
|
@ -1,18 +0,0 @@
|
|||
set(EXTERNAL_NAME spirv_headers)
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://github.com/KhronosGroup/SPIRV-Headers/archive/2c512180ca03b5d4f56283efc85745775b45fdc4.zip
|
||||
URL_MD5 83e652221b5f21d5fdb61c45f5b4d9f9
|
||||
CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> ${EXTRA_CMAKE_FLAGS}
|
||||
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)
|
||||
set(${EXTERNAL_NAME_UPPER}_ROOT ${INSTALL_DIR} CACHE PATH "List of include directories")
|
33
cmake/externals/spirv_tools/CMakeLists.txt
vendored
33
cmake/externals/spirv_tools/CMakeLists.txt
vendored
|
@ -1,33 +0,0 @@
|
|||
set(EXTERNAL_NAME spirv_tools)
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://github.com/KhronosGroup/SPIRV-Tools/archive/v2018.4.zip
|
||||
URL_MD5 7a7c69cf6ff0318910b4bfbdf30bcfc9
|
||||
CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DSPIRV-Headers_SOURCE_DIR=${SPIRV_HEADERS_ROOT} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>-$<CONFIG> ${EXTRA_CMAKE_FLAGS}
|
||||
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)
|
||||
set(SUFFIXED_INSTALL_DIR "${INSTALL_DIR}-$<CONFIG>")
|
||||
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SUFFIXED_INSTALL_DIR}/include CACHE PATH "List of SPIRV-Tools include directories")
|
||||
|
||||
if (UNIX)
|
||||
set(LIB_PREFIX "lib")
|
||||
set(LIB_EXT "a")
|
||||
elseif (WIN32)
|
||||
set(LIB_EXT "lib")
|
||||
endif ()
|
||||
|
||||
list(APPEND ${EXTERNAL_NAME_UPPER}_LIBRARIES ${SUFFIXED_INSTALL_DIR}/lib/SPIRV-Tools-opt.${LIB_EXT})
|
||||
list(APPEND ${EXTERNAL_NAME_UPPER}_LIBRARIES ${SUFFIXED_INSTALL_DIR}/lib/SPIRV-Tools-link.${LIB_EXT})
|
||||
list(APPEND ${EXTERNAL_NAME_UPPER}_LIBRARIES ${SUFFIXED_INSTALL_DIR}/lib/SPIRV-Tools.${LIB_EXT})
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${${EXTERNAL_NAME_UPPER}_LIBRARIES} CACHE FILEPATH "Path to SPIRV-Tool libraries")
|
33
cmake/externals/zlib/CMakeLists.txt
vendored
33
cmake/externals/zlib/CMakeLists.txt
vendored
|
@ -1,33 +0,0 @@
|
|||
set(EXTERNAL_NAME zlib)
|
||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
ExternalProject_Add(
|
||||
${EXTERNAL_NAME}
|
||||
URL https://public.highfidelity.com/dependencies/zlib128.zip
|
||||
URL_MD5 126f8676442ffbd97884eb4d6f32afb4
|
||||
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)
|
||||
set(${EXTERNAL_NAME_UPPER}_ROOT ${INSTALL_DIR} CACHE PATH "Path for Zlib install root")
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIR ${INSTALL_DIR}/include CACHE PATH "List of zlib include directories")
|
||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${${EXTERNAL_NAME_UPPER}_INCLUDE_DIR} CACHE PATH "List of zlib include directories")
|
||||
set(${EXTERNAL_NAME_UPPER}_DLL_PATH ${INSTALL_DIR}/bin CACHE FILEPATH "Location of ZLib DLL")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/zlib.lib CACHE FILEPATH "Location of zlib release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/zlibd.lib CACHE FILEPATH "Location of zlib debug library")
|
||||
|
||||
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 zlib libraries")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${${EXTERNAL_NAME_UPPER}_LIBRARIES} CACHE FILEPATH "Location of zlib libraries")
|
|
@ -14,13 +14,6 @@ macro(AUTOSCRIBE_APPEND_QRC)
|
|||
string(CONCAT SHADER_QRC "${SHADER_QRC}" "<file alias=\"${ARGV0}\">${ARGV1}</file>\n")
|
||||
endmacro()
|
||||
|
||||
set(VULKAN_DIR $ENV{VULKAN_SDK})
|
||||
set(GLSLANG_EXEC "${VULKAN_DIR}/Bin/glslangValidator.exe")
|
||||
set(SPIRV_CROSS_EXEC "${VULKAN_DIR}/Bin/spirv-cross.exe")
|
||||
set(SPIRV_OPT_EXEC "${VULKAN_DIR}/Bin/spirv-opt.exe")
|
||||
set(GLSLC_EXEC "${VULKAN_DIR}/Bin/glslc.exe")
|
||||
set(SCRIBE_EXEC "D:/scribe.exe")
|
||||
|
||||
macro(AUTOSCRIBE_PLATFORM_SHADER)
|
||||
set(AUTOSCRIBE_PLATFORM_PATH "${ARGV0}")
|
||||
string(REGEX MATCH "([0-9]+(es)?)(/stereo)?" PLATFORM_PATH_REGEX ${AUTOSCRIBE_PLATFORM_PATH})
|
||||
|
@ -75,36 +68,6 @@ macro(AUTOSCRIBE_PLATFORM_SHADER)
|
|||
list(APPEND SHADER_GEN_LINE ${TEMP_PATH})
|
||||
list(APPEND SHADER_GEN_LINE ${AUTOSCRIBE_SHADER_SEEN_LIBS})
|
||||
string(CONCAT AUTOSCRIBE_SHADERGEN_COMMANDS "${AUTOSCRIBE_SHADERGEN_COMMANDS}" "${SHADER_GEN_LINE}\n")
|
||||
|
||||
# # FIXME need better mechanism for determining the include files
|
||||
# add_custom_command(
|
||||
# OUTPUT ${AUTOSCRIBE_OUTPUT_FILE}
|
||||
# COMMAND ${SCRIBE_COMMAND} ${SHADER_FILE} ${SCRIBE_ARGS} -o ${AUTOSCRIBE_OUTPUT_FILE} -h ${AUTOSCRIBE_DIALECT_HEADER} -h ${AUTOSCRIBE_VARIANT_HEADER}
|
||||
# DEPENDS ${SCRIBE_COMMAND} ${SHADER_FILE} ${AUTOSCRIBE_DIALECT_HEADER} ${AUTOSCRIBE_VARIANT_HEADER})
|
||||
|
||||
# # Generate the spirv file
|
||||
# add_custom_command(
|
||||
# OUTPUT ${AUTOSCRIBE_SPIRV_FILE}
|
||||
# COMMAND ${GLSLANG_EXEC} -V110 -o ${AUTOSCRIBE_SPIRV_FILE} ${AUTOSCRIBE_OUTPUT_FILE}
|
||||
# DEPENDS ${AUTOSCRIBE_OUTPUT_FILE} ${GLSLANG_EXEC})
|
||||
|
||||
# # Generate the optimized spirv file
|
||||
# add_custom_command(
|
||||
# OUTPUT ${AUTOSCRIBE_SPIRV_OPT_FILE}
|
||||
# COMMAND ${SPIRV_OPT_EXEC} -O ${AUTOSCRIBE_SPIRV_FILE} -o ${AUTOSCRIBE_SPIRV_OPT_FILE}
|
||||
# DEPENDS ${AUTOSCRIBE_SPIRV_FILE} ${SPIRV_OPT_EXEC})
|
||||
|
||||
# # Generate the optimized GLSL file
|
||||
# add_custom_command(
|
||||
# OUTPUT ${AUTOSCRIBE_SPIRV_GLSL_FILE}
|
||||
# COMMAND ${SPIRV_CROSS_EXEC} ${SPIRV_CROSS_ARGS} ${AUTOSCRIBE_SPIRV_OPT_FILE} --output ${AUTOSCRIBE_SPIRV_GLSL_FILE}
|
||||
# DEPENDS ${AUTOSCRIBE_SPIRV_OPT_FILE} ${SPIRV_CROSS_EXEC})
|
||||
|
||||
# # Generate the optimized spirv file
|
||||
# add_custom_command(
|
||||
# OUTPUT ${AUTOSCRIBE_SPIRV_JSON_FILE}
|
||||
# COMMAND ${SPIRV_CROSS_EXEC} --reflect json ${AUTOSCRIBE_SPIRV_OPT_FILE} --output ${AUTOSCRIBE_SPIRV_JSON_FILE}
|
||||
# DEPENDS ${AUTOSCRIBE_SPIRV_OPT_FILE} ${SPIRV_CROSS_EXEC})
|
||||
endmacro()
|
||||
|
||||
macro(AUTOSCRIBE_SHADER)
|
||||
|
@ -307,38 +270,16 @@ macro(AUTOSCRIBE_SHADER_LIBS)
|
|||
set(AUTOSCRIBE_SHADERGEN_COMMANDS_FILE ${CMAKE_CURRENT_BINARY_DIR}/shadergen.txt)
|
||||
file(WRITE ${AUTOSCRIBE_SHADERGEN_COMMANDS_FILE} "${AUTOSCRIBE_SHADERGEN_COMMANDS}")
|
||||
|
||||
# grab the SPIRV binaries we require
|
||||
# note we don't use the normal ADD_DEPENDENCY_EXTERNAL_PROJECTS macro because only a custom command
|
||||
# depends on these, not any of our build artifacts, so there's no valid target for the add_dependencies
|
||||
# call in ADD_DEPENDENCY_EXTERNAL_PROJECTS to use
|
||||
add_subdirectory(${EXTERNAL_PROJECT_DIR}/spirv_binaries ${EXTERNALS_BINARY_DIR}/spirv_binaries)
|
||||
|
||||
target_python()
|
||||
|
||||
# A custom python script which will generate
|
||||
if (ANDROID)
|
||||
add_custom_command(
|
||||
OUTPUT ${SCRIBED_SHADERS} ${SPIRV_SHADERS} ${REFLECTED_SHADERS}
|
||||
COMMENT "Generating/updating shaders"
|
||||
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_SOURCE_DIR}/tools/shadergen.py
|
||||
--commands ${AUTOSCRIBE_SHADERGEN_COMMANDS_FILE}
|
||||
--spirv-binaries ${SPIRV_BINARIES_DIR}
|
||||
--scribe ${NATIVE_SCRIBE}
|
||||
--build-dir ${CMAKE_CURRENT_BINARY_DIR}
|
||||
--source-dir ${CMAKE_SOURCE_DIR}
|
||||
DEPENDS ${AUTOSCRIBE_SHADER_HEADERS} spirv_binaries ${CMAKE_SOURCE_DIR}/tools/shadergen.py ${ALL_SCRIBE_SHADERS})
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT ${SCRIBED_SHADERS} ${SPIRV_SHADERS} ${REFLECTED_SHADERS}
|
||||
COMMENT "Generating/updating shaders"
|
||||
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_SOURCE_DIR}/tools/shadergen.py
|
||||
--commands ${AUTOSCRIBE_SHADERGEN_COMMANDS_FILE}
|
||||
--spirv-binaries ${SPIRV_BINARIES_DIR}
|
||||
--scribe $<TARGET_FILE:scribe>
|
||||
--build-dir ${CMAKE_CURRENT_BINARY_DIR}
|
||||
--source-dir ${CMAKE_SOURCE_DIR}
|
||||
DEPENDS ${AUTOSCRIBE_SHADER_HEADERS} scribe spirv_binaries ${CMAKE_SOURCE_DIR}/tools/shadergen.py ${ALL_SCRIBE_SHADERS})
|
||||
endif()
|
||||
# A custom python script which will generate all our shader artifacts
|
||||
add_custom_command(
|
||||
OUTPUT ${SCRIBED_SHADERS} ${SPIRV_SHADERS} ${REFLECTED_SHADERS}
|
||||
COMMENT "Generating/updating shaders"
|
||||
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_SOURCE_DIR}/tools/shadergen.py
|
||||
--commands ${AUTOSCRIBE_SHADERGEN_COMMANDS_FILE}
|
||||
--tools-dir ${VCPKG_TOOLS_DIR}
|
||||
--build-dir ${CMAKE_CURRENT_BINARY_DIR}
|
||||
--source-dir ${CMAKE_SOURCE_DIR}
|
||||
DEPENDS ${AUTOSCRIBE_SHADER_HEADERS} ${CMAKE_SOURCE_DIR}/tools/shadergen.py ${ALL_SCRIBE_SHADERS})
|
||||
|
||||
add_custom_target(shadergen DEPENDS ${SCRIBED_SHADERS} ${SPIRV_SHADERS} ${REFLECTED_SHADERS})
|
||||
set_target_properties(shadergen PROPERTIES FOLDER "Shaders")
|
||||
|
|
|
@ -19,13 +19,13 @@ macro(manually_install_openssl_for_qt)
|
|||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
install(
|
||||
FILES "${OPENSSL_DLL_PATH}/ssleay32.dll"
|
||||
FILES "${VKPKG_INSTALL_ROOT}/bin/ssleay32.dll"
|
||||
DESTINATION ${TARGET_INSTALL_DIR}
|
||||
COMPONENT ${TARGET_INSTALL_COMPONENT}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${OPENSSL_DLL_PATH}/libeay32.dll"
|
||||
FILES "${VKPKG_INSTALL_ROOT}/bin/libeay32.dll"
|
||||
DESTINATION ${TARGET_INSTALL_DIR}
|
||||
COMPONENT ${TARGET_INSTALL_COMPONENT}
|
||||
)
|
||||
|
|
|
@ -16,7 +16,6 @@ macro(TARGET_BULLET)
|
|||
list(APPEND BULLET_LIBRARIES ${LIB_DIR}/libLinearMath.a)
|
||||
list(APPEND BULLET_LIBRARIES ${LIB_DIR}/libBulletSoftBody.a)
|
||||
else()
|
||||
add_dependency_external_projects(bullet)
|
||||
find_package(Bullet REQUIRED)
|
||||
endif()
|
||||
# perform the system include hack for OS X to ignore warnings
|
||||
|
|
|
@ -1,18 +1,24 @@
|
|||
macro(TARGET_DRACO)
|
||||
set(LIBS draco dracodec dracoenc)
|
||||
find_library(LIBPATH ${LIB} PATHS )
|
||||
if (ANDROID)
|
||||
set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/draco)
|
||||
set(DRACO_INCLUDE_DIRS "${INSTALL_DIR}/include" CACHE TYPE INTERNAL)
|
||||
|
||||
set(LIB_DIR ${INSTALL_DIR}/lib)
|
||||
list(APPEND DRACO_LIBRARIES ${LIB_DIR}/libdraco.a)
|
||||
list(APPEND DRACO_LIBRARIES ${LIB_DIR}/libdracodec.a)
|
||||
list(APPEND DRACO_LIBRARIES ${LIB_DIR}/libdracoenc.a)
|
||||
target_link_libraries(${TARGET_NAME} ${DRACO_LIBRARIES})
|
||||
else()
|
||||
add_dependency_external_projects(draco)
|
||||
find_package(Draco REQUIRED)
|
||||
list(APPEND DRACO_LIBRARIES ${DRACO_LIBRARY})
|
||||
list(APPEND DRACO_LIBRARIES ${DRACO_ENCODER_LIBRARY})
|
||||
set(LIB_SEARCH_PATH_RELEASE ${VKPKG_INSTALL_ROOT}/lib/)
|
||||
set(LIB_SEARCH_PATH_DEBUG ${VKPKG_INSTALL_ROOT}/debug/lib/)
|
||||
foreach(LIB ${LIBS})
|
||||
find_library(${LIB}_LIBPATH ${LIB} PATHS ${LIB_SEARCH_PATH_RELEASE} NO_DEFAULT_PATH)
|
||||
list(APPEND DRACO_LIBRARY_RELEASE ${${LIB}_LIBPATH})
|
||||
find_library(${LIB}D_LIBPATH ${LIB} PATHS ${LIB_SEARCH_PATH_DEBUG} NO_DEFAULT_PATH)
|
||||
list(APPEND DRACO_LIBRARY_DEBUG ${${LIB}D_LIBPATH})
|
||||
endforeach()
|
||||
select_library_configurations(DRACO)
|
||||
target_link_libraries(${TARGET_NAME} ${DRACO_LIBRARY})
|
||||
endif()
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${DRACO_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${DRACO_LIBRARIES})
|
||||
endmacro()
|
||||
endmacro()
|
|
@ -8,15 +8,16 @@
|
|||
macro(TARGET_ETC2COMP)
|
||||
if (ANDROID)
|
||||
set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/etc2comp)
|
||||
set(ETC2COMP_INCLUDE_DIRS "${INSTALL_DIR}/include/Etc" "${INSTALL_DIR}/include/EtcCodec")
|
||||
set(ETC2COMP_INCLUDE_DIRS "${INSTALL_DIR}/include" "${INSTALL_DIR}/include/Etc" "${INSTALL_DIR}/include/EtcCodec")
|
||||
set(ETC2COMP_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libEtcLib.a)
|
||||
set(ETC2COMP_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libEtcLib.a)
|
||||
select_library_configurations(ETC2COMP)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${ETC2COMP_INCLUDE_DIRS})
|
||||
else()
|
||||
add_dependency_external_projects(etc2comp)
|
||||
find_package(Etc2Comp REQUIRED)
|
||||
find_library(ETC2COMP_LIBRARY_DEBUG EtcLib PATHS ${VKPKG_INSTALL_ROOT}/debug/lib/ NO_DEFAULT_PATH)
|
||||
find_library(ETC2COMP_LIBRARY_RELEASE EtcLib PATHS ${VKPKG_INSTALL_ROOT}/lib/ NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${ETC2COMP_INCLUDE_DIRS})
|
||||
select_library_configurations(ETC2COMP)
|
||||
target_link_libraries(${TARGET_NAME} ${ETC2COMP_LIBRARIES})
|
||||
endmacro()
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_GLI)
|
||||
add_dependency_external_projects(gli)
|
||||
find_package(GLI REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${GLI_INCLUDE_DIRS})
|
||||
# We use vcpkg for both gli and glm, so we just re-use the target_glm macro here
|
||||
target_glm()
|
||||
endmacro()
|
|
@ -7,10 +7,12 @@
|
|||
#
|
||||
macro(TARGET_GLM)
|
||||
if (ANDROID)
|
||||
set(GLM_INCLUDE_DIRS "${HIFI_ANDROID_PRECOMPILED}/glm/include")
|
||||
target_include_directories(${TARGET_NAME} PUBLIC "${VKPKG_INSTALL_ROOT}/include")
|
||||
else()
|
||||
add_dependency_external_projects(glm)
|
||||
find_package(GLM REQUIRED)
|
||||
find_package(glm CONFIG REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} glm)
|
||||
endif()
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC GLM_FORCE_RADIANS)
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC GLM_ENABLE_EXPERIMENTAL)
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC GLM_FORCE_CTOR_INIT)
|
||||
endmacro()
|
|
@ -6,7 +6,6 @@
|
|||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_JSON)
|
||||
add_dependency_external_projects(json)
|
||||
find_package(JSON REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${JSON_INCLUDE_DIRS})
|
||||
# We use vcpkg for both json and glm, so we just re-use the target_glm macro here
|
||||
target_glm()
|
||||
endmacro()
|
|
@ -15,12 +15,17 @@ macro(TARGET_NVTT)
|
|||
list(APPEND NVTT_LIBS "${NVTT_LIB_DIR}/libnvimage.so")
|
||||
list(APPEND NVTT_LIBS "${NVTT_LIB_DIR}/libnvtt.so")
|
||||
set(NVTT_LIBRARIES ${NVTT_LIBS} CACHE TYPE INTERNAL)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${NVTT_INCLUDE_DIRS})
|
||||
else()
|
||||
add_dependency_external_projects(nvtt)
|
||||
find_package(NVTT REQUIRED)
|
||||
add_paths_to_fixup_libs(${NVTT_DLL_PATH})
|
||||
find_library(NVTT_LIBRARY_RELEASE nvtt PATHS ${VKPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(NVTT_LIBRARY_DEBUG nvtt PATHS ${VKPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
select_library_configurations(NVTT)
|
||||
endif()
|
||||
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${NVTT_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${NVTT_LIBRARIES})
|
||||
if ((NOT WIN32) AND (NOT ANDROID) AND (NOT APPLE))
|
||||
find_package(OpenMP)
|
||||
target_link_libraries(${TARGET_NAME} OpenMP::OpenMP_C OpenMP::OpenMP_CXX)
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
|
|
@ -11,15 +11,8 @@ macro(TARGET_OPENSSL)
|
|||
set(OPENSSL_INCLUDE_DIR "${OPENSSL_INSTALL_DIR}/include" CACHE TYPE INTERNAL)
|
||||
set(OPENSSL_LIBRARIES "${OPENSSL_INSTALL_DIR}/lib/libcrypto.a;${OPENSSL_INSTALL_DIR}/lib/libssl.a" CACHE TYPE INTERNAL)
|
||||
else()
|
||||
|
||||
# using VCPKG for OpenSSL
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
if (APPLE AND ${OPENSSL_INCLUDE_DIR} STREQUAL "/usr/include")
|
||||
# this is a user on OS X using system OpenSSL, which is going to throw warnings since they're deprecating for their common crypto
|
||||
message(WARNING "The found version of OpenSSL is the OS X system version. This will produce deprecation warnings."
|
||||
"\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
|
||||
|
|
13
cmake/macros/TargetOpenVR.cmake
Normal file
13
cmake/macros/TargetOpenVR.cmake
Normal file
|
@ -0,0 +1,13 @@
|
|||
#
|
||||
# Created by Bradley Austin Davis on 2018/10/24
|
||||
# Copyright 2013-2018 High Fidelity, Inc.
|
||||
#
|
||||
# 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_OPENVR)
|
||||
find_library(OPENVR_LIBRARY_RELEASE NAMES openvr_api PATHS ${VKPKG_INSTALL_ROOT}/lib)
|
||||
find_library(OPENVR_LIBRARY_DEBUG NAMES openvr_api PATHS ${VKPKG_INSTALL_ROOT}/debug/lib)
|
||||
select_library_configurations(OPENVR)
|
||||
target_link_libraries(${TARGET_NAME} ${OPENVR_LIBRARY})
|
||||
endmacro()
|
|
@ -6,9 +6,12 @@
|
|||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_SDL2)
|
||||
add_dependency_external_projects(sdl2)
|
||||
find_package(SDL2 REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${SDL2_INCLUDE_DIR})
|
||||
target_link_libraries(${TARGET_NAME} ${SDL2_LIBRARY})
|
||||
# using VCPKG for SDL2
|
||||
find_package(SDL2 CONFIG REQUIRED)
|
||||
if (WIN32)
|
||||
target_link_libraries(${TARGET_NAME} SDL2::SDL2)
|
||||
else()
|
||||
target_link_libraries(${TARGET_NAME} SDL2::SDL2-static)
|
||||
endif()
|
||||
add_definitions(-DHAVE_SDL2)
|
||||
endmacro()
|
||||
endmacro()
|
||||
|
|
|
@ -13,12 +13,17 @@ if (ANDROID)
|
|||
set(TBB_LIBRARY ${TBB_INSTALL_DIR}/lib/release/libtbb.so CACHE FILEPATH "TBB library location")
|
||||
set(TBB_MALLOC_LIBRARY ${TBB_INSTALL_DIR}/lib/release/libtbbmalloc.so CACHE FILEPATH "TBB malloc library location")
|
||||
set(TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY})
|
||||
else()
|
||||
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)
|
||||
target_link_libraries(${TARGET_NAME} TBB::tbb)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${TARGET_NAME} ${TBB_LIBRARIES})
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${TBB_INCLUDE_DIRS})
|
||||
|
||||
endmacro()
|
||||
|
|
|
@ -5,15 +5,7 @@
|
|||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_VULKAN)
|
||||
find_package(Vulkan)
|
||||
|
||||
if (Vulkan_FOUND)
|
||||
add_definitions(-DHAVE_VULKAN)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${Vulkan_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${Vulkan_LIBRARIES})
|
||||
|
||||
add_dependency_external_projects(glslang)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${GLSLANG_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${GLSLANG_LIBRARIES})
|
||||
endif()
|
||||
find_package(Vulkan REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${VULKAN_INCLUDE_DIR})
|
||||
target_link_libraries(${TARGET_NAME} ${VULKAN_LIBRARY})
|
||||
endmacro()
|
|
@ -6,17 +6,8 @@
|
|||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_ZLIB)
|
||||
|
||||
if (WIN32)
|
||||
add_dependency_external_projects(zlib)
|
||||
endif()
|
||||
|
||||
# using VCPKG for zlib
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
if (WIN32)
|
||||
add_paths_to_fixup_libs(${ZLIB_DLL_PATH})
|
||||
endif()
|
||||
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})
|
||||
endmacro()
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
#
|
||||
# FindDraco.cmake
|
||||
#
|
||||
# Try to find Draco libraries and include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# DRACO_FOUND
|
||||
# DRACO_INCLUDE_DIRS
|
||||
# DRACO_LIBRARY
|
||||
# DRACO_ENCODER_LIBRARY
|
||||
# DRACO_DECODER_LIBRARY
|
||||
#
|
||||
# Created on 8/8/2017 by Stephen Birarda
|
||||
# Copyright 2017 High Fidelity, Inc.
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("draco")
|
||||
|
||||
find_path(DRACO_INCLUDE_DIRS draco/core/draco_types.h PATH_SUFFIXES include/draco/src include HINTS ${DRACO_SEARCH_DIRS})
|
||||
|
||||
find_library(DRACO_LIBRARY draco PATH_SUFFIXES "lib" HINTS ${DRACO_SEARCH_DIRS})
|
||||
find_library(DRACO_ENCODER_LIBRARY draco PATH_SUFFIXES "lib" HINTS ${DRACO_SEARCH_DIRS})
|
||||
find_library(DRACO_DECODER_LIBRARY draco PATH_SUFFIXES "lib" HINTS ${DRACO_SEARCH_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(DRACO DEFAULT_MSG DRACO_INCLUDE_DIRS DRACO_LIBRARY DRACO_ENCODER_LIBRARY DRACO_DECODER_LIBRARY)
|
|
@ -1,37 +0,0 @@
|
|||
#
|
||||
# FindEtc2Comp.cmake
|
||||
#
|
||||
# Try to find the Etc2Comp compression library.
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# ETC2COMP_FOUND - system found Etc2Comp
|
||||
# ETC2COMP_INCLUDE_DIRS - the Etc2Comp include directory
|
||||
# ETC2COMP_LIBRARIES - link to this to use Etc2Comp
|
||||
#
|
||||
# Created on 5/2/2018 by Sam Gondelman
|
||||
# Copyright 2018 High Fidelity, Inc.
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("etc2comp")
|
||||
|
||||
find_path(ETC_INCLUDE_DIR NAMES Etc.h HINTS ${ETC2COMP_SEARCH_DIRS})
|
||||
find_path(ETCCODEC_INCLUDE_DIR NAMES EtcBlock4x4.h HINTS ${ETC2COMP_SEARCH_DIRS})
|
||||
set(ETC2COMP_INCLUDE_DIRS "${ETC_INCLUDE_DIR}" "${ETCCODEC_INCLUDE_DIR}")
|
||||
|
||||
find_library(ETC2COMP_LIBRARY_DEBUG NAMES ETC2COMP ETC2COMP_LIB PATH_SUFFIXES EtcLib/Debug HINTS ${ETC2COMP_SEARCH_DIRS})
|
||||
find_library(ETC2COMP_LIBRARY_RELEASE NAMES ETC2COMP ETC2COMP_LIB PATH_SUFFIXES EtcLib/Release EtcLib HINTS ${ETC2COMP_SEARCH_DIRS})
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(ETC2COMP)
|
||||
|
||||
set(ETC2COMP_LIBRARIES ${ETC2COMP_LIBRARY})
|
||||
|
||||
find_package_handle_standard_args(ETC2COMP "Could NOT find ETC2COMP, try to set the path to ETC2COMP root folder in the system variable ETC2COMP_ROOT_DIR or create a directory etc2comp in HIFI_LIB_DIR and paste the necessary files there"
|
||||
ETC2COMP_INCLUDE_DIRS ETC2COMP_LIBRARIES)
|
||||
|
||||
mark_as_advanced(ETC2COMP_INCLUDE_DIRS ETC2COMP_LIBRARIES ETC2COMP_SEARCH_DIRS)
|
|
@ -1,33 +0,0 @@
|
|||
#
|
||||
# FindGLEW.cmake
|
||||
#
|
||||
# Try to find GLEW library and include path. Note that this only handles static GLEW.
|
||||
# Once done this will define
|
||||
#
|
||||
# GLEW_FOUND
|
||||
# GLEW_INCLUDE_DIRS
|
||||
# GLEW_LIBRARIES
|
||||
#
|
||||
# Created on 2/6/2014 by Stephen Birarda
|
||||
# Copyright 2014 High Fidelity, Inc.
|
||||
#
|
||||
# Adapted from FindGLEW.cmake available in the nvidia-texture-tools repository
|
||||
# (https://code.google.com/p/nvidia-texture-tools/source/browse/trunk/cmake/FindGLEW.cmake?r=96)
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("glew")
|
||||
|
||||
find_path(GLEW_INCLUDE_DIRS GL/glew.h PATH_SUFFIXES include HINTS ${GLEW_SEARCH_DIRS})
|
||||
|
||||
find_library(GLEW_LIBRARY_RELEASE glew32 PATH_SUFFIXES "lib/Release/Win32" "lib" HINTS ${GLEW_SEARCH_DIRS})
|
||||
find_library(GLEW_LIBRARY_DEBUG glew32d PATH_SUFFIXES "lib/Debug/Win32" "lib" HINTS ${GLEW_SEARCH_DIRS})
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(GLEW)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_INCLUDE_DIRS GLEW_LIBRARIES)
|
|
@ -1,19 +0,0 @@
|
|||
#
|
||||
# Created by Bradley Austin Davis on 2018/07/22
|
||||
# Copyright 2013-2018 High Fidelity, Inc.
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
# setup hints for JSON search
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("json")
|
||||
|
||||
# locate header
|
||||
find_path(JSON_INCLUDE_DIRS "json/json.hpp" HINTS ${JSON_SEARCH_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(JSON DEFAULT_MSG JSON_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(JSON_INCLUDE_DIRS JSON_SEARCH_DIRS)
|
|
@ -1,174 +0,0 @@
|
|||
# - Try to find the OpenSSL encryption library
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL
|
||||
#
|
||||
# Read-Only variables:
|
||||
# OPENSSL_FOUND - system has the OpenSSL library
|
||||
# OPENSSL_INCLUDE_DIR - the OpenSSL include directory
|
||||
# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
|
||||
# OPENSSL_VERSION - This is set to $major.$minor.$revision$path (eg. 0.9.8s)
|
||||
#
|
||||
# Modified on 7/16/2014 by Stephen Birarda
|
||||
# This is an adapted version of the FindOpenSSL.cmake module distributed with Cmake 2.8.12.2
|
||||
# The original license for that file is displayed below.
|
||||
#
|
||||
#=============================================================================
|
||||
# Copyright 2006-2009 Kitware, Inc.
|
||||
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
|
||||
# Copyright 2009-2011 Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
if (UNIX)
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(_OPENSSL QUIET openssl)
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
if (("${CMAKE_SIZEOF_VOID_P}" EQUAL "8"))
|
||||
set(_OPENSSL_ROOT_HINTS_AND_PATHS $ENV{VCPKG_ROOT}/installed/x64-windows)
|
||||
else()
|
||||
set(_OPENSSL_ROOT_HINTS_AND_PATHS $ENV{VCPKG_ROOT}/installed/x86-windows)
|
||||
endif()
|
||||
else ()
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("openssl")
|
||||
|
||||
set(_OPENSSL_ROOT_HINTS_AND_PATHS ${OPENSSL_SEARCH_DIRS})
|
||||
endif ()
|
||||
|
||||
find_path(OPENSSL_INCLUDE_DIR NAMES openssl/ssl.h HINTS ${_OPENSSL_ROOT_HINTS_AND_PATHS} ${_OPENSSL_INCLUDEDIR}
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
|
||||
if (WIN32 AND NOT CYGWIN)
|
||||
if (MSVC)
|
||||
# Using vcpkg builds of openssl
|
||||
find_library(LIB_EAY_LIBRARY_RELEASE NAMES libeay32 HINTS ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES "lib")
|
||||
find_library(SSL_EAY_LIBRARY_RELEASE NAMES ssleay32 HINTS ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES "lib")
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(LIB_EAY)
|
||||
select_library_configurations(SSL_EAY)
|
||||
set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY})
|
||||
find_path(OPENSSL_DLL_PATH NAMES ssleay32.dll PATH_SUFFIXES "bin" HINTS ${_OPENSSL_ROOT_HINTS_AND_PATHS} NO_DEFAULT_PATH)
|
||||
endif()
|
||||
else()
|
||||
|
||||
find_library(OPENSSL_SSL_LIBRARY NAMES ssl ssleay32 ssleay32MD HINTS ${_OPENSSL_ROOT_HINTS_AND_PATHS} ${_OPENSSL_LIBDIR}
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
find_library(OPENSSL_CRYPTO_LIBRARY NAMES crypto HINTS ${_OPENSSL_ROOT_HINTS_AND_PATHS} ${_OPENSSL_LIBDIR}
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
mark_as_advanced(OPENSSL_CRYPTO_LIBRARY OPENSSL_SSL_LIBRARY)
|
||||
|
||||
# compat defines
|
||||
set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY})
|
||||
set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
|
||||
|
||||
set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||
|
||||
endif ()
|
||||
|
||||
function(from_hex HEX DEC)
|
||||
string(TOUPPER "${HEX}" HEX)
|
||||
set(_res 0)
|
||||
string(LENGTH "${HEX}" _strlen)
|
||||
|
||||
while (_strlen GREATER 0)
|
||||
math(EXPR _res "${_res} * 16")
|
||||
string(SUBSTRING "${HEX}" 0 1 NIBBLE)
|
||||
string(SUBSTRING "${HEX}" 1 -1 HEX)
|
||||
if (NIBBLE STREQUAL "A")
|
||||
math(EXPR _res "${_res} + 10")
|
||||
elseif (NIBBLE STREQUAL "B")
|
||||
math(EXPR _res "${_res} + 11")
|
||||
elseif (NIBBLE STREQUAL "C")
|
||||
math(EXPR _res "${_res} + 12")
|
||||
elseif (NIBBLE STREQUAL "D")
|
||||
math(EXPR _res "${_res} + 13")
|
||||
elseif (NIBBLE STREQUAL "E")
|
||||
math(EXPR _res "${_res} + 14")
|
||||
elseif (NIBBLE STREQUAL "F")
|
||||
math(EXPR _res "${_res} + 15")
|
||||
else()
|
||||
math(EXPR _res "${_res} + ${NIBBLE}")
|
||||
endif()
|
||||
|
||||
string(LENGTH "${HEX}" _strlen)
|
||||
endwhile()
|
||||
|
||||
set(${DEC} ${_res} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if (OPENSSL_INCLUDE_DIR)
|
||||
if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
|
||||
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
|
||||
REGEX "^#[ ]?define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
|
||||
|
||||
# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
|
||||
# The status gives if this is a developer or prerelease and is ignored here.
|
||||
# Major, minor, and fix directly translate into the version numbers shown in
|
||||
# the string. The patch field translates to the single character suffix that
|
||||
# indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so
|
||||
# on.
|
||||
|
||||
string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$"
|
||||
"\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
|
||||
list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
|
||||
list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR)
|
||||
from_hex("${OPENSSL_VERSION_MINOR}" OPENSSL_VERSION_MINOR)
|
||||
list(GET OPENSSL_VERSION_LIST 2 OPENSSL_VERSION_FIX)
|
||||
from_hex("${OPENSSL_VERSION_FIX}" OPENSSL_VERSION_FIX)
|
||||
list(GET OPENSSL_VERSION_LIST 3 OPENSSL_VERSION_PATCH)
|
||||
|
||||
if (NOT OPENSSL_VERSION_PATCH STREQUAL "00")
|
||||
from_hex("${OPENSSL_VERSION_PATCH}" _tmp)
|
||||
# 96 is the ASCII code of 'a' minus 1
|
||||
math(EXPR OPENSSL_VERSION_PATCH_ASCII "${_tmp} + 96")
|
||||
unset(_tmp)
|
||||
# Once anyone knows how OpenSSL would call the patch versions beyond 'z'
|
||||
# this should be updated to handle that, too. This has not happened yet
|
||||
# so it is simply ignored here for now.
|
||||
string(ASCII "${OPENSSL_VERSION_PATCH_ASCII}" OPENSSL_VERSION_PATCH_STRING)
|
||||
endif ()
|
||||
|
||||
set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
set(OPENSSL_REQUIREMENTS OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)
|
||||
if (WIN32)
|
||||
list(APPEND OPENSSL_REQUIREMENTS OPENSSL_DLL_PATH)
|
||||
endif ()
|
||||
|
||||
if (OPENSSL_VERSION)
|
||||
find_package_handle_standard_args(OpenSSL
|
||||
REQUIRED_VARS
|
||||
${OPENSSL_REQUIREMENTS}
|
||||
VERSION_VAR
|
||||
OPENSSL_VERSION
|
||||
FAIL_MESSAGE
|
||||
"Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR"
|
||||
)
|
||||
else ()
|
||||
find_package_handle_standard_args(OpenSSL "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR"
|
||||
${OPENSSL_REQUIREMENTS}
|
||||
)
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES OPENSSL_SEARCH_DIRS)
|
|
@ -1,21 +0,0 @@
|
|||
#
|
||||
# FindLibOVR.cmake
|
||||
#
|
||||
# Try to find the LibOVR library to use the Oculus
|
||||
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENVR_FOUND - system found LibOVR
|
||||
# OPENVR_INCLUDE_DIRS - the LibOVR include directory
|
||||
# OPENVR_LIBRARIES - Link this to use LibOVR
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
if (NOT ANDROID)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OPENVR DEFAULT_MSG OPENVR_INCLUDE_DIRS OPENVR_LIBRARIES)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OPENVR_INCLUDE_DIRS OPENVR_LIBRARIES OPENVR_SEARCH_DIRS)
|
|
@ -1,224 +0,0 @@
|
|||
# Locate SDL2 library
|
||||
# This module defines
|
||||
# SDL2_LIBRARY, the name of the library to link against
|
||||
# SDL2_FOUND, if false, do not try to link to SDL2
|
||||
# SDL2_INCLUDE_DIR, where to find SDL.h
|
||||
#
|
||||
# This module responds to the the flag:
|
||||
# SDL2_BUILDING_LIBRARY
|
||||
# If this is defined, then no SDL2_main will be linked in because
|
||||
# only applications need main().
|
||||
# Otherwise, it is assumed you are building an application and this
|
||||
# module will attempt to locate and set the the proper link flags
|
||||
# as part of the returned SDL2_LIBRARY variable.
|
||||
#
|
||||
# Don't forget to include SDL2main.h and SDL2main.m your project for the
|
||||
# OS X framework based version. (Other versions link to -lSDL2main which
|
||||
# this module will try to find on your behalf.) Also for OS X, this
|
||||
# module will automatically add the -framework Cocoa on your behalf.
|
||||
#
|
||||
#
|
||||
# Additional Note: If you see an empty SDL2_LIBRARY_TEMP in your configuration
|
||||
# and no SDL2_LIBRARY, it means CMake did not find your SDL2 library
|
||||
# (SDL2.dll, libsdl2.so, SDL2.framework, etc).
|
||||
# Set SDL2_LIBRARY_TEMP to point to your SDL2 library, and configure again.
|
||||
# Similarly, if you see an empty SDL2MAIN_LIBRARY, you should set this value
|
||||
# as appropriate. These values are used to generate the final SDL2_LIBRARY
|
||||
# variable, but when these values are unset, SDL2_LIBRARY does not get created.
|
||||
#
|
||||
#
|
||||
# $SDL2 is an environment variable that would
|
||||
# correspond to the ./configure --prefix=$SDL2
|
||||
# used in building SDL2.
|
||||
# l.e.galup 9-20-02
|
||||
#
|
||||
# Modified by Eric Wing.
|
||||
# Added code to assist with automated building by using environmental variables
|
||||
# and providing a more controlled/consistent search behavior.
|
||||
# Added new modifications to recognize OS X frameworks and
|
||||
# additional Unix paths (FreeBSD, etc).
|
||||
# Also corrected the header search path to follow "proper" SDL2 guidelines.
|
||||
# Added a search for SDL2main which is needed by some platforms.
|
||||
# Added a search for threads which is needed by some platforms.
|
||||
# Added needed compile switches for MinGW.
|
||||
#
|
||||
# On OSX, this will prefer the Framework version (if found) over others.
|
||||
# People will have to manually change the cache values of
|
||||
# SDL2_LIBRARY to override this selection or set the CMake environment
|
||||
# CMAKE_INCLUDE_PATH to modify the search paths.
|
||||
#
|
||||
# Note that the header path has changed from SDL2/SDL.h to just SDL.h
|
||||
# This needed to change because "proper" SDL2 convention
|
||||
# is #include "SDL.h", not <SDL2/SDL.h>. This is done for portability
|
||||
# reasons because not all systems place things in SDL2/ (see FreeBSD).
|
||||
#
|
||||
# Ported by Johnny Patterson. This is a literal port for SDL2 of the FindSDL.cmake
|
||||
# module with the minor edit of changing "SDL" to "SDL2" where necessary. This
|
||||
# was not created for redistribution, and exists temporarily pending official
|
||||
# SDL2 CMake modules.
|
||||
#
|
||||
# Note that on windows this will only search for the 32bit libraries, to search
|
||||
# for 64bit change x86/i686-w64 to x64/x86_64-w64
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2003-2009 Kitware, Inc.
|
||||
#
|
||||
# CMake - Cross Platform Makefile Generator
|
||||
# Copyright 2000-2014 Kitware, Inc.
|
||||
# Copyright 2000-2011 Insight Software Consortium
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * 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.
|
||||
#
|
||||
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
|
||||
# nor the names of their 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.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("sdl2")
|
||||
|
||||
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
|
||||
HINTS
|
||||
${SDL2_SEARCH_DIRS}
|
||||
$ENV{SDL2}
|
||||
PATH_SUFFIXES include/SDL2 include SDL2
|
||||
i686-w64-mingw32/include/SDL2
|
||||
x86_64-w64-mingw32/include/SDL2
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/include/SDL2
|
||||
/usr/include/SDL2
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
# Lookup the 64 bit libs on x64
|
||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
FIND_LIBRARY(SDL2_LIBRARY_TEMP SDL2
|
||||
HINTS
|
||||
${SDL2_SEARCH_DIRS}
|
||||
$ENV{SDL2}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
lib/x64
|
||||
x86_64-w64-mingw32/lib
|
||||
PATHS
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
find_path(SDL2_DLL_PATH SDL2.dll PATH_SUFFIXES lib/x64 HINTS ${SDL2_SEARCH_DIRS})
|
||||
endif ()
|
||||
# On 32bit build find the 32bit libs
|
||||
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
FIND_LIBRARY(SDL2_LIBRARY_TEMP SDL2
|
||||
HINTS
|
||||
${SDL2_SEARCH_DIRS}
|
||||
$ENV{SDL2}
|
||||
PATH_SUFFIXES lib
|
||||
lib/x86
|
||||
i686-w64-mingw32/lib
|
||||
PATHS
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
find_path(SDL2_DLL_PATH SDL2.dll PATH_SUFFIXES lib/x86 HINTS ${SDL2_SEARCH_DIRS})
|
||||
endif ()
|
||||
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
||||
# SDL2 may require threads on your system.
|
||||
# The Apple build may not need an explicit flag because one of the
|
||||
# frameworks may already provide it.
|
||||
# But for non-OSX systems, I will use the CMake Threads package.
|
||||
IF(NOT APPLE)
|
||||
FIND_PACKAGE(Threads)
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# MinGW needs an additional library, mwindows
|
||||
# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -lmwindows
|
||||
# (Actually on second look, I think it only needs one of the m* libraries.)
|
||||
IF(MINGW)
|
||||
SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
|
||||
ENDIF(MINGW)
|
||||
|
||||
SET(SDL2_FOUND "NO")
|
||||
IF(SDL2_LIBRARY_TEMP)
|
||||
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
|
||||
# CMake doesn't display the -framework Cocoa string in the UI even
|
||||
# though it actually is there if I modify a pre-used variable.
|
||||
# I think it has something to do with the CACHE STRING.
|
||||
# So I use a temporary variable until the end so I can set the
|
||||
# "real" variable in one-shot.
|
||||
IF(APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
|
||||
ENDIF(APPLE)
|
||||
|
||||
# For threads, as mentioned Apple doesn't need this.
|
||||
# In fact, there seems to be a problem if I used the Threads package
|
||||
# and try using this line, so I'm just skipping it entirely for OS X.
|
||||
IF(NOT APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# For MinGW library
|
||||
IF(MINGW)
|
||||
SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
ENDIF(MINGW)
|
||||
|
||||
# Set the final string here so the GUI reflects the final state.
|
||||
SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
|
||||
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
|
||||
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
|
||||
|
||||
SET(SDL2_FOUND "YES")
|
||||
ENDIF(SDL2_LIBRARY_TEMP)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
set(SDL2_REQUIREMENTS SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
||||
if (WIN32)
|
||||
list(APPEND SDL2_REQUIREMENTS SDL2_DLL_PATH)
|
||||
endif ()
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS ${SDL2_REQUIREMENTS})
|
||||
|
||||
if (WIN32)
|
||||
add_paths_to_fixup_libs(${SDL2_DLL_PATH})
|
||||
endif ()
|
3
cmake/ports/bullet3/CONTROL
Normal file
3
cmake/ports/bullet3/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: bullet3
|
||||
Version: ab8f16961e19a86ee20c6a1d61f662392524cc77
|
||||
Description: Bullet Physics is a professional collision detection, rigid body, and soft body dynamics library
|
57
cmake/ports/bullet3/portfile.cmake
Normal file
57
cmake/ports/bullet3/portfile.cmake
Normal file
|
@ -0,0 +1,57 @@
|
|||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(WARNING "Dynamic not supported, building static")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO bulletphysics/bullet3
|
||||
REF ab8f16961e19a86ee20c6a1d61f662392524cc77
|
||||
SHA512 927742db29867517283d45e475f0c534a9a57e165cae221f26e08e88057253a1682ac9919b2dc547b9cf388ba0b931b175623461d44f28c9184796ba90b1ed55
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
|
||||
-DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON
|
||||
-DUSE_GLUT=0
|
||||
-DUSE_DX11=0
|
||||
-DBUILD_DEMOS=OFF
|
||||
-DBUILD_OPENGL3_DEMOS=OFF
|
||||
-DBUILD_BULLET3=OFF
|
||||
-DBUILD_BULLET2_DEMOS=OFF
|
||||
-DBUILD_CPU_DEMOS=OFF
|
||||
-DBUILD_EXTRAS=OFF
|
||||
-DBUILD_UNIT_TESTS=OFF
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DINSTALL_LIBS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bullet/BulletInverseDynamics/details)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bullet3 RENAME copyright)
|
4
cmake/ports/draco/CONTROL
Normal file
4
cmake/ports/draco/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: draco
|
||||
Version: 1.3.3
|
||||
Description: A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
|
||||
Build-Depends:
|
56
cmake/ports/draco/portfile.cmake
Normal file
56
cmake/ports/draco/portfile.cmake
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/draco
|
||||
REF 1.3.3
|
||||
SHA512 80ed5a623046822f5bb26b2454c8ee8cc93ffe9eb3012e8461cefdfc577b26d69a92ea0f0c5e14f5f48c1ef99f9a7263b01710df376792e74358ae14e49c3897
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/draco/cmake)
|
||||
|
||||
# Install tools and plugins
|
||||
file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe")
|
||||
if(TOOLS)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/draco)
|
||||
file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/draco)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/draco)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/draco)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/draco)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/draco/LICENSE ${CURRENT_PACKAGES_DIR}/share/draco/copyright)
|
3
cmake/ports/etc2comp/CONTROL
Normal file
3
cmake/ports/etc2comp/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: etc2comp
|
||||
Version: 7f1843bf07825c21cab711360c1ddbad04641036
|
||||
Description: ETC2 image compression library
|
39
cmake/ports/etc2comp/portfile.cmake
Normal file
39
cmake/ports/etc2comp/portfile.cmake
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO highfidelity/etc2comp
|
||||
REF 7f1843bf07825c21cab711360c1ddbad04641036
|
||||
SHA512 d747076acda8537d39585858c793a35c3dcc9ef283d723619a47f8c81ec1454c95b3340ad35f0655a939eae5b8271c801c48a9a7568311a01903a344c44af25b
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/etc2comp)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/etc2comp/LICENSE ${CURRENT_PACKAGES_DIR}/share/etc2comp/copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
4
cmake/ports/gli/CONTROL
Normal file
4
cmake/ports/gli/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: gli
|
||||
Version: 0.8.2-1
|
||||
Build-Depends: glm
|
||||
Description: OpenGL Image (GLI) https://gli.g-truc.net
|
19
cmake/ports/gli/portfile.cmake
Normal file
19
cmake/ports/gli/portfile.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
#header-only library
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO g-truc/gli
|
||||
REF 0.8.2.0
|
||||
SHA512 c254a4e1497d0add985e4a882c552db99c512cc0e9cc72145d51a6e7deada817d624d9818099a47136a8a3ef1223a26a34e355e3c713166f0bb062e506059834
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
# Put the license file where vcpkg expects it
|
||||
# manual.md contains the "licenses" section for the project
|
||||
file(COPY ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/gli/)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/gli/manual.md ${CURRENT_PACKAGES_DIR}/share/gli/copyright)
|
||||
|
||||
# Copy the glm header files
|
||||
file(GLOB HEADER_FILES "${SOURCE_PATH}/gli/*.hpp" "${SOURCE_PATH}/gli/core")
|
||||
file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/gli)
|
3
cmake/ports/glm/CONTROL
Normal file
3
cmake/ports/glm/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: glm
|
||||
Version: 0.9.9.3
|
||||
Description: OpenGL Mathematics (GLM) https://glm.g-truc.net
|
13
cmake/ports/glm/disable_warnings_as_error.patch
Normal file
13
cmake/ports/glm/disable_warnings_as_error.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 756673a3..5fbc8906 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -216,7 +216,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
message("GLM: Visual C++ - ${CMAKE_CXX_COMPILER_ID} compiler")
|
||||
endif()
|
||||
|
||||
- add_compile_options(/W4 /WX)
|
||||
+ add_compile_options(/W4)
|
||||
add_compile_options(/wd4309 /wd4324 /wd4389 /wd4127 /wd4267 /wd4146 /wd4201 /wd4464 /wd4514 /wd4701 /wd4820 /wd4365)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
32
cmake/ports/glm/portfile.cmake
Normal file
32
cmake/ports/glm/portfile.cmake
Normal file
|
@ -0,0 +1,32 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO g-truc/glm
|
||||
REF 0.9.9.3
|
||||
SHA512 44152ea6438763feda3b78813287fd59d3574a9630a41647a157825bf5ce4a18fbbecae5a5ccd94acc118ed3d42cbce53d3a67f25632d0c00ab77e7de2bb4650
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_warnings_as_error.patch"
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS -DGLM_TEST_ENABLE=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glm")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
# Put the license file where vcpkg expects it
|
||||
file(COPY ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/glm/)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/glm/manual.md ${CURRENT_PACKAGES_DIR}/share/glm/copyright)
|
3
cmake/ports/glslang/CONTROL
Normal file
3
cmake/ports/glslang/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: glslang
|
||||
Version: untagged-048c4dbc7f021224a933-1
|
||||
Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator
|
35
cmake/ports/glslang/copyright
Normal file
35
cmake/ports/glslang/copyright
Normal file
|
@ -0,0 +1,35 @@
|
|||
//
|
||||
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
//Copyright (C) 2012-2013 LunarG, Inc.
|
||||
//
|
||||
//All rights reserved.
|
||||
//
|
||||
//Redistribution and use in source and binary forms, with or without
|
||||
//modification, are permitted provided that the following conditions
|
||||
//are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Neither the name of 3Dlabs Inc. Ltd. 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 HOLDERS 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.
|
||||
//
|
26
cmake/ports/glslang/portfile.cmake
Normal file
26
cmake/ports/glslang/portfile.cmake
Normal file
|
@ -0,0 +1,26 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO KhronosGroup/glslang
|
||||
REF untagged-048c4dbc7f021224a933
|
||||
SHA512 e3097dd2db88320982d7da1ddce138839daf3251935909c3998a114aeadd408760b26b2d7c7ee547fb0519895ac1853a45c23df2eecf61135849b080252e9dec
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS -DCMAKE_DEBUG_POSTFIX=d
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/glslang)
|
4
cmake/ports/hifi-client-deps/CONTROL
Normal file
4
cmake/ports/hifi-client-deps/CONTROL
Normal file
|
@ -0,0 +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
|
1
cmake/ports/hifi-client-deps/portfile.cmake
Normal file
1
cmake/ports/hifi-client-deps/portfile.cmake
Normal file
|
@ -0,0 +1 @@
|
|||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
4
cmake/ports/hifi-deps/CONTROL
Normal file
4
cmake/ports/hifi-deps/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: hifi-deps
|
||||
Version: 0
|
||||
Description: Collected dependencies for High Fidelity applications
|
||||
Build-Depends: bullet3, draco, etc2comp, glm, nvtt, openssl (windows), tbb (!android&!osx), zlib
|
1
cmake/ports/hifi-deps/portfile.cmake
Normal file
1
cmake/ports/hifi-deps/portfile.cmake
Normal file
|
@ -0,0 +1 @@
|
|||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
4
cmake/ports/hifi-host-tools/CONTROL
Normal file
4
cmake/ports/hifi-host-tools/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: hifi-host-tools
|
||||
Version: 0
|
||||
Description: Host build system compatible tools for building High Fidelity applications
|
||||
Build-Depends: hifi-scribe, glslang, spirv-cross, spirv-tools
|
1
cmake/ports/hifi-host-tools/portfile.cmake
Normal file
1
cmake/ports/hifi-host-tools/portfile.cmake
Normal file
|
@ -0,0 +1 @@
|
|||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
3
cmake/ports/hifi-scribe/CONTROL
Normal file
3
cmake/ports/hifi-scribe/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: hifi-scribe
|
||||
Version: 1bd638a36ca771e5a68d01985b6389b71835cbd2
|
||||
Description: Scribe is a language for generating glsl files from templates
|
19
cmake/ports/hifi-scribe/portfile.cmake
Normal file
19
cmake/ports/hifi-scribe/portfile.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO highfidelity/scribe
|
||||
REF 1bd638a36ca771e5a68d01985b6389b71835cbd2
|
||||
SHA512 dbe241d86df3912e544f6b9839873f9875df54efc93822b145e7b13243eaf2e3d690bc8a28b1e52d05bdcd7e68fca6b0b2f5c43ffd0f56a9b7a50d54dcf9e31e
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH})
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# cleanup
|
||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/hifi-scribe/copyright COPYONLY)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
|
3
cmake/ports/nlohmann-json/CONTROL
Normal file
3
cmake/ports/nlohmann-json/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: nlohmann-json
|
||||
Version: 3.3.0
|
||||
Description: JSON for Modern C++
|
18
cmake/ports/nlohmann-json/portfile.cmake
Normal file
18
cmake/ports/nlohmann-json/portfile.cmake
Normal file
|
@ -0,0 +1,18 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
set(SOURCE_VERSION 3.3.0)
|
||||
|
||||
vcpkg_download_distfile(HEADER
|
||||
URLS "https://github.com/nlohmann/json/releases/download/v${SOURCE_VERSION}/json.hpp"
|
||||
FILENAME "nlohmann-json-${SOURCE_VERSION}.hpp"
|
||||
SHA512 c4e4bb84d1488f87a02c4e12409491225e345cc508e6dbbee1a3542fbd4953052c256d0fe78c4d3ce02d44c3a2155fe66f0c8a93a3851ddf94fec4f9f3fd6918
|
||||
)
|
||||
|
||||
vcpkg_download_distfile(LICENSE
|
||||
URLS "https://github.com/nlohmann/json/raw/v${SOURCE_VERSION}/LICENSE.MIT"
|
||||
FILENAME "nlohmann-json-LICENSE-${SOURCE_VERSION}.txt"
|
||||
SHA512 0fdb404547467f4523579acde53066badf458504d33edbb6e39df0ae145ed27d48a720189a60c225c0aab05f2aa4ce4050dcb241b56dc693f7ee9f54c8728a75
|
||||
)
|
||||
|
||||
file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include/nlohmann RENAME json.hpp)
|
||||
file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/nlohmann-json RENAME copyright)
|
3
cmake/ports/nvtt/CONTROL
Normal file
3
cmake/ports/nvtt/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: nvtt
|
||||
Version: 8c7e6b40ee5095f227b75880fabd89c99d6f34c0
|
||||
Description: Texture processing tools with support for Direct3D 10 and 11 formats.
|
39
cmake/ports/nvtt/portfile.cmake
Normal file
39
cmake/ports/nvtt/portfile.cmake
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Common Ambient Variables:
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
|
||||
# PORT is the current port name (zlib, etc)
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
#
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO highfidelity/nvidia-texture-tools
|
||||
REF 8c7e6b40ee5095f227b75880fabd89c99d6f34c0
|
||||
SHA512 f107d19dbbd6651ef2126b1422a5db8db291bf70311ac4fb1dbacb5ceaa8752fee38becbd32964f57596f0b84e1223bb2c3ff9d9c4fdc65c3e77a47836657cef
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_TOOLS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
# Handle copyright
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/share/doc/nvtt/LICENSE)
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvtt)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvtt/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvtt/copyright)
|
3
cmake/ports/openssl-android/CONTROL
Normal file
3
cmake/ports/openssl-android/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: openssl-android
|
||||
Version: 1.0.2p
|
||||
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.
|
125
cmake/ports/openssl-android/LICENSE.txt
Normal file
125
cmake/ports/openssl-android/LICENSE.txt
Normal file
|
@ -0,0 +1,125 @@
|
|||
|
||||
LICENSE ISSUES
|
||||
==============
|
||||
|
||||
The OpenSSL toolkit stays under a double license, i.e. both the conditions of
|
||||
the OpenSSL License and the original SSLeay license apply to the toolkit.
|
||||
See below for the actual license texts.
|
||||
|
||||
OpenSSL License
|
||||
---------------
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2018 The OpenSSL Project. 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. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED 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 OpenSSL PROJECT OR
|
||||
* ITS 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.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
Original SSLeay License
|
||||
-----------------------
|
||||
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@cryptsoft.com).
|
||||
* The implementation was written so as to conform with Netscapes SSL.
|
||||
*
|
||||
* This library is free for commercial and non-commercial use as long as
|
||||
* the following conditions are aheared to. The following conditions
|
||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||
* included with this distribution is covered by the same copyright terms
|
||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
* the code are not to be removed.
|
||||
* If this package is used in a product, Eric Young should be given attribution
|
||||
* as the author of the parts of the library used.
|
||||
* This can be in the form of a textual message at program startup or
|
||||
* in documentation (online or textual) provided with the package.
|
||||
*
|
||||
* 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 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* "This product includes cryptographic software written by
|
||||
* Eric Young (eay@cryptsoft.com)"
|
||||
* The word 'cryptographic' can be left out if the rouines from the library
|
||||
* being used are not cryptographic related :-).
|
||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||
* the apps directory (application code) you must include an acknowledgement:
|
||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
|
||||
*
|
||||
* The licence and distribution terms for any publically available version or
|
||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
24
cmake/ports/openssl-android/portfile.cmake
Normal file
24
cmake/ports/openssl-android/portfile.cmake
Normal file
|
@ -0,0 +1,24 @@
|
|||
include(vcpkg_common_functions)
|
||||
set(OPENSSL_VERSION 1.1.0g)
|
||||
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
|
||||
|
||||
message("MASTER_COPY_SOURCE_PATH ${MASTER_COPY_SOURCE_PATH}")
|
||||
vcpkg_download_distfile(
|
||||
OPENSSL_SOURCE_ARCHIVE
|
||||
URLS https://hifi-public.s3.amazonaws.com/dependencies/android/openssl-1.1.0g_armv8.tgz?versionId=AiiPjmgUZTgNj7YV1EEx2lL47aDvvvAW
|
||||
SHA512 5d7bb6e5d3db2340449e2789bcd72da821f0e57483bac46cf06f735dffb5d73c1ca7cc53dd48f3b3979d0fe22b3ae61997c516fc0c4611af4b4b7f480e42b992
|
||||
FILENAME openssl-1.1.0g_armv8.tgz
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE})
|
||||
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(GLOB LIBS ${MASTER_COPY_SOURCE_PATH}/lib/*.a)
|
||||
file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/libs)
|
||||
file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/libs)
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl-android RENAME copyright)
|
||||
|
||||
|
||||
|
||||
|
||||
|
136
cmake/ports/openssl-unix/CMakeLists.txt
Normal file
136
cmake/ports/openssl-unix/CMakeLists.txt
Normal file
|
@ -0,0 +1,136 @@
|
|||
cmake_minimum_required(VERSION 3.9)
|
||||
project(openssl C)
|
||||
|
||||
if(NOT SOURCE_PATH)
|
||||
message(FATAL_ERROR "Requires SOURCE_PATH")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
set(PLATFORM android)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
|
||||
set(PLATFORM linux-generic64)
|
||||
else()
|
||||
set(PLATFORM linux-generic32)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(PLATFORM darwin64-x86_64-cc)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
set(PLATFORM BSD-generic64)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown platform")
|
||||
endif()
|
||||
|
||||
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_C_FLAGS=${CMAKE_C_FLAGS}")
|
||||
message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}")
|
||||
message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}")
|
||||
message("CMAKE_INCLUDE_SYSTEM_FLAG_C=${CMAKE_INCLUDE_SYSTEM_FLAG_C}")
|
||||
|
||||
set(CFLAGS "${CMAKE_C_FLAGS}")
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_TARGET)
|
||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}")
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN)
|
||||
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${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}")
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "^ " "" CFLAGS "${CFLAGS}")
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT};$ENV{PATH}")
|
||||
else()
|
||||
file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT}:$ENV{PATH}")
|
||||
endif()
|
||||
set(ENV{ANDROID_DEV} "${CMAKE_SYSROOT}/usr")
|
||||
set(ENV{CC} "${CMAKE_C_COMPILER}")
|
||||
|
||||
message("ENV{ANDROID_DEV}=$ENV{ANDROID_DEV}")
|
||||
|
||||
get_filename_component(SOURCE_PATH_NAME "${SOURCE_PATH}" NAME)
|
||||
set(BUILDDIR "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_PATH_NAME}")
|
||||
|
||||
if(NOT EXISTS "${BUILDDIR}")
|
||||
file(COPY ${SOURCE_PATH} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
get_filename_component(MSYS_BIN_DIR "${MAKE}" DIRECTORY)
|
||||
|
||||
|
||||
file(READ "${BUILDDIR}/Configure" _contents)
|
||||
string(REPLACE "-mandroid" "" _contents "${_contents}")
|
||||
file(WRITE "${BUILDDIR}/Configure" "${_contents}")
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(SHARED shared)
|
||||
else()
|
||||
set(SHARED no-shared)
|
||||
endif()
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
set(ENV_COMMAND set)
|
||||
set(PATH_VAR ";%PATH%")
|
||||
else()
|
||||
set(ENV_COMMAND export)
|
||||
set(PATH_VAR ":$ENV{PATH}")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${BUILDDIR}/Makefile"
|
||||
COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER}
|
||||
COMMAND ${ENV_COMMAND} AR=${CMAKE_AR}
|
||||
COMMAND ${ENV_COMMAND} LD=${CMAKE_LINKER}
|
||||
COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB}
|
||||
COMMAND ${ENV_COMMAND} MAKE=${MAKE}
|
||||
COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER}
|
||||
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
|
||||
COMMAND "${PERL}" Configure
|
||||
${SHARED}
|
||||
enable-static-engine
|
||||
no-ssl2
|
||||
no-krb5
|
||||
no-idea
|
||||
no-bf
|
||||
no-cast
|
||||
no-seed
|
||||
no-md2
|
||||
${PLATFORM}
|
||||
"--prefix=${CMAKE_INSTALL_PREFIX}"
|
||||
"--openssldir=/etc/ssl"
|
||||
${CFLAGS}
|
||||
COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake"
|
||||
VERBATIM
|
||||
WORKING_DIRECTORY "${BUILDDIR}"
|
||||
)
|
||||
|
||||
add_custom_target(depend
|
||||
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
|
||||
COMMAND "${MAKE}" links # depend MAKEDEPPROG=${CMAKE_C_COMPILER}
|
||||
VERBATIM
|
||||
WORKING_DIRECTORY "${BUILDDIR}"
|
||||
DEPENDS "${BUILDDIR}/Makefile"
|
||||
)
|
||||
add_custom_target(build_libs ALL
|
||||
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h"
|
||||
COMMAND "${MAKE}" build_libs
|
||||
VERBATIM
|
||||
WORKING_DIRECTORY "${BUILDDIR}"
|
||||
DEPENDS depend
|
||||
BYPRODUCTS "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
|
||||
DESTINATION lib
|
||||
)
|
3
cmake/ports/openssl-unix/CONTROL
Normal file
3
cmake/ports/openssl-unix/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: openssl-unix
|
||||
Version: 1.0.2p
|
||||
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.
|
13
cmake/ports/openssl-unix/ConfigureIncludeQuotesFix.patch
Normal file
13
cmake/ports/openssl-unix/ConfigureIncludeQuotesFix.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Configure b/Configure
|
||||
index c98107a..77ad9d3 100644
|
||||
--- a/Configure
|
||||
+++ b/Configure
|
||||
@@ -972,7 +972,7 @@ PROCESS_ARGS:
|
||||
}
|
||||
elsif (/^--with-zlib-include=(.*)$/)
|
||||
{
|
||||
- $withargs{"zlib-include"}="-I$1";
|
||||
+ $withargs{"zlib-include"}="-I\"$1\"";
|
||||
}
|
||||
elsif (/^--with-fipsdir=(.*)$/)
|
||||
{
|
25
cmake/ports/openssl-unix/EmbedSymbolsInStaticLibsZ7.patch
Normal file
25
cmake/ports/openssl-unix/EmbedSymbolsInStaticLibsZ7.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl
|
||||
index dba96cb..5722f6e 100644
|
||||
--- a/util/pl/VC-32.pl
|
||||
+++ b/util/pl/VC-32.pl
|
||||
@@ -154,9 +154,17 @@ else
|
||||
$cflags=$opt_cflags.$base_cflags;
|
||||
}
|
||||
|
||||
-# generate symbols.pdb unconditionally
|
||||
-$app_cflag.=" /Zi /Fd\$(TMP_D)/app";
|
||||
-$lib_cflag.=" /Zi /Fd\$(TMP_D)/lib";
|
||||
+# generate symbols.pdb when building dlls and embed symbols when building static libs
|
||||
+if ($shlib)
|
||||
+ {
|
||||
+ $app_cflag.=" /Zi /Fd\$(TMP_D)/app.pdb";
|
||||
+ $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib.pdb";
|
||||
+ }
|
||||
+else
|
||||
+ {
|
||||
+ $app_cflag.=" /Z7";
|
||||
+ $lib_cflag.=" /Z7";
|
||||
+ }
|
||||
$lflags.=" /debug";
|
||||
|
||||
$obj='.obj';
|
23
cmake/ports/openssl-unix/STRINGIFYPatch.patch
Normal file
23
cmake/ports/openssl-unix/STRINGIFYPatch.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
diff --git a/crypto/cversion.c b/crypto/cversion.c
|
||||
index bfff699..17b7912 100644
|
||||
--- a/crypto/cversion.c
|
||||
+++ b/crypto/cversion.c
|
||||
@@ -56,6 +56,9 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
+#define STRINGIFY2(x) #x
|
||||
+#define STRINGIFY(x) STRINGIFY2(x)
|
||||
+
|
||||
#include "cryptlib.h"
|
||||
|
||||
#ifndef NO_WINDOWS_BRAINDEATH
|
||||
@@ -79,7 +82,7 @@ const char *SSLeay_version(int t)
|
||||
}
|
||||
if (t == SSLEAY_CFLAGS) {
|
||||
#ifdef CFLAGS
|
||||
- return (CFLAGS);
|
||||
+ return STRINGIFY(CFLAGS);
|
||||
#else
|
||||
return ("compiler: information not available");
|
||||
#endif
|
63
cmake/ports/openssl-unix/portfile.cmake
Normal file
63
cmake/ports/openssl-unix/portfile.cmake
Normal file
|
@ -0,0 +1,63 @@
|
|||
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})
|
||||
|
||||
vcpkg_find_acquire_program(PERL)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make)
|
||||
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
|
||||
set(MAKE ${MSYS_ROOT}/usr/bin/make.exe)
|
||||
else()
|
||||
find_program(MAKE make)
|
||||
if(NOT MAKE)
|
||||
message(FATAL_ERROR "Could not find make. Please install it through your package manager.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH}
|
||||
-DPERL=${PERL}
|
||||
-DMAKE=${MAKE}
|
||||
OPTIONS_RELEASE
|
||||
-DINSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h)
|
||||
set(RESOLVED_HEADERS)
|
||||
foreach(HEADER ${HEADERS})
|
||||
get_filename_component(X "${HEADER}" REALPATH)
|
||||
list(APPEND RESOLVED_HEADERS "${X}")
|
||||
endforeach()
|
||||
|
||||
file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl)
|
||||
file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl-unix RENAME copyright)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl)
|
||||
endif()
|
||||
|
||||
vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE)
|
7
cmake/ports/openssl-unix/remove-deps.cmake
Normal file
7
cmake/ports/openssl-unix/remove-deps.cmake
Normal file
|
@ -0,0 +1,7 @@
|
|||
file(GLOB_RECURSE MAKEFILES ${DIR}/*/Makefile)
|
||||
foreach(MAKEFILE ${MAKEFILES})
|
||||
message("removing deps from ${MAKEFILE}")
|
||||
file(READ "${MAKEFILE}" _contents)
|
||||
string(REGEX REPLACE "\n# DO NOT DELETE THIS LINE.*" "" _contents "${_contents}")
|
||||
file(WRITE "${MAKEFILE}" "${_contents}")
|
||||
endforeach()
|
4
cmake/ports/openssl-unix/usage
Normal file
4
cmake/ports/openssl-unix/usage
Normal file
|
@ -0,0 +1,4 @@
|
|||
The package openssl is compatible with built-in CMake targets:
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
10
cmake/ports/openssl-unix/vcpkg-cmake-wrapper.cmake
Normal file
10
cmake/ports/openssl-unix/vcpkg-cmake-wrapper.cmake
Normal file
|
@ -0,0 +1,10 @@
|
|||
_find_package(${ARGS})
|
||||
if(OPENSSL_FOUND)
|
||||
find_library(OPENSSL_DL_LIBRARY NAMES dl)
|
||||
if(OPENSSL_DL_LIBRARY)
|
||||
list(APPEND OPENSSL_LIBRARIES "dl")
|
||||
if(TARGET OpenSSL::Crypto)
|
||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
3
cmake/ports/openssl-windows/CONTROL
Normal file
3
cmake/ports/openssl-windows/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: openssl-windows
|
||||
Version: 1.0.2p-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.
|
13
cmake/ports/openssl-windows/ConfigureIncludeQuotesFix.patch
Normal file
13
cmake/ports/openssl-windows/ConfigureIncludeQuotesFix.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Configure b/Configure
|
||||
index c98107a..77ad9d3 100644
|
||||
--- a/Configure
|
||||
+++ b/Configure
|
||||
@@ -972,7 +972,7 @@ PROCESS_ARGS:
|
||||
}
|
||||
elsif (/^--with-zlib-include=(.*)$/)
|
||||
{
|
||||
- $withargs{"zlib-include"}="-I$1";
|
||||
+ $withargs{"zlib-include"}="-I\"$1\"";
|
||||
}
|
||||
elsif (/^--with-fipsdir=(.*)$/)
|
||||
{
|
25
cmake/ports/openssl-windows/EmbedSymbolsInStaticLibsZ7.patch
Normal file
25
cmake/ports/openssl-windows/EmbedSymbolsInStaticLibsZ7.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl
|
||||
index dba96cb..5722f6e 100644
|
||||
--- a/util/pl/VC-32.pl
|
||||
+++ b/util/pl/VC-32.pl
|
||||
@@ -154,9 +154,17 @@ else
|
||||
$cflags=$opt_cflags.$base_cflags;
|
||||
}
|
||||
|
||||
-# generate symbols.pdb unconditionally
|
||||
-$app_cflag.=" /Zi /Fd\$(TMP_D)/app";
|
||||
-$lib_cflag.=" /Zi /Fd\$(TMP_D)/lib";
|
||||
+# generate symbols.pdb when building dlls and embed symbols when building static libs
|
||||
+if ($shlib)
|
||||
+ {
|
||||
+ $app_cflag.=" /Zi /Fd\$(TMP_D)/app.pdb";
|
||||
+ $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib.pdb";
|
||||
+ }
|
||||
+else
|
||||
+ {
|
||||
+ $app_cflag.=" /Z7";
|
||||
+ $lib_cflag.=" /Z7";
|
||||
+ }
|
||||
$lflags.=" /debug";
|
||||
|
||||
$obj='.obj';
|
23
cmake/ports/openssl-windows/STRINGIFYPatch.patch
Normal file
23
cmake/ports/openssl-windows/STRINGIFYPatch.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
diff --git a/crypto/cversion.c b/crypto/cversion.c
|
||||
index bfff699..17b7912 100644
|
||||
--- a/crypto/cversion.c
|
||||
+++ b/crypto/cversion.c
|
||||
@@ -56,6 +56,9 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
+#define STRINGIFY2(x) #x
|
||||
+#define STRINGIFY(x) STRINGIFY2(x)
|
||||
+
|
||||
#include "cryptlib.h"
|
||||
|
||||
#ifndef NO_WINDOWS_BRAINDEATH
|
||||
@@ -79,7 +82,7 @@ const char *SSLeay_version(int t)
|
||||
}
|
||||
if (t == SSLEAY_CFLAGS) {
|
||||
#ifdef CFLAGS
|
||||
- return (CFLAGS);
|
||||
+ return STRINGIFY(CFLAGS);
|
||||
#else
|
||||
return ("compiler: information not available");
|
||||
#endif
|
163
cmake/ports/openssl-windows/portfile.cmake
Normal file
163
cmake/ports/openssl-windows/portfile.cmake
Normal file
|
@ -0,0 +1,163 @@
|
|||
if(VCPKG_CMAKE_SYSTEM_NAME)
|
||||
message(FATAL_ERROR "This port is only for building openssl on Windows Desktop")
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(OPENSSL_VERSION 1.0.2p)
|
||||
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION})
|
||||
|
||||
vcpkg_find_acquire_program(PERL)
|
||||
|
||||
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
||||
set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}")
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
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_find_acquire_program(NASM)
|
||||
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
|
||||
set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}")
|
||||
|
||||
vcpkg_find_acquire_program(JOM)
|
||||
|
||||
set(CONFIGURE_COMMAND ${PERL} Configure
|
||||
enable-static-engine
|
||||
enable-capieng
|
||||
no-ssl2
|
||||
-utf-8
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(OPENSSL_ARCH VC-WIN32)
|
||||
set(OPENSSL_DO "ms\\do_nasm.bat")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
set(OPENSSL_ARCH VC-WIN64A)
|
||||
set(OPENSSL_DO "ms\\do_win64a.bat")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(OPENSSL_MAKEFILE "ms\\ntdll.mak")
|
||||
else()
|
||||
set(OPENSSL_MAKEFILE "ms\\nt.mak")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||
set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/openssl-${OPENSSL_VERSION})
|
||||
set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR})
|
||||
|
||||
message(STATUS "Configure ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
|
||||
LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel
|
||||
)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${OPENSSL_DO}
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
|
||||
LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel
|
||||
)
|
||||
message(STATUS "Configure ${TARGET_TRIPLET}-rel done")
|
||||
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-rel")
|
||||
# Openssl's buildsystem has a race condition which will cause JOM to fail at some point.
|
||||
# This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build.
|
||||
make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl)
|
||||
execute_process(
|
||||
COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE}
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
|
||||
OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log
|
||||
ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log
|
||||
)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND nmake -f ${OPENSSL_MAKEFILE} install
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
|
||||
LOGNAME build-${TARGET_TRIPLET}-rel-1)
|
||||
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-rel done")
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
message(STATUS "Configure ${TARGET_TRIPLET}-dbg")
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||
set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/openssl-${OPENSSL_VERSION})
|
||||
set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug)
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
|
||||
LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg
|
||||
)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${OPENSSL_DO}
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
|
||||
LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg
|
||||
)
|
||||
message(STATUS "Configure ${TARGET_TRIPLET}-dbg done")
|
||||
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-dbg")
|
||||
make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl)
|
||||
execute_process(
|
||||
COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE}
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
|
||||
OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log
|
||||
ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log
|
||||
)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND nmake -f ${OPENSSL_MAKEFILE} install
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
|
||||
LOGNAME build-${TARGET_TRIPLET}-dbg-1)
|
||||
|
||||
message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
|
||||
endif()
|
||||
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe
|
||||
${CURRENT_PACKAGES_DIR}/debug/openssl.cnf
|
||||
${CURRENT_PACKAGES_DIR}/openssl.cnf
|
||||
)
|
||||
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openssl/)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/openssl.exe ${CURRENT_PACKAGES_DIR}/tools/openssl/openssl.exe)
|
||||
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openssl)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
# They should be empty, only the exes deleted above were in these directories
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/)
|
||||
endif()
|
||||
|
||||
file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents)
|
||||
string(REPLACE "<winsock.h>" "<winsock2.h>" _contents "${_contents}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}")
|
||||
|
||||
file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents)
|
||||
string(REPLACE "# include <windows.h>" "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include <windows.h>" _contents "${_contents}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE)
|
4
cmake/ports/openssl-windows/usage
Normal file
4
cmake/ports/openssl-windows/usage
Normal file
|
@ -0,0 +1,4 @@
|
|||
The package openssl is compatible with built-in CMake targets:
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
4
cmake/ports/openssl/CONTROL
Normal file
4
cmake/ports/openssl/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: openssl
|
||||
Version: 0
|
||||
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.
|
||||
Build-Depends: openssl-windows (windows), openssl-android (android), openssl-unix (!android&!windows)
|
2
cmake/ports/openssl/portfile.cmake
Normal file
2
cmake/ports/openssl/portfile.cmake
Normal file
|
@ -0,0 +1,2 @@
|
|||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl/)
|
4
cmake/ports/openssl/usage
Normal file
4
cmake/ports/openssl/usage
Normal file
|
@ -0,0 +1,4 @@
|
|||
The package openssl is compatible with built-in CMake targets:
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
3
cmake/ports/openvr/CONTROL
Normal file
3
cmake/ports/openvr/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: openvr
|
||||
Version: 1.0.16
|
||||
Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting.
|
47
cmake/ports/openvr/portfile.cmake
Normal file
47
cmake/ports/openvr/portfile.cmake
Normal file
|
@ -0,0 +1,47 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ValveSoftware/openvr
|
||||
REF v1.0.16
|
||||
SHA512 967356563ba4232da5361510c7519d3058e09eced4571aadc00d8a75ab1f299a0aebda2b0b10b0ffb6c6a443fd718634d0c0103964e289961449c93e8d7b9d02
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
set(ARCH_PATH "win64")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(ARCH_PATH "win32")
|
||||
else()
|
||||
message(FATAL_ERROR "Package only supports x64 and x86 windows.")
|
||||
endif()
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME)
|
||||
message(FATAL_ERROR "Package only supports windows desktop.")
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY
|
||||
${CURRENT_PACKAGES_DIR}/lib
|
||||
${CURRENT_PACKAGES_DIR}/bin
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
)
|
||||
file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/openvr_api.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/openvr_api.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(COPY
|
||||
${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.dll
|
||||
${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.pdb
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
||||
)
|
||||
file(COPY
|
||||
${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.dll
|
||||
${SOURCE_PATH}/bin/${ARCH_PATH}/openvr_api.pdb
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
)
|
||||
file(COPY ${SOURCE_PATH}/headers DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/headers ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvr)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/openvr/LICENSE ${CURRENT_PACKAGES_DIR}/share/openvr/copyright)
|
3
cmake/ports/sdl2/CONTROL
Normal file
3
cmake/ports/sdl2/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: sdl2
|
||||
Version: 2.0.8-1
|
||||
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.
|
206
cmake/ports/sdl2/enable-winrt-cmake.patch
Normal file
206
cmake/ports/sdl2/enable-winrt-cmake.patch
Normal file
|
@ -0,0 +1,206 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 73d9407..082fbc5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -3,7 +3,11 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
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()
|
||||
|
||||
# !!! 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)
|
||||
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})
|
||||
+ 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)
|
||||
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)
|
||||
+ 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()
|
||||
|
||||
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)
|
||||
+ endif()
|
||||
|
||||
- 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)
|
||||
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)
|
||||
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
|
||||
+ ${SDL2_SOURCE_DIR}/src/video/winrt/*.c
|
||||
+ ${SDL2_SOURCE_DIR}/src/video/winrt/*.cpp
|
||||
+ ${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)
|
||||
+ endif()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES})
|
||||
|
||||
- if(RENDER_D3D AND HAVE_D3D_H)
|
||||
+ if(RENDER_D3D AND HAVE_D3D_H AND NOT WINDOWS_STORE)
|
||||
set(SDL_VIDEO_RENDER_D3D 1)
|
||||
set(HAVE_RENDER_D3D TRUE)
|
||||
endif()
|
||||
@@ -1249,20 +1284,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)
|
||||
+ 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)
|
||||
+ 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)
|
||||
+ endif()
|
||||
|
||||
# TODO: in configure.in the check for timers is set on
|
||||
# cygwin | mingw32* - does this include mingw32CE?
|
||||
@@ -1284,7 +1330,7 @@ elseif(WINDOWS)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||
|
||||
if(SDL_VIDEO)
|
||||
- if(VIDEO_OPENGL)
|
||||
+ if(VIDEO_OPENGL AND NOT WINDOWS_STORE)
|
||||
set(SDL_VIDEO_OPENGL 1)
|
||||
set(SDL_VIDEO_OPENGL_WGL 1)
|
||||
set(SDL_VIDEO_RENDER_OGL 1)
|
||||
@@ -1688,9 +1734,11 @@ 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")
|
||||
+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
|
||||
--- a/include/SDL_config.h.cmake
|
||||
+++ b/include/SDL_config.h.cmake
|
||||
@@ -298,6 +298,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@
|
||||
+#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@
|
||||
#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 @@
|
||||
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
|
||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
||||
+#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@
|
||||
#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 @@
|
||||
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
|
||||
|
||||
/* Platform specific definitions */
|
||||
-#if !defined(__WIN32__)
|
||||
+#if !defined(__WIN32__) && !defined(__WINRT__)
|
||||
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
typedef unsigned int size_t;
|
||||
typedef signed char int8_t;
|
24
cmake/ports/sdl2/export-symbols-only-in-shared-build.patch
Normal file
24
cmake/ports/sdl2/export-symbols-only-in-shared-build.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
# HG changeset patch
|
||||
# User Mikhail Paulyshka <me@mixaill.tk>
|
||||
# Date 1506252750 -10800
|
||||
# Sun Sep 24 14:32:30 2017 +0300
|
||||
# Branch SDL2-WIN-SYMBOLS_LEACKAGE
|
||||
# Node ID 46ec9baae30cd4e0c584de125cae4a3cce2864ad
|
||||
# Parent 8df7a59b55283aa09889522369a2b32674c048de
|
||||
win32: fix symbols leakage for static libraries
|
||||
|
||||
diff -r 8df7a59b5528 -r 46ec9baae30c include/begin_code.h
|
||||
--- a/include/begin_code.h Fri Sep 22 11:25:52 2017 -0700
|
||||
+++ b/include/begin_code.h Sun Sep 24 14:32:30 2017 +0300
|
||||
@@ -58,8 +58,10 @@
|
||||
# else
|
||||
# define DECLSPEC __declspec(dllimport)
|
||||
# endif
|
||||
+# elif defined(_DLL)
|
||||
+# define DECLSPEC __declspec(dllexport)
|
||||
# else
|
||||
-# define DECLSPEC __declspec(dllexport)
|
||||
+# define DECLSPEC
|
||||
# endif
|
||||
# elif defined(__OS2__)
|
||||
# ifdef BUILD_SDL
|
79
cmake/ports/sdl2/portfile.cmake
Normal file
79
cmake/ports/sdl2/portfile.cmake
Normal file
|
@ -0,0 +1,79 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO SDL-Mirror/SDL
|
||||
REF release-2.0.8
|
||||
SHA512 5922dbeb14bb22991160251664b417d3f846867c18b5ecc1bd19c328ffd69b16252b7d45b9a317bafd1207fdb66d93a022dfb239e02447db9babd941956b6b37
|
||||
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
|
||||
)
|
||||
|
||||
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)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DSDL_STATIC=${SDL_STATIC}
|
||||
-DSDL_SHARED=${SDL_SHARED}
|
||||
-DVIDEO_VULKAN=OFF
|
||||
-DFORCE_STATIC_VCRT=${FORCE_STATIC_VCRT}
|
||||
-DLIBC=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/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")
|
||||
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/SDL2.framework/Resources")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "SDL2.framework/Resources")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/debug/include
|
||||
${CURRENT_PACKAGES_DIR}/debug/share
|
||||
${CURRENT_PACKAGES_DIR}/bin/sdl2-config
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/sdl2-config
|
||||
${CURRENT_PACKAGES_DIR}/SDL2.framework
|
||||
${CURRENT_PACKAGES_DIR}/debug/SDL2.framework
|
||||
)
|
||||
|
||||
file(GLOB BINS ${CURRENT_PACKAGES_DIR}/debug/bin/* ${CURRENT_PACKAGES_DIR}/bin/*)
|
||||
if(NOT BINS)
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/bin
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib)
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib)
|
||||
endif()
|
||||
|
||||
file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/sdl2/*.cmake)
|
||||
foreach(SHARE_FILE ${SHARE_FILES})
|
||||
file(READ "${SHARE_FILE}" _contents)
|
||||
string(REPLACE "lib/SDL2main" "lib/manual-link/SDL2main" _contents "${_contents}")
|
||||
file(WRITE "${SHARE_FILE}" "${_contents}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
|
@ -0,0 +1,30 @@
|
|||
From e8e12e856cbc41f9bdcc83bc87eb5013df199ee1 Mon Sep 17 00:00:00 2001
|
||||
From: vlj <vljn.ovi@gmail.com>
|
||||
Date: Fri, 2 Dec 2016 16:36:25 +0100
|
||||
Subject: [PATCH] Do not generate build-version.inc
|
||||
|
||||
---
|
||||
CMakeLists.txt | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a4c2fac..5544a2d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -53,8 +53,8 @@ add_subdirectory(libshaderc)
|
||||
add_subdirectory(glslc)
|
||||
add_subdirectory(examples)
|
||||
|
||||
-add_custom_target(build-version
|
||||
- ${PYTHON_EXE}
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
|
||||
- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
|
||||
- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
|
||||
+#add_custom_target(build-version
|
||||
+# ${PYTHON_EXE}
|
||||
+# ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
|
||||
+# ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
|
||||
+# COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
|
||||
--
|
||||
2.10.2.windows.1
|
||||
|
31
cmake/ports/shaderc/CMakeLists.txt
Normal file
31
cmake/ports/shaderc/CMakeLists.txt
Normal file
|
@ -0,0 +1,31 @@
|
|||
option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D})
|
||||
if(NOT SUFFIX_D)
|
||||
find_library(GLSLANG glslang)
|
||||
find_library(OSDEPENDENT OSDependent)
|
||||
find_library(OGLCOMPILER OGLCompiler)
|
||||
find_library(HLSLLIB HLSL)
|
||||
find_library(SPIRVLIB SPIRV)
|
||||
ELSE()
|
||||
find_library(GLSLANG glslangd)
|
||||
find_library(OSDEPENDENT OSDependentd)
|
||||
find_library(OGLCOMPILER OGLCompilerd)
|
||||
find_library(HLSLLIB HLSLd)
|
||||
find_library(SPIRVLIB SPIRVd)
|
||||
ENDIF()
|
||||
|
||||
add_library(glslang STATIC IMPORTED GLOBAL)
|
||||
set_property(TARGET glslang PROPERTY IMPORTED_LOCATION "${GLSLANG}")
|
||||
find_path(glslang_SOURCE_DIR glslang/Include/Common)
|
||||
set_property(TARGET glslang APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${glslang_SOURCE_DIR}")
|
||||
|
||||
add_library(OSDependent STATIC IMPORTED GLOBAL)
|
||||
set_property(TARGET OSDependent PROPERTY IMPORTED_LOCATION "${OSDEPENDENT}")
|
||||
|
||||
add_library(OGLCompiler STATIC IMPORTED GLOBAL)
|
||||
set_property(TARGET OGLCompiler PROPERTY IMPORTED_LOCATION "${OGLCOMPILER}")
|
||||
|
||||
add_library(HLSL STATIC IMPORTED GLOBAL)
|
||||
set_property(TARGET HLSL PROPERTY IMPORTED_LOCATION "${HLSLLIB}")
|
||||
|
||||
add_library(SPIRV STATIC IMPORTED GLOBAL)
|
||||
set_property(TARGET SPIRV PROPERTY IMPORTED_LOCATION "${SPIRVLIB}")
|
8
cmake/ports/shaderc/CMakeLists_spirv.txt
Normal file
8
cmake/ports/shaderc/CMakeLists_spirv.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
find_library(SPIRVTOOLSOPT SPIRV-Tools-opt)
|
||||
find_library(SPIRVTOOLS SPIRV-Tools)
|
||||
|
||||
add_library(SPIRV-Tools-opt STATIC IMPORTED GLOBAL)
|
||||
set_property(TARGET SPIRV-Tools-opt PROPERTY IMPORTED_LOCATION "${SPIRVTOOLSOPT}")
|
||||
|
||||
add_library(SPIRV-Tools STATIC IMPORTED GLOBAL)
|
||||
set_property(TARGET SPIRV-Tools PROPERTY IMPORTED_LOCATION "${SPIRVTOOLS}")
|
4
cmake/ports/shaderc/CONTROL
Normal file
4
cmake/ports/shaderc/CONTROL
Normal file
|
@ -0,0 +1,4 @@
|
|||
Source: shaderc
|
||||
Version: 2018.0-1
|
||||
Description: A collection of tools, libraries and tests for shader compilation.
|
||||
Build-Depends: glslang, spirv-tools
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue