mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 03:22:27 +02:00
🚧 WIP build with conan
Currently can only build the interface
This commit is contained in:
parent
ef6105c18d
commit
8d37f2b7d1
69 changed files with 93 additions and 2418 deletions
|
@ -18,10 +18,18 @@ cmake_minimum_required(VERSION 3.14)
|
|||
# This should allow using long paths on Windows
|
||||
SET(CMAKE_NINJA_FORCE_RESPONSE_FILE 1 CACHE INTERNAL "")
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
# read USE_GLES enviroment variable and sets it as GLES option
|
||||
# TODO still gets overwritten by "use GLES on linux aarch64"
|
||||
set(GLES_OPTION "$ENV{USE_GLES}")
|
||||
|
||||
# Instruct CMake to run moc automatically when needed.
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
# Instruct CMake to run rcc automatically when needed
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
# use GLES on linux aarch64
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
set(GLES_OPTION ON)
|
||||
|
@ -34,6 +42,8 @@ if (APPLE)
|
|||
set(ENV{MACOSX_DEPLOYMENT_TARGET} 10.11)
|
||||
endif()
|
||||
|
||||
set(EXTERNAL_BUILD_ASSETS "https://build-deps.overte.org")
|
||||
|
||||
set(RELEASE_TYPE "$ENV{RELEASE_TYPE}")
|
||||
if ((NOT "${RELEASE_TYPE}" STREQUAL "PRODUCTION") AND (NOT "${RELEASE_TYPE}" STREQUAL "PR"))
|
||||
set(RELEASE_TYPE "DEV")
|
||||
|
@ -57,8 +67,6 @@ if( NOT WIN32 )
|
|||
set(OVERTE_OPTIMIZE_FLAGS "")
|
||||
|
||||
if(OVERTE_OPTIMIZE)
|
||||
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/_env/OVERTE_OPTIMIZE.txt" "${OVERTE_OPTIMIZE}")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
message("Clang compiler detected, adding -O3 -fPIC -g flags")
|
||||
set(OVERTE_OPTIMIZE_FLAGS "-O3 -fPIC -g")
|
||||
|
@ -84,7 +92,6 @@ if( NOT WIN32 )
|
|||
endif()
|
||||
|
||||
if(DEFINED OVERTE_CPU_ARCHITECTURE)
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/_env/OVERTE_CPU_ARCHITECTURE.txt" "${OVERTE_CPU_ARCHITECTURE}")
|
||||
set(OVERTE_OPTIMIZE_FLAGS "${OVERTE_OPTIMIZE_FLAGS} ${OVERTE_CPU_ARCHITECTURE}")
|
||||
message("Adding CPU architecture flags: ${OVERTE_CPU_ARCHITECTURE}")
|
||||
MESSAGE(STATUS "OVERTE_CPU_ARCHITECTURE: ${OVERTE_CPU_ARCHITECTURE}")
|
||||
|
@ -329,12 +336,6 @@ endif()
|
|||
|
||||
set_packaging_parameters()
|
||||
|
||||
# Locate the required Qt build on the filesystem
|
||||
setup_qt()
|
||||
|
||||
if ("$ENV{OVERTE_USE_SYSTEM_QT}" STREQUAL "")
|
||||
list(APPEND CMAKE_PREFIX_PATH "${QT_CMAKE_PREFIX_PATH}")
|
||||
endif()
|
||||
|
||||
find_package( Threads )
|
||||
|
||||
|
|
|
@ -435,9 +435,9 @@ macro(AUTOSCRIBE_SHADER_LIBS)
|
|||
add_custom_command(
|
||||
OUTPUT ${SCRIBED_SHADERS} ${SPIRV_SHADERS} ${REFLECTED_SHADERS}
|
||||
COMMENT "Generating/updating shaders"
|
||||
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_SOURCE_DIR}/tools/shadergen.py
|
||||
COMMAND python ${CMAKE_SOURCE_DIR}/tools/shadergen.py
|
||||
--commands ${AUTOSCRIBE_SHADERGEN_COMMANDS_FILE}
|
||||
--tools-dir ${VCPKG_TOOLS_DIR}
|
||||
--tools-dir ${CMAKE_BINARY_DIR}/bin #${VCPKG_TOOLS_DIR}
|
||||
--build-dir ${CMAKE_CURRENT_BINARY_DIR}
|
||||
--source-dir ${CMAKE_SOURCE_DIR}
|
||||
${EXTRA_SHADERGEN_ARGS}
|
||||
|
|
|
@ -32,7 +32,7 @@ macro(PACKAGE_LIBRARIES_FOR_DEPLOYMENT)
|
|||
find_program(WINDEPLOYQT_COMMAND windeployqt PATHS ${QT_DIR}/bin NO_DEFAULT_PATH)
|
||||
|
||||
if (NOT WINDEPLOYQT_COMMAND)
|
||||
message(FATAL_ERROR "Could not find windeployqt at ${QT_DIR}/bin. windeployqt is required.")
|
||||
# message(FATAL_ERROR "Could not find windeployqt at ${QT_DIR}/bin. windeployqt is required.")
|
||||
endif ()
|
||||
|
||||
# add a post-build command to call windeployqt to copy Qt plugins
|
||||
|
|
|
@ -1,114 +0,0 @@
|
|||
# Created by Bradley Austin Davis on 2017/09/02
|
||||
# Copyright 2013-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
|
||||
#
|
||||
|
||||
# For understanding the execution flow followed by the Qt setup,
|
||||
# please look at the comment on top of hifi_qt.py
|
||||
|
||||
function(get_sub_directories result curdir)
|
||||
file(GLOB children RELATIVE ${curdir} ${curdir}/*)
|
||||
set(dirlist "")
|
||||
foreach(child ${children})
|
||||
if(IS_DIRECTORY ${curdir}/${child})
|
||||
LIST(APPEND dirlist ${child})
|
||||
endif()
|
||||
endforeach()
|
||||
set(${result} ${dirlist} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(calculate_qt5_version result _QT_DIR)
|
||||
# All Qt5 packages have little "private" include directories named with the actual Qt version such as:
|
||||
# .../include/QtCore/5.15.2/QtCore/private
|
||||
# Sometimes we need to include these private headers for debug hackery.
|
||||
# Hence we find one of these directories and pick apart its path to determine the actual QT_VERSION.
|
||||
if (APPLE)
|
||||
set(_QT_CORE_DIR "${_QT_DIR}/lib/QtCore.framework/Versions/5/Headers")
|
||||
else()
|
||||
set(_QT_CORE_DIR "${_QT_DIR}/include/QtCore")
|
||||
if(NOT EXISTS "${_QT_CORE_DIR}")
|
||||
set(_QT_CORE_DIR "${_QT_DIR}/include/qt5/QtCore")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT EXISTS "${_QT_CORE_DIR}")
|
||||
message(FATAL_ERROR "Could not find 'include/QtCore' in '${_QT_DIR}'")
|
||||
endif()
|
||||
set(subdirs "")
|
||||
get_sub_directories(subdirs ${_QT_CORE_DIR})
|
||||
|
||||
foreach(subdir ${subdirs})
|
||||
string(REGEX MATCH "5.[0-9]+.[0-9]+$" _QT_VERSION ${subdir})
|
||||
if (NOT "${_QT_VERSION}" STREQUAL "")
|
||||
# found it!
|
||||
set(${result} "${_QT_VERSION}" PARENT_SCOPE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# Sets the QT_CMAKE_PREFIX_PATH and QT_DIR variables
|
||||
# Also enables CMAKE_AUTOMOC and CMAKE_AUTORCC
|
||||
macro(setup_qt)
|
||||
if ($ENV{OVERTE_USE_SYSTEM_QT})
|
||||
message(STATUS "Using system Qt")
|
||||
else()
|
||||
# if we are in a development build and QT_CMAKE_PREFIX_PATH is specified
|
||||
# then use it,
|
||||
# otherwise, use the vcpkg'ed version
|
||||
if(NOT DEFINED QT_CMAKE_PREFIX_PATH)
|
||||
# Note: This comes from qt.cmake generated by hifi_qt.py
|
||||
# See the comment on top of hifi_qt.py for details.
|
||||
message(FATAL_ERROR "QT_CMAKE_PREFIX_PATH should have been set by hifi_qt.py through qt.cmake")
|
||||
endif()
|
||||
if (DEV_BUILD)
|
||||
if (DEFINED ENV{QT_CMAKE_PREFIX_PATH})
|
||||
set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# figure out where the qt dir is
|
||||
get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
|
||||
set(QT_VERSION "unknown")
|
||||
calculate_qt5_version(QT_VERSION "${QT_DIR}")
|
||||
if (QT_VERSION STREQUAL "unknown")
|
||||
message(FATAL_ERROR "Could not determine QT_VERSION")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# windows shell does not like backslashes expanded on the command line,
|
||||
# so convert all backslashes in the QT path to forward slashes
|
||||
string(REPLACE \\ / QT_CMAKE_PREFIX_PATH ${QT_CMAKE_PREFIX_PATH})
|
||||
string(REPLACE \\ / QT_DIR ${QT_DIR})
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${QT_CMAKE_PREFIX_PATH}/Qt5Core/Qt5CoreConfig.cmake")
|
||||
message(FATAL_ERROR "Unable to locate Qt5CoreConfig.cmake in '${QT_CMAKE_PREFIX_PATH}'")
|
||||
endif()
|
||||
|
||||
set(RCC_BINARY "${QT_DIR}/bin/rcc${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
|
||||
if(NOT EXISTS "${RCC_BINARY}")
|
||||
set(RCC_BINARY "${QT_DIR}/bin/rcc-qt5${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${RCC_BINARY}")
|
||||
message(FATAL_ERROR "Unable to locate rcc. Last looked in '${RCC_BINARY}'")
|
||||
endif()
|
||||
|
||||
|
||||
message(STATUS "Using Qt build in : '${QT_DIR}' with version ${QT_VERSION}")
|
||||
if (WIN32)
|
||||
add_paths_to_fixup_libs("${QT_DIR}/bin")
|
||||
endif ()
|
||||
|
||||
endif()
|
||||
|
||||
# Instruct CMake to run moc automatically when needed.
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
# Instruct CMake to run rcc automatically when needed
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
endmacro()
|
|
@ -1,15 +0,0 @@
|
|||
#
|
||||
# Copyright 2019 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_ARISTO)
|
||||
|
||||
if (WIN32)
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${VCPKG_INSTALL_ROOT}/include")
|
||||
find_library(ARISTO_LIBRARY NAMES aristo_interface PATHS ${VCPKG_INSTALL_ROOT}/lib/ NO_DEFAULT_PATH)
|
||||
target_link_libraries(${TARGET_NAME} ${ARISTO_LIBRARY})
|
||||
endif()
|
||||
|
||||
endmacro()
|
|
@ -18,13 +18,7 @@ macro(TARGET_BULLET)
|
|||
else()
|
||||
find_package(Bullet REQUIRED)
|
||||
endif()
|
||||
# perform the system include hack for OS X to ignore warnings
|
||||
if (APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${BULLET_INCLUDE_DIRS}")
|
||||
else()
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
|
||||
endif()
|
||||
target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES})
|
||||
target_link_libraries(${TARGET_NAME} Bullet::Bullet)
|
||||
endmacro()
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
macro(TARGET_DRACO)
|
||||
set(LIBS draco dracodec dracoenc)
|
||||
if (ANDROID)
|
||||
set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/draco)
|
||||
set(DRACO_INCLUDE_DIRS "${INSTALL_DIR}/include" CACHE STRING INTERNAL)
|
||||
|
@ -9,17 +8,7 @@ macro(TARGET_DRACO)
|
|||
list(APPEND DRACO_LIBRARIES ${LIB_DIR}/libdracoenc.a)
|
||||
target_link_libraries(${TARGET_NAME} ${DRACO_LIBRARIES})
|
||||
else()
|
||||
set(LIB_SEARCH_PATH_RELEASE ${VCPKG_INSTALL_ROOT}/lib/)
|
||||
set(LIB_SEARCH_PATH_DEBUG ${VCPKG_INSTALL_ROOT}/debug/lib/)
|
||||
set(DRACO_LIBRARY_RELEASE "")
|
||||
set(DRACO_LIBRARY_DEBUG "")
|
||||
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})
|
||||
find_package(draco REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} draco::draco)
|
||||
endif()
|
||||
endmacro()
|
||||
|
|
|
@ -13,11 +13,9 @@ macro(TARGET_ETC2COMP)
|
|||
set(ETC2COMP_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libEtcLib.a)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${ETC2COMP_INCLUDE_DIRS})
|
||||
else()
|
||||
find_library(ETC2COMP_LIBRARY_DEBUG EtcLib PATHS ${VCPKG_INSTALL_ROOT}/debug/lib/ NO_DEFAULT_PATH)
|
||||
find_library(ETC2COMP_LIBRARY_RELEASE EtcLib PATHS ${VCPKG_INSTALL_ROOT}/lib/ NO_DEFAULT_PATH)
|
||||
find_package(etc2comp REQUIRED)
|
||||
endif()
|
||||
|
||||
select_library_configurations(ETC2COMP)
|
||||
target_link_libraries(${TARGET_NAME} ${ETC2COMP_LIBRARIES})
|
||||
target_link_libraries(${TARGET_NAME} etc2comp::etc2comp)
|
||||
endmacro()
|
||||
|
||||
|
|
|
@ -17,17 +17,9 @@ macro(TARGET_GLAD)
|
|||
target_link_libraries(${TARGET_NAME} ${EGL})
|
||||
else()
|
||||
find_package(OpenGL REQUIRED)
|
||||
list(APPEND GLAD_EXTRA_LIBRARIES ${OPENGL_LIBRARY})
|
||||
find_library(GLAD_LIBRARY_RELEASE glad PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(GLAD_LIBRARY_DEBUG glad_d PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
select_library_configurations(GLAD)
|
||||
if (NOT WIN32)
|
||||
list(APPEND GLAD_EXTRA_LIBRARIES dl)
|
||||
endif()
|
||||
set(GLAD_INCLUDE_DIRS ${${GLAD_UPPER}_INCLUDE_DIRS})
|
||||
find_package(glad REQUIRED)
|
||||
endif()
|
||||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${GLAD_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${GLAD_LIBRARY})
|
||||
target_link_libraries(${TARGET_NAME} ${GLAD_EXTRA_LIBRARIES})
|
||||
target_link_libraries(${TARGET_NAME} OpenGL::GL glad::glad)
|
||||
# target_link_libraries(${TARGET_NAME} ${GLAD_EXTRA_LIBRARIES})
|
||||
endmacro()
|
||||
|
|
|
@ -10,7 +10,7 @@ macro(TARGET_GLM)
|
|||
target_include_directories(${TARGET_NAME} PUBLIC "${VCPKG_INSTALL_ROOT}/include")
|
||||
else()
|
||||
find_package(glm CONFIG REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} glm)
|
||||
target_link_libraries(${TARGET_NAME} glm::glm)
|
||||
endif()
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC GLM_FORCE_RADIANS)
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC GLM_ENABLE_EXPERIMENTAL)
|
||||
|
|
|
@ -7,5 +7,9 @@
|
|||
#
|
||||
macro(TARGET_JSON)
|
||||
# We use vcpkg for both json and glm, so we just re-use the target_glm macro here
|
||||
target_glm()
|
||||
# target_glm()
|
||||
|
||||
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} nlohmann_json::nlohmann_json)
|
||||
endmacro()
|
|
@ -1,4 +1,4 @@
|
|||
macro(target_liblo)
|
||||
find_library(LIBLO LIBLO)
|
||||
target_link_libraries(${TARGET_NAME} ${LIBLO})
|
||||
find_package(liblo REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} liblo::liblo)
|
||||
endmacro()
|
|
@ -17,12 +17,11 @@ macro(TARGET_NVTT)
|
|||
set(NVTT_LIBRARIES ${NVTT_LIBS} CACHE STRING INTERNAL)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${NVTT_INCLUDE_DIRS})
|
||||
else()
|
||||
find_library(NVTT_LIBRARY_RELEASE nvtt PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(NVTT_LIBRARY_DEBUG nvtt PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
select_library_configurations(NVTT)
|
||||
find_package(nvidia-texture-tools REQUIRED)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${TARGET_NAME} ${NVTT_LIBRARIES})
|
||||
target_link_libraries(${TARGET_NAME} nvidia-texture-tools::nvidia-texture-tools)
|
||||
|
||||
if ((NOT WIN32) AND (NOT ANDROID) AND (NOT APPLE))
|
||||
find_package(OpenMP)
|
||||
target_link_libraries(${TARGET_NAME} OpenMP::OpenMP_C OpenMP::OpenMP_CXX)
|
||||
|
|
|
@ -7,83 +7,7 @@
|
|||
#
|
||||
macro(TARGET_OPENEXR)
|
||||
if (NOT ANDROID)
|
||||
set(openexr_config_file "${VCPKG_INSTALL_ROOT}/include/OpenEXR/OpenEXRConfig.h")
|
||||
if(EXISTS ${openexr_config_file})
|
||||
file(STRINGS
|
||||
${openexr_config_file}
|
||||
TMP
|
||||
REGEX "#define OPENEXR_VERSION_STRING.*$")
|
||||
string(REGEX MATCHALL "[0-9.]+" OPENEXR_VERSION ${TMP})
|
||||
|
||||
file(STRINGS
|
||||
${openexr_config_file}
|
||||
TMP
|
||||
REGEX "#define OPENEXR_VERSION_MAJOR.*$")
|
||||
string(REGEX MATCHALL "[0-9]" OPENEXR_MAJOR_VERSION ${TMP})
|
||||
|
||||
file(STRINGS
|
||||
${openexr_config_file}
|
||||
TMP
|
||||
REGEX "#define OPENEXR_VERSION_MINOR.*$")
|
||||
string(REGEX MATCHALL "[0-9]" OPENEXR_MINOR_VERSION ${TMP})
|
||||
else()
|
||||
message(WARNING "Failed to find ${openexr_config_file}")
|
||||
endif()
|
||||
|
||||
set(OPENEXR_LIBRARY_RELEASE "")
|
||||
set(OPENEXR_LIBRARY_DEBUG "")
|
||||
foreach(OPENEXR_LIB
|
||||
OpenEXRCore
|
||||
OpenEXR
|
||||
OpenEXRUtil
|
||||
Iex
|
||||
IlmThread
|
||||
Imath
|
||||
)
|
||||
|
||||
# OpenEXR libraries may be suffixed with the version number, so we search
|
||||
# using both versioned and unversioned names.
|
||||
find_library(OPENEXR_${OPENEXR_LIB}_LIBRARY_RELEASE
|
||||
NAMES
|
||||
${OPENEXR_LIB}-${OPENEXR_MAJOR_VERSION}_${OPENEXR_MINOR_VERSION}
|
||||
${OPENEXR_LIB}_s
|
||||
|
||||
PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH
|
||||
)
|
||||
#mark_as_advanced(OPENEXR_${OPENEXR_LIB}_LIBRARY)
|
||||
|
||||
if(OPENEXR_${OPENEXR_LIB}_LIBRARY_RELEASE)
|
||||
list(APPEND OPENEXR_LIBRARY_RELEASE ${OPENEXR_${OPENEXR_LIB}_LIBRARY_RELEASE})
|
||||
else()
|
||||
message(WARNING "Failed to find ${OPENEXR_LIB} (release); ${OPENEXR_LIB}-${OPENEXR_MAJOR_VERSION}_${OPENEXR_MINOR_VERSION}")
|
||||
endif()
|
||||
|
||||
# OpenEXR libraries may be suffixed with the version number, so we search
|
||||
# using both versioned and unversioned names.
|
||||
find_library(OPENEXR_${OPENEXR_LIB}_LIBRARY_DEBUG
|
||||
NAMES
|
||||
${OPENEXR_LIB}-${OPENEXR_MAJOR_VERSION}_${OPENEXR_MINOR_VERSION}_d
|
||||
${OPENEXR_LIB}_s_d
|
||||
|
||||
PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH
|
||||
)
|
||||
#mark_as_advanced(OPENEXR_${OPENEXR_LIB}_DEBUG_LIBRARY)
|
||||
|
||||
if(OPENEXR_${OPENEXR_LIB}_LIBRARY_DEBUG)
|
||||
list(APPEND OPENEXR_LIBRARY_DEBUG ${OPENEXR_${OPENEXR_LIB}_LIBRARY_DEBUG})
|
||||
else()
|
||||
message(WARNING "Failed to find ${OPENEXR_LIB} (debug); ${OPENEXR_LIB}-${OPENEXR_MAJOR_VERSION}_${OPENEXR_MINOR_VERSION}_d")
|
||||
endif()
|
||||
endforeach(OPENEXR_LIB)
|
||||
|
||||
select_library_configurations(OPENEXR)
|
||||
target_link_libraries(${TARGET_NAME} ${OPENEXR_LIBRARY})
|
||||
target_include_directories(${TARGET_NAME} PUBLIC "${VCPKG_INSTALL_ROOT}/include/Imath")
|
||||
|
||||
# This prevents:
|
||||
# LNK2001 unresolved external symbol imath_half_to_float_table
|
||||
#
|
||||
# Apparently something changed in newer versions.
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC IMATH_HALF_NO_LOOKUP_TABLE)
|
||||
find_package(OpenEXR REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} openexr::openexr)
|
||||
endif()
|
||||
endmacro()
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
# 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 ${VCPKG_INSTALL_ROOT}/lib)
|
||||
find_library(OPENVR_LIBRARY_DEBUG NAMES openvr_api PATHS ${VCPKG_INSTALL_ROOT}/debug/lib)
|
||||
select_library_configurations(OPENVR)
|
||||
target_link_libraries(${TARGET_NAME} ${OPENVR_LIBRARY})
|
||||
find_package(OpenVR REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} openvr::openvr)
|
||||
endmacro()
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_opus)
|
||||
find_library(OPUS_LIBRARY_RELEASE NAMES opus PATHS ${VCPKG_INSTALL_ROOT}/lib)
|
||||
find_library(OPUS_LIBRARY_DEBUG NAMES opus PATHS ${VCPKG_INSTALL_ROOT}/debug/lib)
|
||||
select_library_configurations(OPUS)
|
||||
target_link_libraries(${TARGET_NAME} ${OPUS_LIBRARY})
|
||||
find_package(Opus REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} Opus::opus)
|
||||
endmacro()
|
||||
|
|
|
@ -13,16 +13,8 @@ macro(TARGET_POLYVOX)
|
|||
list(APPEND POLYVOX_LIBRARIES ${LIB_DIR}/libPolyVoxUtil.so)
|
||||
list(APPEND POLYVOX_LIBRARIES ${LIB_DIR}/Release/libPolyVoxCore.so)
|
||||
else()
|
||||
find_library(POLYVOX_LIBRARY_RELEASE PolyVoxCore PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(POLYVOX_UTIL_LIBRARY_RELEASE PolyVoxUtil PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
list(APPEND POLYVOX_LIBRARY_RELEASE ${POLYVOX_UTIL_LIBRARY_RELEASE})
|
||||
find_library(POLYVOX_LIBRARY_DEBUG PolyVoxCore PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
find_library(POLYVOX_UTIL_LIBRARY_DEBUG PolyVoxUtil PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
list(APPEND POLYVOX_LIBRARY_DEBUG ${POLYVOX_UTIL_LIBRARY_DEBUG})
|
||||
select_library_configurations(POLYVOX)
|
||||
list(APPEND POLYVOX_INCLUDE_DIRS ${VCPKG_INSTALL_ROOT}/include)
|
||||
find_package(polyvox REQUIRED)
|
||||
endif()
|
||||
target_link_libraries(${TARGET_NAME} ${POLYVOX_LIBRARIES})
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${POLYVOX_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} polyvox::polyvox)
|
||||
endmacro()
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_QUAZIP)
|
||||
find_library(QUAZIP_LIBRARY_RELEASE quazip5 PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(QUAZIP_LIBRARY_DEBUG quazip5 PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
select_library_configurations(QUAZIP)
|
||||
target_link_libraries(${TARGET_NAME} ${QUAZIP_LIBRARIES})
|
||||
find_package(QuaZip-Qt5 REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} QuaZip::QuaZip)
|
||||
endmacro()
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#
|
||||
# Copyright 2019 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_SRANIPAL)
|
||||
|
||||
if (WIN32)
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${VCPKG_INSTALL_ROOT}/include")
|
||||
find_library(SRANIPAL_LIBRARY NAMES SRanipal PATHS ${VCPKG_INSTALL_ROOT}/lib/ NO_DEFAULT_PATH)
|
||||
target_link_libraries(${TARGET_NAME} ${SRANIPAL_LIBRARY})
|
||||
|
||||
find_library(SRANIPAL_LIBRARY NAMES SRanipal PATHS ${VCPKG_INSTALL_ROOT}/lib/ NO_DEFAULT_PATH)
|
||||
target_link_libraries(${TARGET_NAME} ${SRANIPAL_LIBRARY})
|
||||
endif()
|
||||
|
||||
endmacro()
|
|
@ -18,7 +18,7 @@ if (ANDROID)
|
|||
else()
|
||||
# using VCPKG for TBB
|
||||
find_package(TBB CONFIG REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} TBB::tbb)
|
||||
target_link_libraries(${TARGET_NAME} onetbb::onetbb)
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
macro(TARGET_V8)
|
||||
|
||||
find_package(V8 REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${V8_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${V8_LIBRARIES})
|
||||
|
||||
find_package(libnode REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} libnode::libnode)
|
||||
endmacro()
|
|
@ -1,6 +1,4 @@
|
|||
macro(TARGET_VHACD)
|
||||
find_library(VHACD_LIBRARY_RELEASE VHACD PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(VHACD_LIBRARY_DEBUG VHACD PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
select_library_configurations(VHACD)
|
||||
target_link_libraries(${TARGET_NAME} ${VHACD_LIBRARIES})
|
||||
find_package(v-hacd REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} v-hacd::v-hacd)
|
||||
endmacro()
|
||||
|
|
|
@ -17,13 +17,7 @@ macro(TARGET_WEBRTC)
|
|||
# WebRTC is basically impossible to build on aarch64 Linux.
|
||||
# I am looking at https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing for an alternative.
|
||||
else()
|
||||
set(WEBRTC_INCLUDE_DIRS "${VCPKG_INSTALL_ROOT}/include/webrtc")
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${WEBRTC_INCLUDE_DIRS})
|
||||
find_library(WEBRTC_LIBRARY_RELEASE webrtc PATHS ${VCPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(WEBRTC_LIBRARY_DEBUG webrtc PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
select_library_configurations(WEBRTC)
|
||||
target_link_libraries(${TARGET_NAME} ${WEBRTC_LIBRARIES})
|
||||
#find_package(WebRTC REQUIRED)
|
||||
#target_link_libraries(${TARGET_NAME} WebRTC::WebRTC)
|
||||
endif()
|
||||
|
||||
|
||||
endmacro()
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
#
|
||||
# FindATL.cmake
|
||||
#
|
||||
# Try to find the ATL library needed to use the LibOVR
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# ATL_FOUND - system found ATL
|
||||
# ATL_LIBRARIES - Link this to use ATL
|
||||
#
|
||||
# Created on 8/13/2013 by Stephen Birarda
|
||||
# Copyright 2014 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
|
||||
#
|
||||
|
||||
if (WIN32)
|
||||
set(ATL_SEARCH_DIRS "C:\\WinDDK")
|
||||
find_path(ATL_INCLUDE_DIRS atlbase.h PATH_SUFFIXES "7600.16385.1/inc/atl71" HINTS ${ATL_SEARCH_DIRS})
|
||||
|
||||
find_library(ATL_LIBRARY_RELEASE atls PATH_SUFFIXES "7600.16385.1/lib/ATL/i386" HINTS ${ATL_SEARCH_DIRS})
|
||||
find_library(ATL_LIBRARY_DEBUG atlsd PATH_SUFFIXES "7600.16385.1/lib/ATL/i386" HINTS ${ATL_SEARCH_DIRS})
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(ATL)
|
||||
endif ()
|
||||
|
||||
set(ATL_LIBRARIES "${ATL_LIBRARY}")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ATL DEFAULT_MSG ATL_INCLUDE_DIRS ATL_LIBRARIES)
|
|
@ -1,24 +0,0 @@
|
|||
#
|
||||
# Try to find BOOSTCONFIG include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# BOOSTCONFIG_INCLUDE_DIRS
|
||||
#
|
||||
# Created by Bradley Austin Davis on 2015/05/22
|
||||
# Copyright 2015 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 BOOSTCONFIG search
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("BOOSTCONFIG")
|
||||
|
||||
# locate header
|
||||
find_path(BOOSTCONFIG_INCLUDE_DIRS "boost/config.hpp" HINTS ${BOOSTCONFIG_SEARCH_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(BOOSTCONFIG DEFAULT_MSG BOOSTCONFIG_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(BOOSTCONFIG_INCLUDE_DIRS BOOSTCONFIG_SEARCH_DIRS)
|
|
@ -1,91 +0,0 @@
|
|||
# - Try to find the Bullet physics engine
|
||||
#
|
||||
# This module defines the following variables
|
||||
#
|
||||
# BULLET_FOUND - Was bullet found
|
||||
# BULLET_INCLUDE_DIRS - the Bullet include directories
|
||||
# BULLET_LIBRARIES - Link to this, by default it includes
|
||||
# all bullet components (Dynamics,
|
||||
# Collision, LinearMath, & SoftBody)
|
||||
#
|
||||
# This module accepts the following variables
|
||||
#
|
||||
# BULLET_ROOT - Can be set to bullet install path or Windows build path
|
||||
#
|
||||
# Modified on 2015.01.15 by Andrew Meadows
|
||||
# This is an adapted version of the FindBullet.cmake module distributed with Cmake 2.8.12.2
|
||||
# The original license for that file is displayed below.
|
||||
#
|
||||
#=============================================================================
|
||||
# Copyright 2009 Kitware, Inc.
|
||||
# Copyright 2009 Philip Lowman <philip@yhbt.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.)
|
||||
|
||||
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("bullet")
|
||||
|
||||
macro(_FIND_BULLET_LIBRARY _var)
|
||||
set(_${_var}_NAMES ${ARGN})
|
||||
find_library(${_var}_LIBRARY_RELEASE
|
||||
NAMES ${_${_var}_NAMES}
|
||||
HINTS
|
||||
${BULLET_SEARCH_DIRS}
|
||||
$ENV{BULLET_ROOT_DIR}
|
||||
${BULLET_ROOT}
|
||||
PATH_SUFFIXES lib lib/Release out/release8/libs
|
||||
)
|
||||
|
||||
foreach(_NAME IN LISTS _${_var}_NAMES)
|
||||
list(APPEND _${_var}_DEBUG_NAMES "${_NAME}_Debug")
|
||||
list(APPEND _${_var}_DEBUG_NAMES "${_NAME}_d")
|
||||
endforeach()
|
||||
|
||||
find_library(${_var}_LIBRARY_DEBUG
|
||||
NAMES ${_${_var}_DEBUG_NAMES}
|
||||
HINTS
|
||||
${BULLET_SEARCH_DIRS}
|
||||
$ENV{BULLET_ROOT_DIR}
|
||||
${BULLET_ROOT}
|
||||
PATH_SUFFIXES lib lib/Debug out/debug8/libs
|
||||
)
|
||||
|
||||
select_library_configurations(${_var})
|
||||
|
||||
mark_as_advanced(${_var}_LIBRARY)
|
||||
mark_as_advanced(${_var}_LIBRARY)
|
||||
endmacro()
|
||||
|
||||
find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h
|
||||
HINTS
|
||||
${BULLET_SEARCH_DIRS}/include
|
||||
$ENV{BULLET_ROOT_DIR}
|
||||
${BULLET_ROOT}/include
|
||||
${BULLET_ROOT}/src
|
||||
PATH_SUFFIXES bullet
|
||||
)
|
||||
|
||||
# Find the libraries
|
||||
|
||||
_FIND_BULLET_LIBRARY(BULLET_DYNAMICS BulletDynamics)
|
||||
_FIND_BULLET_LIBRARY(BULLET_COLLISION BulletCollision)
|
||||
_FIND_BULLET_LIBRARY(BULLET_MATH BulletMath LinearMath)
|
||||
_FIND_BULLET_LIBRARY(BULLET_SOFTBODY BulletSoftBody)
|
||||
|
||||
set(BULLET_INCLUDE_DIRS ${BULLET_INCLUDE_DIR})
|
||||
set(BULLET_LIBRARIES ${BULLET_DYNAMICS_LIBRARY} ${BULLET_COLLISION_LIBRARY} ${BULLET_MATH_LIBRARY} ${BULLET_SOFTBODY_LIBRARY})
|
||||
|
||||
find_package_handle_standard_args(Bullet "Could NOT find Bullet, try to set the path to Bullet root folder in the system variable BULLET_ROOT_DIR"
|
||||
BULLET_INCLUDE_DIRS
|
||||
BULLET_DYNAMICS_LIBRARY BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY BULLET_SOFTBODY_LIBRARY
|
||||
BULLET_LIBRARIES
|
||||
)
|
|
@ -1,41 +0,0 @@
|
|||
#
|
||||
# FindCrashpad.cmake
|
||||
#
|
||||
# Try to find Crashpad libraries and include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# CRASHPAD_FOUND
|
||||
# CRASHPAD_INCLUDE_DIRS
|
||||
# CRASHPAD_LIBRARY
|
||||
# CRASHPAD_BASE_LIBRARY
|
||||
# CRASHPAD_UTIL_LIBRARY
|
||||
#
|
||||
# Created on 01/19/2018 by Clement Brisset
|
||||
# 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("crashpad")
|
||||
|
||||
find_path(CRASHPAD_INCLUDE_DIRS base/macros.h PATH_SUFFIXES include HINTS ${CRASHPAD_SEARCH_DIRS})
|
||||
|
||||
find_library(CRASHPAD_LIBRARY_RELEASE crashpad PATH_SUFFIXES "Release_x64/lib_MD" HINTS ${CRASHPAD_SEARCH_DIRS})
|
||||
find_library(CRASHPAD_BASE_LIBRARY_RELEASE base PATH_SUFFIXES "Release_x64/lib_MD" HINTS ${CRASHPAD_SEARCH_DIRS})
|
||||
find_library(CRASHPAD_UTIL_LIBRARY_RELEASE util PATH_SUFFIXES "Release_x64/lib_MD" HINTS ${CRASHPAD_SEARCH_DIRS})
|
||||
|
||||
find_library(CRASHPAD_LIBRARY_DEBUG crashpad PATH_SUFFIXES "Debug_x64/lib_MD" HINTS ${CRASHPAD_SEARCH_DIRS})
|
||||
find_library(CRASHPAD_BASE_LIBRARY_DEBUG base PATH_SUFFIXES "Debug_x64/lib_MD" HINTS ${CRASHPAD_SEARCH_DIRS})
|
||||
find_library(CRASHPAD_UTIL_LIBRARY_DEBUG util PATH_SUFFIXES "Debug_x64/lib_MD" HINTS ${CRASHPAD_SEARCH_DIRS})
|
||||
|
||||
find_file(CRASHPAD_HANDLER_EXE_PATH NAME "crashpad_handler.exe" PATH_SUFFIXES "Release_x64" HINTS ${CRASHPAD_SEARCH_DIRS})
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(CRASHPAD)
|
||||
select_library_configurations(CRASHPAD_BASE)
|
||||
select_library_configurations(CRASHPAD_UTIL)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Crashpad DEFAULT_MSG CRASHPAD_INCLUDE_DIRS CRASHPAD_LIBRARY CRASHPAD_BASE_LIBRARY CRASHPAD_UTIL_LIBRARY)
|
|
@ -1,26 +0,0 @@
|
|||
#
|
||||
# FindGLI.cmake
|
||||
#
|
||||
# Try to find GLI include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# GLI_INCLUDE_DIRS
|
||||
#
|
||||
# Created on 2016/09/03 by Bradley Austin Davis
|
||||
# Copyright 2013-2016 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 GLI search
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("gli")
|
||||
|
||||
# locate header
|
||||
find_path(GLI_INCLUDE_DIRS "gli/gli.hpp" HINTS ${GLI_SEARCH_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLI DEFAULT_MSG GLI_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(GLI_INCLUDE_DIRS GLI_SEARCH_DIRS)
|
|
@ -1,26 +0,0 @@
|
|||
#
|
||||
# FindGLM.cmake
|
||||
#
|
||||
# Try to find GLM include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# GLM_INCLUDE_DIRS
|
||||
#
|
||||
# Created on 7/17/2014 by Stephen Birarda
|
||||
# Copyright 2014 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 GLM search
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("glm")
|
||||
|
||||
# locate header
|
||||
find_path(GLM_INCLUDE_DIRS "glm/glm.hpp" HINTS ${GLM_SEARCH_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLM DEFAULT_MSG GLM_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(GLM_INCLUDE_DIRS GLM_SEARCH_DIRS)
|
|
@ -1,37 +0,0 @@
|
|||
#
|
||||
# FindNVTT.cmake
|
||||
#
|
||||
# Try to find NVIDIA texture tools library and include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# NVTT_FOUND
|
||||
# NVTT_INCLUDE_DIRS
|
||||
# NVTT_LIBRARIES
|
||||
# NVTT_DLL_PATH
|
||||
#
|
||||
# Created on 4/14/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("nvtt")
|
||||
|
||||
find_path(NVTT_INCLUDE_DIRS nvtt/nvtt.h PATH_SUFFIXES include HINTS ${NVTT_SEARCH_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_library(NVTT_LIBRARY_RELEASE nvtt PATH_SUFFIXES "lib" "Release.x64/lib" HINTS ${NVTT_SEARCH_DIRS})
|
||||
find_library(NVTT_LIBRARY_DEBUG nvtt PATH_SUFFIXES "lib" "Debug.x64/lib" HINTS ${NVTT_SEARCH_DIRS})
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(NVTT)
|
||||
|
||||
if (WIN32)
|
||||
find_path(NVTT_DLL_PATH nvtt.dll PATH_SUFFIXES "Release.x64/bin" HINTS ${NVTT_SEARCH_DIRS})
|
||||
find_package_handle_standard_args(NVTT DEFAULT_MSG NVTT_INCLUDE_DIRS NVTT_LIBRARIES NVTT_DLL_PATH)
|
||||
else ()
|
||||
find_package_handle_standard_args(NVTT DEFAULT_MSG NVTT_INCLUDE_DIRS NVTT_LIBRARIES)
|
||||
endif ()
|
|
@ -1,57 +0,0 @@
|
|||
#
|
||||
# FindPolyvox.cmake
|
||||
#
|
||||
# Try to find the libpolyvox resampling library
|
||||
#
|
||||
# You can provide a LIBPOLYVOX_ROOT_DIR which contains lib and include directories
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# POLYVOX_FOUND - system found libpolyvox
|
||||
# POLYVOX_INCLUDE_DIRS - the libpolyvox include directory
|
||||
# POLYVOX_LIBRARIES - link to this to use libpolyvox
|
||||
#
|
||||
# Created on 1/22/2015 by Stephen Birarda
|
||||
# Copyright 2015 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("polyvox")
|
||||
|
||||
find_path(POLYVOX_CORE_INCLUDE_DIRS PolyVoxCore/SimpleVolume.h PATH_SUFFIXES include include/PolyVoxCore HINTS ${POLYVOX_SEARCH_DIRS})
|
||||
# find_path(POLYVOX_UTIL_INCLUDE_DIRS PolyVoxUtil/Serialization.h PATH_SUFFIXES include include/PolyVoxUtil HINTS ${POLYVOX_SEARCH_DIRS})
|
||||
|
||||
find_library(POLYVOX_CORE_LIBRARY_DEBUG NAMES PolyVoxCore PATH_SUFFIXES lib/Debug HINTS ${POLYVOX_SEARCH_DIRS})
|
||||
find_library(POLYVOX_CORE_LIBRARY_RELEASE NAMES PolyVoxCore PATH_SUFFIXES lib/Release lib HINTS ${POLYVOX_SEARCH_DIRS})
|
||||
# find_library(POLYVOX_UTIL_LIBRARY NAMES PolyVoxUtil PATH_SUFFIXES lib HINTS ${POLYVOX_SEARCH_DIRS})
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(POLYVOX_CORE)
|
||||
|
||||
# if (WIN32)
|
||||
# find_path(POLYVOX_DLL_PATH polyvox.dll PATH_SUFFIXES bin HINTS ${POLYVOX_SEARCH_DIRS})
|
||||
# endif()
|
||||
|
||||
# set(POLYVOX_REQUIREMENTS POLYVOX_CORE_INCLUDE_DIRS POLYVOX_UTIL_INCLUDE_DIRS POLYVOX_CORE_LIBRARY POLYVOX_UTIL_LIBRARY)
|
||||
set(POLYVOX_REQUIREMENTS POLYVOX_CORE_INCLUDE_DIRS POLYVOX_CORE_LIBRARY)
|
||||
# if (WIN32)
|
||||
# list(APPEND POLYVOX_REQUIREMENTS POLYVOX_DLL_PATH)
|
||||
# endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Polyvox DEFAULT_MSG ${POLYVOX_REQUIREMENTS})
|
||||
|
||||
# if (WIN32)
|
||||
# add_paths_to_fixup_libs(${POLYVOX_DLL_PATH})
|
||||
# endif ()
|
||||
|
||||
# set(POLYVOX_INCLUDE_DIRS ${POLYVOX_CORE_INCLUDE_DIRS} ${POLYVOX_UTIL_INCLUDE_DIRS})
|
||||
# set(POLYVOX_LIBRARIES ${POLYVOX_CORE_LIBRARY} ${POLYVOX_UTIL_LIBRARY})
|
||||
|
||||
set(POLYVOX_INCLUDE_DIRS ${POLYVOX_CORE_INCLUDE_DIRS})
|
||||
set(POLYVOX_LIBRARIES ${POLYVOX_CORE_LIBRARY})
|
||||
|
||||
mark_as_advanced(POLYVOX_INCLUDE_DIRS POLYVOX_LIBRARIES POLYVOX_SEARCH_DIRS)
|
|
@ -1,29 +0,0 @@
|
|||
#
|
||||
# FindQuaZip.h
|
||||
# StackManagerQt/cmake/modules
|
||||
#
|
||||
# Created by Mohammed Nafees.
|
||||
# Copyright (c) 2014 High Fidelity. All rights reserved.
|
||||
#
|
||||
|
||||
# QUAZIP_FOUND - QuaZip library was found
|
||||
# QUAZIP_INCLUDE_DIR - Path to QuaZip include dir
|
||||
# QUAZIP_INCLUDE_DIRS - Path to QuaZip and zlib include dir (combined from QUAZIP_INCLUDE_DIR + ZLIB_INCLUDE_DIR)
|
||||
# QUAZIP_LIBRARIES - List of QuaZip libraries
|
||||
# QUAZIP_ZLIB_INCLUDE_DIR - The include dir of zlib headers
|
||||
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("quazip")
|
||||
|
||||
if (WIN32)
|
||||
find_path(QUAZIP_INCLUDE_DIRS quazip.h PATH_SUFFIXES include/quazip HINTS ${QUAZIP_SEARCH_DIRS})
|
||||
elseif (APPLE)
|
||||
find_path(QUAZIP_INCLUDE_DIRS quazip.h PATH_SUFFIXES include/quazip HINTS ${QUAZIP_SEARCH_DIRS})
|
||||
else ()
|
||||
find_path(QUAZIP_INCLUDE_DIRS quazip.h PATH_SUFFIXES quazip HINTS ${QUAZIP_SEARCH_DIRS})
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(QUAZIP DEFAULT_MSG QUAZIP_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(QUAZIP_INCLUDE_DIRS QUAZIP_SEARCH_DIRS)
|
|
@ -1,27 +0,0 @@
|
|||
#
|
||||
# FindSixense.cmake
|
||||
#
|
||||
# Try to find the Sixense controller library
|
||||
#
|
||||
# You must provide a SIXENSE_ROOT_DIR which contains lib and include directories
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# SIXENSE_FOUND - system found Sixense
|
||||
# SIXENSE_INCLUDE_DIRS - the Sixense include directory
|
||||
# SIXENSE_LIBRARIES - Link this to use Sixense
|
||||
#
|
||||
# Created on 11/15/2013 by Andrzej Kapolka
|
||||
# Copyright 2013 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(SelectLibraryConfigurations)
|
||||
select_library_configurations(SIXENSE)
|
||||
|
||||
set(SIXENSE_REQUIREMENTS SIXENSE_INCLUDE_DIRS SIXENSE_LIBRARIES)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Sixense DEFAULT_MSG SIXENSE_INCLUDE_DIRS SIXENSE_LIBRARIES)
|
||||
mark_as_advanced(SIXENSE_LIBRARIES SIXENSE_INCLUDE_DIRS SIXENSE_SEARCH_DIRS)
|
|
@ -1,106 +0,0 @@
|
|||
#
|
||||
# FindTBB.cmake
|
||||
#
|
||||
# Try to find the Intel Threading Building Blocks library
|
||||
#
|
||||
# You can provide a TBB_ROOT_DIR which contains lib and include directories
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# TBB_FOUND - system was able to find TBB
|
||||
# TBB_INCLUDE_DIRS - the TBB include directory
|
||||
# TBB_LIBRARIES - link this to use TBB
|
||||
#
|
||||
# Created on 12/14/2014 by Stephen Birarda
|
||||
# Copyright 2014 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("tbb")
|
||||
|
||||
find_path(TBB_INCLUDE_DIRS tbb/tbb.h PATH_SUFFIXES include HINTS ${TBB_SEARCH_DIRS})
|
||||
|
||||
set(_TBB_LIB_NAME "tbb")
|
||||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
||||
|
||||
if (APPLE)
|
||||
set(_TBB_LIB_DIR "lib/libc++")
|
||||
elseif (UNIX AND NOT ANDROID)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_TBB_ARCH_DIR "intel64")
|
||||
else()
|
||||
set(_TBB_ARCH_DIR "ia32")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||
OUTPUT_VARIABLE GCC_VERSION
|
||||
)
|
||||
|
||||
if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
|
||||
set(_TBB_LIB_DIR "lib/${_TBB_ARCH_DIR}/gcc4.7")
|
||||
elseif (GCC_VERSION VERSION_GREATER 4.4 OR GCC_VERSION VERSION_EQUAL 4.4)
|
||||
set(_TBB_LIB_DIR "lib/${_TBB_ARCH_DIR}/gcc4.4")
|
||||
elseif (GCC_VERSION VERSION_GREATER 4.1 OR GCC_VERSION VERSION_EQUAL 4.1)
|
||||
set(_TBB_LIB_DIR "lib/${_TBB_ARCH_DIR}/gcc4.1")
|
||||
else ()
|
||||
message(FATAL_ERROR "Could not find a compatible version of Threading Building Blocks library for your compiler.")
|
||||
endif ()
|
||||
|
||||
elseif (WIN32)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_TBB_ARCH_DIR "intel64")
|
||||
else()
|
||||
set(_TBB_ARCH_DIR "ia32")
|
||||
endif()
|
||||
|
||||
if (MSVC_VERSION GREATER_EQUAL 1900)
|
||||
set(_TBB_MSVC_DIR "vc14")
|
||||
elseif (MSVC_VERSION GREATER_EQUAL 1800)
|
||||
set(_TBB_MSVC_DIR "vc12")
|
||||
elseif (MSVC_VERSION GREATER_EQUAL 1700)
|
||||
set(_TBB_MSVC_DIR "vc11")
|
||||
else()
|
||||
message(FATAL_ERROR "MSVC ${MSVC_VERSION} not supported by Intel TBB")
|
||||
endif()
|
||||
|
||||
set(_TBB_LIB_DIR "lib/${_TBB_ARCH_DIR}/${_TBB_MSVC_DIR}")
|
||||
|
||||
find_path(TBB_DLL_PATH tbb_debug.dll PATH_SUFFIXES "bin/${_TBB_ARCH_DIR}/${_TBB_MSVC_DIR}" HINTS ${TBB_SEARCH_DIRS})
|
||||
|
||||
elseif (ANDROID)
|
||||
set(_TBB_DEFAULT_INSTALL_DIR "/tbb")
|
||||
set(_TBB_LIB_NAME "tbb")
|
||||
set(_TBB_LIB_DIR "lib")
|
||||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
||||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
||||
set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
|
||||
endif ()
|
||||
|
||||
find_library(TBB_LIBRARY_DEBUG NAMES ${_TBB_LIB_NAME}_debug PATH_SUFFIXES ${_TBB_LIB_DIR} HINTS ${TBB_SEARCH_DIRS})
|
||||
find_library(TBB_LIBRARY_RELEASE NAMES ${_TBB_LIB_NAME} PATH_SUFFIXES ${_TBB_LIB_DIR} HINTS ${TBB_SEARCH_DIRS})
|
||||
|
||||
find_library(TBB_MALLOC_LIBRARY_DEBUG NAMES ${_TBB_LIB_MALLOC_NAME}_debug PATH_SUFFIXES ${_TBB_LIB_DIR} HINTS ${TBB_SEARCH_DIRS})
|
||||
find_library(TBB_MALLOC_LIBRARY_RELEASE NAMES ${_TBB_LIB_MALLOC_NAME} PATH_SUFFIXES ${_TBB_LIB_DIR} HINTS ${TBB_SEARCH_DIRS})
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
select_library_configurations(TBB)
|
||||
select_library_configurations(TBB_MALLOC)
|
||||
|
||||
set(TBB_REQUIREMENTS TBB_LIBRARY TBB_MALLOC_LIBRARY TBB_INCLUDE_DIRS)
|
||||
if (WIN32)
|
||||
list(APPEND TBB_REQUIREMENTS TBB_DLL_PATH)
|
||||
endif ()
|
||||
|
||||
find_package_handle_standard_args(TBB DEFAULT_MSG ${TBB_REQUIREMENTS})
|
||||
|
||||
if (WIN32)
|
||||
add_paths_to_fixup_libs(${TBB_DLL_PATH})
|
||||
endif ()
|
||||
|
||||
set(TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY})
|
|
@ -1,481 +0,0 @@
|
|||
#
|
||||
# CMake Find V8 Google JavaScript Engine by Parra Studios
|
||||
# CMake script to find V8 JavaScript Engine.
|
||||
#
|
||||
# Copyright (C) 2016 - 2022 Vicente Eduardo Ferrer Garcia <vic798@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Modified by dr Karol Suprynowicz on 2022/09/03
|
||||
# Copyright 2022-2023 Overte e.V.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Find V8 library and include paths
|
||||
#
|
||||
# V8_FOUND - True if V8 was found
|
||||
# V8_INCLUDE_DIR - V8 headers path
|
||||
# V8_LIBRARIES - List of V8 libraries
|
||||
# V8_VERSION - V8 version
|
||||
# V8_VERSION_MAJOR - V8 major version
|
||||
# V8_VERSION_MINOR - V8 minor version
|
||||
# V8_VERSION_PATCH - V8 patch version
|
||||
# V8_VERSION_TWEAK - V8 patch version
|
||||
# V8_VERSION_HEX - V8 version in hexadecimal format
|
||||
# V8_EXECUTABLE - V8 shell
|
||||
|
||||
# Prevent vervosity if already included
|
||||
if(V8_INCLUDE_DIR)
|
||||
set(V8_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
# Debug flag
|
||||
set(_V8_CMAKE_DEBUG TRUE)
|
||||
|
||||
# Include package manager
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
# V8 search paths
|
||||
set(V8_PATHS
|
||||
${VCPKG_INSTALL_ROOT}
|
||||
${V8_HOME}
|
||||
${V8_ROOT}
|
||||
$ENV{ProgramFiles}/v8
|
||||
$ENV{SystemDrive}/v8
|
||||
$ENV{V8_HOME}
|
||||
$ENV{EXTERNLIBS}/v8
|
||||
${V8_DIR}
|
||||
$ENV{V8_DIR}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
/usr/freeware
|
||||
)
|
||||
|
||||
# V8 platform dependant paths
|
||||
if(NOT UNIX)
|
||||
set(V8_PATHS_DEBUG
|
||||
${V8_DIR}/build/Debug
|
||||
)
|
||||
|
||||
set(V8_PATHS_RELEASE
|
||||
${V8_DIR}/build/Release
|
||||
)
|
||||
else()
|
||||
set(V8_PATHS_DEBUG
|
||||
${V8_DIR}/out/ia32.debug
|
||||
${V8_DIR}/out/x64.debug
|
||||
${V8_DIR}/out/native
|
||||
)
|
||||
|
||||
set(V8_PATHS_RELEASE
|
||||
${V8_DIR}/out/ia32.release
|
||||
${V8_DIR}/out/x64.release
|
||||
${V8_DIR}/out/native
|
||||
)
|
||||
endif()
|
||||
|
||||
# V8 library paths
|
||||
#set(V8_LIBRARY_PATH_SUFFIXES lib lib64 lib/x86_64-linux-gnu lib.target)
|
||||
|
||||
# Find include path
|
||||
if(MSVC OR CMAKE_BUILD_TYPE EQUAL "Debug")
|
||||
set(V8_HEADERS v8.h v8-debug.h v8-profiler.h v8stdint.h)
|
||||
else()
|
||||
set(V8_HEADERS v8.h v8stdint.h)
|
||||
endif()
|
||||
|
||||
find_path(V8_INCLUDE_DIR ${V8_HEADERS}
|
||||
PATHS ${V8_PATHS}
|
||||
PATH_SUFFIXES include include/node
|
||||
DOC "Google V8 JavaScript Engine Headers"
|
||||
)
|
||||
|
||||
MESSAGE("V8 include dir: ${V8_INCLUDE_DIR}")
|
||||
|
||||
# Define library names
|
||||
set(V8_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib v8D v8_baseD v8_base.ia32D v8_base.x64D libv8_baseD v8_baseD.lib v8_libbaseD v8_libbase.ia32D v8_libbase.x64D libv8_libbaseD v8_libbaseD.lib)
|
||||
set(V8_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib v8 v8_base v8_base.ia32 v8_base.x64 libv8_base v8_base.lib v8_libbase v8_libbase.ia32 v8_libbase.x64 libv8_libbase v8_libbase.lib)
|
||||
set(V8_PLATFORM_NAMES_DEBUG libnode.so.108 v8_libplatform.lib libnode libnode.so libnode.lib v8_libplatformD v8_libplatformD.a v8_libplatformD.lib)
|
||||
set(V8_PLATFORM_NAMES_RELEASE libnode.so.108 v8_libplatform.lib libnode libnode.so libnode.lib v8_libplatform v8_libplatform.a)
|
||||
set(V8_SAMPLER_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib v8_libsamplerD v8_libsamplerD.a v8_libsamplerD.lib)
|
||||
set(V8_SAMPLER_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib v8_libsampler v8_libsampler.a v8_libsampler.lib)
|
||||
set(V8_SNAPSHOT_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib v8_snapshotD libv8_snapshotD v8_snapshotD.lib)
|
||||
set(V8_SNAPSHOT_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib v8_snapshot libv8_snapshot v8_snapshot.lib)
|
||||
set(V8_ICU_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib icudataD icudataD.a icudataD.lib)
|
||||
set(V8_ICU_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib icudata icudata.a icudata.lib)
|
||||
set(V8_ICUUC_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib icuucD libicuucD)
|
||||
set(V8_ICUUC_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib icuuc libicuuc)
|
||||
set(V8_ICUI18N_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib icui18nD libicui18nD)
|
||||
set(V8_ICUI18N_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib icui18n libicui18n)
|
||||
|
||||
# Find V8 base library debug
|
||||
find_library(V8_LIBRARY_DEBUG
|
||||
NAMES ${V8_NAMES_DEBUG}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_DEBUG}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library (Debug)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_LIBRARY_DEBUG: ${V8_LIBRARY_DEBUG}")
|
||||
|
||||
# Find V8 base library release
|
||||
find_library(V8_LIBRARY_RELEASE
|
||||
NAMES ${V8_NAMES_RELEASE}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_RELEASE}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library (Release)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_LIBRARY_RELEASE: ${V8_LIBRARY_RELEASE}")
|
||||
|
||||
# Find V8 platform library debug
|
||||
find_library(V8_PLATFORM_LIBRARY_DEBUG
|
||||
NAMES ${V8_PLATFORM_NAMES_DEBUG}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_DEBUG}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library Platform (Debug)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_PLATFORM_LIBRARY_DEBUG: ${V8_PLATFORM_LIBRARY_DEBUG}")
|
||||
|
||||
# Find V8 platform library release
|
||||
find_library(V8_PLATFORM_LIBRARY_RELEASE
|
||||
NAMES ${V8_PLATFORM_NAMES_RELEASE}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_RELEASE}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library Platform (Release)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_PLATFORM_LIBRARY_RELEASE: ${V8_PLATFORM_LIBRARY_RELEASE}")
|
||||
|
||||
# Find V8 platform library debug
|
||||
find_library(V8_SAMPLER_LIBRARY_DEBUG
|
||||
NAMES ${V8_SAMPLER_NAMES_DEBUG}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_DEBUG}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library Sampler (Debug)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_SAMPLER_LIBRARY_DEBUG: ${V8_SAMPLER_LIBRARY_DEBUG}")
|
||||
|
||||
# Find V8 platform library release
|
||||
find_library(V8_SAMPLER_LIBRARY_RELEASE
|
||||
NAMES ${V8_SAMPLER_NAMES_RELEASE}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_RELEASE}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library Sampler (Release)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_SAMPLER_LIBRARY_RELEASE: ${V8_SAMPLER_LIBRARY_RELEASE}")
|
||||
|
||||
# Find V8 snapshot library debug
|
||||
find_library(V8_SNAPSHOT_LIBRARY_DEBUG
|
||||
NAMES ${V8_SNAPSHOT_NAMES_DEBUG}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_DEBUG}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library Snapshot (Debug)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_SNAPSHOT_LIBRARY_DEBUG: ${V8_SNAPSHOT_LIBRARY_DEBUG}")
|
||||
|
||||
# Find V8 snapshot library release
|
||||
find_library(V8_SNAPSHOT_LIBRARY_RELEASE
|
||||
NAMES ${V8_SNAPSHOT_NAMES_RELEASE}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_RELEASE}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library Snapshot (Release)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_SNAPSHOT_LIBRARY_RELEASE: ${V8_SNAPSHOT_LIBRARY_RELEASE}")
|
||||
|
||||
# Find V8 icu library debug
|
||||
find_library(V8_ICU_LIBRARY_DEBUG
|
||||
NAMES ${V8_ICU_NAMES_DEBUG}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_DEBUG}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library ICU (Debug)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_ICU_LIBRARY_DEBUG: ${V8_ICU_LIBRARY_DEBUG}")
|
||||
|
||||
# Find V8 icu library release
|
||||
find_library(V8_ICU_LIBRARY_RELEASE
|
||||
NAMES ${V8_ICU_NAMES_RELEASE}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_RELEASE}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library ICU (Release)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_ICU_LIBRARY_RELEASE: ${V8_ICU_LIBRARY_RELEASE}")
|
||||
|
||||
# Find V8 icuuc library debug
|
||||
find_library(V8_ICUUC_LIBRARY_DEBUG
|
||||
NAMES ${V8_ICUUC_NAMES_DEBUG}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_DEBUG}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library ICUUC (Debug)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_ICUUC_LIBRARY_DEBUG: ${V8_ICUUC_LIBRARY_DEBUG}")
|
||||
|
||||
# Find V8 icuuc library release
|
||||
find_library(V8_ICUUC_LIBRARY_RELEASE
|
||||
NAMES ${V8_ICUUC_NAMES_RELEASE}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_RELEASE}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library ICUUC (Release)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_ICUUC_LIBRARY_RELEASE: ${V8_ICUUC_LIBRARY_RELEASE}")
|
||||
|
||||
# Find V8 icui18n library debug
|
||||
find_library(V8_ICUI18N_LIBRARY_DEBUG
|
||||
NAMES ${V8_ICUI18N_NAMES_DEBUG}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_DEBUG}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library ICUI18N (Debug)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_ICUI18N_LIBRARY_DEBUG: ${V8_ICUI18N_LIBRARY_DEBUG}")
|
||||
|
||||
# Find V8 icui18n library release
|
||||
find_library(V8_ICUI18N_LIBRARY_RELEASE
|
||||
NAMES ${V8_ICUI18N_NAMES_RELEASE}
|
||||
PATHS ${V8_PATHS} ${V8_PATHS_RELEASE}
|
||||
PATH_SUFFIXES ${V8_LIBRARY_PATH_SUFFIXES}
|
||||
DOC "Google V8 JavaScript Engine Library ICUI18N (Release)"
|
||||
)
|
||||
|
||||
MESSAGE("V8_ICUI18N_LIBRARY_RELEASE: ${V8_ICUI18N_LIBRARY_RELEASE}")
|
||||
|
||||
# Base build with snapshot
|
||||
MESSAGE("1")
|
||||
if(MSVC)
|
||||
if(V8_LIBRARY_DEBUG AND V8_LIBRARY_RELEASE AND V8_SNAPSHOT_LIBRARY_DEBUG AND V8_SNAPSHOT_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARY
|
||||
${V8_LIBRARY_DEBUG} ${V8_PLATFORM_LIBRARY_DEBUG} ${V8_SNAPSHOT_LIBRARY_DEBUG} # ${V8_ICU_LIBRARY_DEBUG}
|
||||
${V8_LIBRARY_RELEASE} ${V8_PLATFORM_LIBRARY_RELEASE} ${V8_SNAPSHOT_LIBRARY_RELEASE} # ${V8_ICU_LIBRARY_RELEASE}
|
||||
)
|
||||
|
||||
set(V8_LIBRARIES
|
||||
optimized ${V8_LIBRARY_RELEASE} debug ${V8_LIBRARY_DEBUG}
|
||||
optimized ${V8_PLATFORM_LIBRARY_RELEASE} debug ${V8_PLATFORM_LIBRARY_DEBUG}
|
||||
# optimized ${V8_ICU_LIBRARY_RELEASE} debug ${V8_ICU_LIBRARY_DEBUG}
|
||||
optimized ${V8_SNAPSHOT_LIBRARY_RELEASE} debug ${V8_SNAPSHOT_LIBRARY_DEBUG}
|
||||
optimized Winmm.lib debug Winmm.lib
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
MESSAGE("2")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
MESSAGE("3")
|
||||
if(V8_LIBRARY_DEBUG AND V8_PLATFORM_LIBRARY_DEBUG AND V8_SAMPLER_LIBRARY_DEBUG)
|
||||
set(V8_LIBRARY ${V8_LIBRARY_DEBUG} ${V8_PLATFORM_LIBRARY_DEBUG} ${V8_SAMPLER_LIBRARY_DEBUG}) # ${V8_ICU_LIBRARY_DEBUG})
|
||||
elseif(V8_LIBRARY_DEBUG AND V8_PLATFORM_LIBRARY_DEBUG)
|
||||
MESSAGE("4")
|
||||
set(V8_LIBRARY ${V8_LIBRARY_DEBUG} ${V8_PLATFORM_LIBRARY_DEBUG}) # ${V8_SAMPLER_LIBRARY_DEBUG}) # ${V8_ICU_LIBRARY_DEBUG})
|
||||
else()
|
||||
if(V8_LIBRARY_RELEASE AND V8_PLATFORM_LIBRARY_RELEASE AND V8_SAMPLER_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARY ${V8_LIBRARY_RELEASE} ${V8_PLATFORM_LIBRARY_RELEASE} ${V8_SAMPLER_LIBRARY_RELEASE}) # ${V8_ICU_LIBRARY_DEBUG})
|
||||
elseif(V8_LIBRARY_RELEASE AND V8_PLATFORM_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARY ${V8_LIBRARY_RELEASE} ${V8_PLATFORM_LIBRARY_RELEASE}) # ${V8_SAMPLER_LIBRARY_RELEASE}) # ${V8_ICU_LIBRARY_DEBUG})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
if(V8_LIBRARY_RELEASE AND V8_PLATFORM_LIBRARY_RELEASE AND V8_SAMPLER_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARY ${V8_LIBRARY_RELEASE} ${V8_PLATFORM_LIBRARY_RELEASE} ${V8_SAMPLER_LIBRARY_RELEASE}) # ${V8_ICU_LIBRARY_RELEASE})
|
||||
elseif(V8_LIBRARY_RELEASE AND V8_PLATFORM_LIBRARY_RELEASE )
|
||||
set(V8_LIBRARY ${V8_LIBRARY_RELEASE} ${V8_PLATFORM_LIBRARY_RELEASE} ) # ${V8_SAMPLER_LIBRARY_RELEASE} ${V8_ICU_LIBRARY_RELEASE})
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(V8_LIBRARIES ${V8_LIBRARY})
|
||||
endif()
|
||||
|
||||
# Set version libraries
|
||||
set(V8_LIBRARIES_DEPENDS)
|
||||
|
||||
if (V8_LIBRARY_DEBUG)
|
||||
set(V8_LIBRARIES_DEPENDS
|
||||
${V8_LIBRARIES_DEPENDS}
|
||||
${V8_LIBRARY_DEBUG}.${V8_FIND_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if (V8_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARIES_DEPENDS
|
||||
${V8_LIBRARIES_DEPENDS}
|
||||
${V8_LIBRARY_RELEASE}.${V8_FIND_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(V8_ICU_LIBRARY_DEBUG)
|
||||
set(V8_LIBRARIES_DEPENDS
|
||||
${V8_LIBRARIES_DEPENDS}
|
||||
${V8_ICU_LIBRARY_DEBUG}.${ICU_FIND_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(V8_ICU_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARIES_DEPENDS
|
||||
${V8_LIBRARIES_DEPENDS}
|
||||
${V8_ICU_LIBRARY_RELEASE}.${ICU_FIND_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(V8_ICUUC_LIBRARY_DEBUG)
|
||||
set(V8_LIBRARIES_DEPENDS
|
||||
${V8_LIBRARIES_DEPENDS}
|
||||
${V8_ICUUC_LIBRARY_DEBUG}.${ICU_FIND_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(V8_ICUUC_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARIES_DEPENDS
|
||||
${V8_LIBRARIES_DEPENDS}
|
||||
${V8_ICUUC_LIBRARY_RELEASE}.${ICU_FIND_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(V8_ICUI18N_LIBRARY_DEBUG)
|
||||
set(V8_LIBRARIES_DEPENDS
|
||||
${V8_LIBRARIES_DEPENDS}
|
||||
${V8_ICUI18N_LIBRARY_DEBUG}.${ICU_FIND_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(V8_ICUI18N_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARIES_DEPENDS
|
||||
${V8_LIBRARIES_DEPENDS}
|
||||
${V8_ICUI18N_LIBRARY_RELEASE}.${ICU_FIND_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
MESSAGE("V8_LIBRARY: ${V8_LIBRARY}")
|
||||
find_package_handle_standard_args(V8 DEFAULT_MSG V8_LIBRARY V8_INCLUDE_DIR)
|
||||
|
||||
# Base build
|
||||
if(NOT V8_FOUND)
|
||||
if(MSVC)
|
||||
if(V8_LIBRARY_DEBUG AND V8_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARY
|
||||
${V8_LIBRARY_DEBUG} ${V8_LIBRARY_RELEASE}
|
||||
${V8_PLATFORM_LIBRARY_DEBUG} ${V8_PLATFORM_LIBRARY_RELEASE}
|
||||
# ${V8_ICU_LIBRARY_DEBUG} ${V8_ICU_LIBRARY_RELEASE}
|
||||
)
|
||||
|
||||
set(V8_LIBRARIES
|
||||
optimized ${V8_LIBRARY_RELEASE} debug ${V8_LIBRARY_DEBUG}
|
||||
optimized ${V8_PLATFORM_LIBRARY_RELEASE} debug ${V8_PLATFORM_LIBRARY_DEBUG}
|
||||
# optimized ${V8_ICU_LIBRARY_RELEASE} debug ${V8_ICU_LIBRARY_DEBUG}
|
||||
optimized Winmm.lib debug Winmm.lib
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_BUILD_TYPE EQUAL "Debug")
|
||||
if(V8_LIBRARY_DEBUG)
|
||||
set(V8_LIBRARY ${V8_LIBRARY_DEBUG} ${V8_PLATFORM_LIBRARY_DEBUG}) # ${V8_ICU_LIBRARY_DEBUG})
|
||||
endif()
|
||||
else()
|
||||
if(V8_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARY ${V8_LIBRARY_RELEASE} ${V8_PLATFORM_LIBRARY_RELEASE}) # ${V8_ICU_LIBRARY_RELEASE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(V8_LIBRARIES ${V8_LIBRARY})
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(V8 DEFAULT_MSG V8_LIBRARY V8_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
# Minimal build
|
||||
if(NOT V8_FOUND)
|
||||
if(MSVC)
|
||||
if(V8_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARY ${V8_LIBRARY_RELEASE} ${V8_PLATFORM_LIBRARY_RELEASE}) # ${V8_ICU_LIBRARY_RELEASE})
|
||||
|
||||
set(V8_LIBRARIES
|
||||
optimized ${V8_LIBRARY_RELEASE} debug ${V8_LIBRARY_RELEASE}
|
||||
optimized ${V8_PLATFORM_LIBRARY_RELEASE} debug ${V8_PLATFORM_LIBRARY_RELEASE}
|
||||
# optimized ${V8_ICU_LIBRARY_RELEASE} debug ${V8_ICU_LIBRARY_RELEASE}
|
||||
optimized Winmm.lib debug Winmm.lib
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
if(V8_LIBRARY_RELEASE)
|
||||
set(V8_LIBRARY ${V8_LIBRARY_RELEASE} ${V8_PLATFORM_LIBRARY_RELEASE}) # ${V8_ICU_LIBRARY_RELEASE})
|
||||
endif()
|
||||
|
||||
set(V8_LIBRARIES ${V8_LIBRARY})
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(V8 DEFAULT_MSG V8_LIBRARY V8_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
# Detect V8 version
|
||||
if(V8_FOUND AND V8_INCLUDE_DIR)
|
||||
file(READ ${V8_INCLUDE_DIR}/v8-version.h V8_VERSION_FILE)
|
||||
|
||||
string(REGEX MATCH "#define V8_MAJOR_VERSION ([0-9]+)" V8_VERSION_MAJOR_DEF ${V8_VERSION_FILE})
|
||||
string(REGEX MATCH "([0-9]+)$" V8_VERSION_MAJOR ${V8_VERSION_MAJOR_DEF})
|
||||
|
||||
string(REGEX MATCH "#define V8_MINOR_VERSION ([0-9]+)" V8_VERSION_MINOR_DEF ${V8_VERSION_FILE})
|
||||
string(REGEX MATCH "([0-9]+)$" V8_VERSION_MINOR ${V8_VERSION_MINOR_DEF})
|
||||
|
||||
string(REGEX MATCH "#define V8_BUILD_NUMBER ([0-9]+)" V8_VERSION_PATCH_DEF ${V8_VERSION_FILE})
|
||||
string(REGEX MATCH "([0-9]+)$" V8_VERSION_PATCH ${V8_VERSION_PATCH_DEF})
|
||||
|
||||
string(REGEX MATCH "#define V8_PATCH_LEVEL ([0-9]+)" V8_VERSION_TWEAK_DEF ${V8_VERSION_FILE})
|
||||
string(REGEX MATCH "([0-9]+)$" V8_VERSION_TWEAK ${V8_VERSION_TWEAK_DEF})
|
||||
|
||||
set(V8_VERSION "${V8_VERSION_MAJOR}.${V8_VERSION_MINOR}.${V8_VERSION_PATCH}.${V8_VERSION_TWEAK}")
|
||||
|
||||
set(V8_VERSION_HEX 0x0${V8_VERSION_MAJOR}${V8_VERSION_MINOR}${V8_VERSION_PATCH}${V8_VERSION_TWEAK})
|
||||
string(LENGTH "${V8_VERSION_HEX}" V8_VERSION_HEX_LENGTH)
|
||||
|
||||
while(V8_VERSION_HEX_LENGTH LESS 8)
|
||||
|
||||
set(V8_VERSION_HEX "${V8_VERSION_HEX}0")
|
||||
string(LENGTH "${V8_VERSION_HEX}" V8_VERSION_HEX_LENGTH)
|
||||
|
||||
endwhile()
|
||||
endif()
|
||||
|
||||
# Detect V8 shell
|
||||
set(V8_EXECUTABLE_NAMES d8)
|
||||
|
||||
find_program(V8_EXECUTABLE
|
||||
NAMES ${V8_EXECUTABLE_NAMES}
|
||||
)
|
||||
|
||||
mark_as_advanced(V8_LIBRARY V8_INCLUDE_DIR)
|
||||
|
||||
if(V8_FOUND)
|
||||
set(V8_INCLUDE_DIRS ${V8_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(_V8_CMAKE_DEBUG)
|
||||
message(STATUS "V8_INCLUDE_DIR: ${V8_INCLUDE_DIR}")
|
||||
message(STATUS "V8_LIBRARIES: ${V8_LIBRARIES}")
|
||||
message(STATUS "V8_LIBRARIES_DEPENDS: ${V8_LIBRARIES_DEPENDS}")
|
||||
message(STATUS "V8_VERSION: ${V8_VERSION}")
|
||||
message(STATUS "V8_VERSION_HEX: ${V8_VERSION_HEX}")
|
||||
message(STATUS "V8_EXECUTABLE: ${V8_EXECUTABLE}")
|
||||
endif()
|
|
@ -1,35 +0,0 @@
|
|||
#
|
||||
# FindVHACD.cmake
|
||||
#
|
||||
# Try to find the V-HACD library that decomposes a 3D surface into a set of "near" convex parts.
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# VHACD_FOUND - system found V-HACD
|
||||
# VHACD_INCLUDE_DIRS - the V-HACD include directory
|
||||
# VHACD_LIBRARIES - link to this to use V-HACD
|
||||
#
|
||||
# Created on 2/20/2015 by Virendra Singh
|
||||
# Copyright 2015 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("vhacd")
|
||||
|
||||
find_path(VHACD_INCLUDE_DIRS VHACD.h PATH_SUFFIXES include HINTS ${VHACD_SEARCH_DIRS})
|
||||
|
||||
find_library(VHACD_LIBRARY_DEBUG NAMES VHACD VHACD_LIB PATH_SUFFIXES lib/Debug HINTS ${VHACD_SEARCH_DIRS})
|
||||
find_library(VHACD_LIBRARY_RELEASE NAMES VHACD VHACD_LIB PATH_SUFFIXES lib/Release lib HINTS ${VHACD_SEARCH_DIRS})
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(VHACD)
|
||||
|
||||
set(VHACD_LIBRARIES ${VHACD_LIBRARY})
|
||||
|
||||
find_package_handle_standard_args(VHACD "Could NOT find VHACD, try to set the path to VHACD root folder in the system variable VHACD_ROOT_DIR or create a directory vhacd in HIFI_LIB_DIR and paste the necessary files there"
|
||||
VHACD_INCLUDE_DIRS VHACD_LIBRARIES)
|
||||
|
||||
mark_as_advanced(VHACD_INCLUDE_DIRS VHACD_LIBRARIES VHACD_SEARCH_DIRS)
|
|
@ -1,3 +0,0 @@
|
|||
Source: aristo
|
||||
Version: 0.8.1
|
||||
Description: Aristo
|
|
@ -1,21 +0,0 @@
|
|||
set(ARISTO_VERSION 0.8.1)
|
||||
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
|
||||
|
||||
file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS)
|
||||
|
||||
if (WIN32)
|
||||
vcpkg_download_distfile(
|
||||
ARISTO_SOURCE_ARCHIVE
|
||||
URLS "${EXTERNAL_BUILD_ASSETS}/seth/aristo-0.8.1-windows.zip"
|
||||
SHA512 05179c63b72a1c9f5be8a7a2b7389025da683400dbf819e5a6199dd6473c56774d2885182dc5a11cb6324058d228a4ead832222e8b3e1bebaa4c61982e85f0a8
|
||||
FILENAME aristo-0.8.1-windows.zip
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(${ARISTO_SOURCE_ARCHIVE})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/debug DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/share DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
|
||||
endif ()
|
|
@ -1,3 +0,0 @@
|
|||
Source: sranipal
|
||||
Version: 1.1.0.1
|
||||
Description: super reality animation pal!
|
|
@ -1,21 +0,0 @@
|
|||
set(SRANIPAL_VERSION 1.1.0.1)
|
||||
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
|
||||
|
||||
file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS)
|
||||
|
||||
if (WIN32)
|
||||
vcpkg_download_distfile(
|
||||
SRANIPAL_SOURCE_ARCHIVE
|
||||
URLS "${EXTERNAL_BUILD_ASSETS}/seth/sranipal-1.1.0.1-2-windows.zip"
|
||||
SHA512 f1f68f6beef52ae5e034bc3f44932ae0800ee187b75d80e76ae7b17b8ddd7bc54c039ce5594d231035e3caf3a61fed36f38621a860b4fb20170cb0176d9c28f0
|
||||
FILENAME sranipal-1.1.0.1-2-windows.zip
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(${SRANIPAL_SOURCE_ARCHIVE})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/sranipal/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/sranipal/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/sranipal/debug DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/sranipal/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/sranipal/share DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
|
||||
endif ()
|
|
@ -1,23 +0,0 @@
|
|||
Copyright (c) Microsoft Corporation
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,12 +0,0 @@
|
|||
if(NOT TARGET_TRIPLET STREQUAL _HOST_TRIPLET)
|
||||
# make FATAL_ERROR in CI when issue #16773 fixed
|
||||
message(WARNING "vcpkg-cmake-config is a host-only port; please mark it as a host port in your dependencies.")
|
||||
endif()
|
||||
|
||||
file(INSTALL
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_config_fixup.cmake"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/copyright"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
|
@ -1 +0,0 @@
|
|||
include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_config_fixup.cmake")
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"version-date": "2022-02-06",
|
||||
"port-version": 1,
|
||||
"documentation": "https://vcpkg.io/en/docs/README.html",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -1,258 +0,0 @@
|
|||
include_guard(GLOBAL)
|
||||
|
||||
function(vcpkg_cmake_config_fixup)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "arg" "DO_NOT_DELETE_PARENT_CONFIG_PATH;NO_PREFIX_CORRECTION" "PACKAGE_NAME;CONFIG_PATH;TOOLS_PATH" "")
|
||||
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "vcpkg_cmake_config_fixup was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
if(NOT arg_PACKAGE_NAME)
|
||||
set(arg_PACKAGE_NAME "${PORT}")
|
||||
endif()
|
||||
if(NOT arg_CONFIG_PATH)
|
||||
set(arg_CONFIG_PATH "share/${arg_PACKAGE_NAME}")
|
||||
endif()
|
||||
if(NOT arg_TOOLS_PATH)
|
||||
set(arg_TOOLS_PATH "tools/${PORT}")
|
||||
endif()
|
||||
set(target_path "share/${arg_PACKAGE_NAME}")
|
||||
|
||||
string(REPLACE "." "\\." EXECUTABLE_SUFFIX "${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
||||
|
||||
set(debug_share "${CURRENT_PACKAGES_DIR}/debug/${target_path}")
|
||||
set(release_share "${CURRENT_PACKAGES_DIR}/${target_path}")
|
||||
|
||||
if(NOT arg_CONFIG_PATH STREQUAL "share/${arg_PACKAGE_NAME}")
|
||||
if(arg_CONFIG_PATH STREQUAL "share")
|
||||
set(arg_CONFIG_PATH z_vcpkg_share)
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/${arg_CONFIG_PATH}")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share" "${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}")
|
||||
endif()
|
||||
|
||||
set(debug_config "${CURRENT_PACKAGES_DIR}/debug/${arg_CONFIG_PATH}")
|
||||
set(release_config "${CURRENT_PACKAGES_DIR}/${arg_CONFIG_PATH}")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
if(NOT EXISTS "${debug_config}")
|
||||
message(FATAL_ERROR "'${debug_config}' does not exist.")
|
||||
endif()
|
||||
|
||||
# This roundabout handling enables CONFIG_PATH = share
|
||||
file(MAKE_DIRECTORY "${debug_share}")
|
||||
file(GLOB files "${debug_config}/*")
|
||||
file(COPY ${files} DESTINATION "${debug_share}")
|
||||
file(REMOVE_RECURSE "${debug_config}")
|
||||
endif()
|
||||
|
||||
file(GLOB files "${release_config}/*")
|
||||
file(COPY ${files} DESTINATION "${release_share}")
|
||||
file(REMOVE_RECURSE "${release_config}")
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
get_filename_component(debug_config_dir_name "${debug_config}" NAME)
|
||||
string(TOLOWER "${debug_config_dir_name}" debug_config_dir_name)
|
||||
if(debug_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
||||
file(REMOVE_RECURSE "${debug_config}")
|
||||
else()
|
||||
get_filename_component(debug_config_parent_dir "${debug_config}" DIRECTORY)
|
||||
get_filename_component(debug_config_dir_name "${debug_config_parent_dir}" NAME)
|
||||
string(TOLOWER "${debug_config_dir_name}" debug_config_dir_name)
|
||||
if(debug_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
||||
file(REMOVE_RECURSE "${debug_config_parent_dir}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_filename_component(release_config_dir_name "${release_config}" NAME)
|
||||
string(TOLOWER "${release_config_dir_name}" release_config_dir_name)
|
||||
if(release_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
||||
file(REMOVE_RECURSE "${release_config}")
|
||||
else()
|
||||
get_filename_component(release_config_parent_dir "${release_config}" DIRECTORY)
|
||||
get_filename_component(release_config_dir_name "${release_config_parent_dir}" NAME)
|
||||
string(TOLOWER "${release_config_dir_name}" release_config_dir_name)
|
||||
if(release_config_dir_name STREQUAL "cmake" AND NOT arg_DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
||||
file(REMOVE_RECURSE "${release_config_parent_dir}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
if(NOT EXISTS "${debug_share}")
|
||||
message(FATAL_ERROR "'${debug_share}' does not exist.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE release_targets
|
||||
"${release_share}/*-release.cmake"
|
||||
)
|
||||
foreach(release_target IN LISTS release_targets)
|
||||
file(READ "${release_target}" contents)
|
||||
string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" contents "${contents}")
|
||||
string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/${arg_TOOLS_PATH}/\\1" contents "${contents}")
|
||||
file(WRITE "${release_target}" "${contents}")
|
||||
endforeach()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(GLOB_RECURSE debug_targets
|
||||
"${debug_share}/*-debug.cmake"
|
||||
)
|
||||
foreach(debug_target IN LISTS debug_targets)
|
||||
file(RELATIVE_PATH debug_target_rel "${debug_share}" "${debug_target}")
|
||||
|
||||
file(READ "${debug_target}" contents)
|
||||
string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" contents "${contents}")
|
||||
string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/${arg_TOOLS_PATH}/\\1" contents "${contents}")
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" contents "${contents}")
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" contents "${contents}")
|
||||
file(WRITE "${release_share}/${debug_target_rel}" "${contents}")
|
||||
|
||||
file(REMOVE "${debug_target}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
#Fix ${_IMPORT_PREFIX} and absolute paths in cmake generated targets and configs;
|
||||
#Since those can be renamed we have to check in every *.cmake, but only once.
|
||||
file(GLOB_RECURSE main_cmakes "${release_share}/*.cmake")
|
||||
if(NOT DEFINED Z_VCPKG_CMAKE_CONFIG_ALREADY_FIXED_UP)
|
||||
vcpkg_list(SET Z_VCPKG_CMAKE_CONFIG_ALREADY_FIXED_UP)
|
||||
endif()
|
||||
foreach(already_fixed_up IN LISTS Z_VCPKG_CMAKE_CONFIG_ALREADY_FIXED_UP)
|
||||
vcpkg_list(REMOVE_ITEM main_cmakes "${already_fixed_up}")
|
||||
endforeach()
|
||||
vcpkg_list(APPEND Z_VCPKG_CMAKE_CONFIG_ALREADY_FIXED_UP ${main_cmakes})
|
||||
set(Z_VCPKG_CMAKE_CONFIG_ALREADY_FIXED_UP "${Z_VCPKG_CMAKE_CONFIG_ALREADY_FIXED_UP}" CACHE INTERNAL "")
|
||||
|
||||
foreach(main_cmake IN LISTS main_cmakes)
|
||||
file(READ "${main_cmake}" contents)
|
||||
# Note: I think the following comment is no longer true, since we now require the path to be `share/blah`
|
||||
# however, I don't know it for sure.
|
||||
# - nimazzuc
|
||||
|
||||
#This correction is not correct for all cases. To make it correct for all cases it needs to consider
|
||||
#original folder deepness to CURRENT_PACKAGES_DIR in comparison to the moved to folder deepness which
|
||||
#is always at least (>=) 2, e.g. share/${PORT}. Currently the code assumes it is always 2 although
|
||||
#this requirement is only true for the *Config.cmake. The targets are not required to be in the same
|
||||
#folder as the *Config.cmake!
|
||||
if(NOT arg_NO_PREFIX_CORRECTION)
|
||||
string(REGEX REPLACE
|
||||
[[get_filename_component\(_IMPORT_PREFIX "\${CMAKE_CURRENT_LIST_FILE}" PATH\)(
|
||||
get_filename_component\(_IMPORT_PREFIX "\${_IMPORT_PREFIX}" PATH\))*]]
|
||||
[[get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]]
|
||||
contents "${contents}") # see #1044 for details why this replacement is necessary. See #4782 why it must be a regex.
|
||||
string(REGEX REPLACE
|
||||
[[get_filename_component\(PACKAGE_PREFIX_DIR "\${CMAKE_CURRENT_LIST_DIR}/\.\./(\.\./)*" ABSOLUTE\)]]
|
||||
[[get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)]]
|
||||
contents "${contents}")
|
||||
string(REGEX REPLACE
|
||||
[[get_filename_component\(PACKAGE_PREFIX_DIR "\${CMAKE_CURRENT_LIST_DIR}/\.\.((\\|/)\.\.)*" ABSOLUTE\)]]
|
||||
[[get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)]]
|
||||
contents "${contents}") # This is a meson-related workaround, see https://github.com/mesonbuild/meson/issues/6955
|
||||
endif()
|
||||
|
||||
# Merge release and debug configurations of target property INTERFACE_LINK_LIBRARIES.
|
||||
string(REPLACE "${release_share}/" "${debug_share}/" debug_cmake "${main_cmake}")
|
||||
if(DEFINED VCPKG_BUILD_TYPE)
|
||||
# Skip. Warning: A release-only port in a dual-config installation
|
||||
# may pull release dependencies into the debug configuration.
|
||||
elseif(NOT contents MATCHES "INTERFACE_LINK_LIBRARIES")
|
||||
# Skip. No relevant properties.
|
||||
elseif(NOT contents MATCHES "# Generated CMake target import file\\.")
|
||||
# Skip. No safe assumptions about a matching debug import file.
|
||||
elseif(NOT EXISTS "${debug_cmake}")
|
||||
message(SEND_ERROR "Did not find a debug import file matching '${main_cmake}'")
|
||||
else()
|
||||
file(READ "${debug_cmake}" debug_contents)
|
||||
while(contents MATCHES "set_target_properties\\(([^ \$]*) PROPERTIES[^)]*\\)")
|
||||
set(matched_command "${CMAKE_MATCH_0}")
|
||||
string(REPLACE "+" "\\+" target "${CMAKE_MATCH_1}")
|
||||
if(NOT debug_contents MATCHES "set_target_properties\\(${target} PROPERTIES[^)]*\\)")
|
||||
message(SEND_ERROR "Did not find a debug configuration for target '${target}'.")
|
||||
endif()
|
||||
set(debug_command "${CMAKE_MATCH_0}")
|
||||
string(REGEX MATCH " INTERFACE_LINK_LIBRARIES \"([^\"]*)\"" release_line "${matched_command}")
|
||||
set(release_libs "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH " INTERFACE_LINK_LIBRARIES \"([^\"]*)\"" debug_line "${debug_command}")
|
||||
set(debug_libs "${CMAKE_MATCH_1}")
|
||||
z_vcpkg_cmake_config_fixup_merge(merged_libs release_libs debug_libs)
|
||||
string(REPLACE "${release_line}" " INTERFACE_LINK_LIBRARIES \"${merged_libs}\"" updated_command "${matched_command}")
|
||||
string(REPLACE "set_target_properties" "set_target_properties::done" updated_command "${updated_command}") # Prevend 2nd match
|
||||
string(REPLACE "${matched_command}" "${updated_command}" contents "${contents}")
|
||||
endwhile()
|
||||
string(REPLACE "set_target_properties::done" "set_target_properties" contents "${contents}") # Restore original command
|
||||
endif()
|
||||
|
||||
#Fix absolute paths to installed dir with ones relative to ${CMAKE_CURRENT_LIST_DIR}
|
||||
#This happens if vcpkg built libraries are directly linked to a target instead of using
|
||||
#an imported target.
|
||||
string(REPLACE "${CURRENT_INSTALLED_DIR}" [[${VCPKG_IMPORT_PREFIX}]] contents "${contents}")
|
||||
file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" cmake_current_packages_dir)
|
||||
string(REPLACE "${cmake_current_packages_dir}" [[${VCPKG_IMPORT_PREFIX}]] contents "${contents}")
|
||||
# If ${VCPKG_IMPORT_PREFIX} was actually used, inject a definition of it:
|
||||
string(FIND "${contents}" [[${VCPKG_IMPORT_PREFIX}]] index)
|
||||
if (NOT index STREQUAL "-1")
|
||||
get_filename_component(main_cmake_dir "${main_cmake}" DIRECTORY)
|
||||
# Calculate relative to be a sequence of "../"
|
||||
file(RELATIVE_PATH relative "${main_cmake_dir}" "${cmake_current_packages_dir}")
|
||||
string(PREPEND contents "get_filename_component(VCPKG_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}\/${relative}\" ABSOLUTE)\n")
|
||||
endif()
|
||||
|
||||
file(WRITE "${main_cmake}" "${contents}")
|
||||
endforeach()
|
||||
|
||||
file(GLOB_RECURSE unused_files
|
||||
"${debug_share}/*[Tt]argets.cmake"
|
||||
"${debug_share}/*[Cc]onfig.cmake"
|
||||
"${debug_share}/*[Cc]onfigVersion.cmake"
|
||||
"${debug_share}/*[Cc]onfig-version.cmake"
|
||||
)
|
||||
foreach(unused_file IN LISTS unused_files)
|
||||
file(REMOVE "${unused_file}")
|
||||
endforeach()
|
||||
|
||||
# Remove /debug/<target_path>/ if it's empty.
|
||||
file(GLOB_RECURSE remaining_files "${debug_share}/*")
|
||||
if(remaining_files STREQUAL "")
|
||||
file(REMOVE_RECURSE "${debug_share}")
|
||||
endif()
|
||||
|
||||
# Remove /debug/share/ if it's empty.
|
||||
file(GLOB_RECURSE remaining_files "${CURRENT_PACKAGES_DIR}/debug/share/*")
|
||||
if(remaining_files STREQUAL "")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Merges link interface library lists for release and debug
|
||||
# into a single expression which use generator expression as necessary.
|
||||
function(z_vcpkg_cmake_config_fixup_merge out_var release_var debug_var)
|
||||
set(release_libs "VCPKG;${${release_var}}")
|
||||
string(REGEX REPLACE ";optimized;([^;]*)" ";\\1" release_libs "${release_libs}")
|
||||
string(REGEX REPLACE ";debug;([^;]*)" ";" release_libs "${release_libs}")
|
||||
list(REMOVE_AT release_libs 0)
|
||||
list(FILTER release_libs EXCLUDE REGEX [[^\\[$]<\\[$]<CONFIG:DEBUG>:]])
|
||||
list(TRANSFORM release_libs REPLACE [[^\\[$]<\\[$]<NOT:\\[$]<CONFIG:DEBUG>>:(.*)>$]] "\\1")
|
||||
|
||||
set(debug_libs "VCPKG;${${debug_var}}")
|
||||
string(REGEX REPLACE ";optimized;([^;]*)" ";" debug_libs "${debug_libs}")
|
||||
string(REGEX REPLACE ";debug;([^;]*)" ";\\1" debug_libs "${debug_libs}")
|
||||
list(REMOVE_AT debug_libs 0)
|
||||
list(FILTER debug_libs EXCLUDE REGEX [[^\\[$]<\\[$]<NOT:\\[$]<CONFIG:DEBUG>>:]])
|
||||
list(TRANSFORM debug_libs REPLACE [[^\\[$]<\\[$]<CONFIG:DEBUG>:(.*)>$]] "\\1")
|
||||
|
||||
set(merged_libs "")
|
||||
foreach(release_lib debug_lib IN ZIP_LISTS release_libs debug_libs)
|
||||
if(release_lib STREQUAL debug_lib)
|
||||
list(APPEND merged_libs "${release_lib}")
|
||||
else()
|
||||
if(release_lib)
|
||||
list(APPEND merged_libs "\\\$<\\\$<NOT:\\\$<CONFIG:DEBUG>>:${release_lib}>")
|
||||
endif()
|
||||
if(debug_lib)
|
||||
list(APPEND merged_libs "\\\$<\\\$<CONFIG:DEBUG>:${debug_lib}>")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
set("${out_var}" "${merged_libs}" PARENT_SCOPE)
|
||||
endfunction()
|
|
@ -1,204 +0,0 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
set(VCPKG_LANGUAGES "C;CXX" CACHE STRING "Languages to enables for this project")
|
||||
|
||||
set(OUTPUT_STRING)
|
||||
# Build default checklists
|
||||
list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_CROSSCOMPILING
|
||||
CMAKE_SYSTEM_NAME
|
||||
CMAKE_HOST_SYSTEM_NAME
|
||||
CMAKE_SYSTEM_PROCESSOR
|
||||
CMAKE_HOST_SYSTEM_PROCESSOR
|
||||
CMAKE_SIZEOF_VOID_P
|
||||
MSVC
|
||||
MSVC_VERSION)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_OSX_DEPLOYMENT_TARGET
|
||||
CMAKE_OSX_SYSROOT)
|
||||
endif()
|
||||
# Programs to check
|
||||
set(PROGLIST AR RANLIB STRIP NM OBJDUMP DLLTOOL MT LINKER)
|
||||
foreach(prog IN LISTS PROGLIST)
|
||||
list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${prog})
|
||||
endforeach()
|
||||
set(COMPILERS ${VCPKG_LANGUAGES} RC)
|
||||
foreach(prog IN LISTS COMPILERS)
|
||||
list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${prog}_COMPILER)
|
||||
list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${prog}_COMPILER_ID)
|
||||
endforeach()
|
||||
# Variables to check
|
||||
foreach(_lang IN LISTS VCPKG_LANGUAGES)
|
||||
list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_STANDARD_INCLUDE_DIRECTORIES)
|
||||
list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_STANDARD_LIBRARIES)
|
||||
list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_STANDARD)
|
||||
list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_COMPILE_FEATURES)
|
||||
list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_EXTENSION)
|
||||
# Probably never required since implicit.
|
||||
#list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES)
|
||||
#list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_INCLUDE_DIRECTORIES)
|
||||
#list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_LINK_DIRECTORIES)
|
||||
#list(APPEND VCPKG_DEFAULT_VARS_TO_CHECK CMAKE_${_lang}_IMPLICIT_LINK_LIBRARIES)
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES VCPKG_DEFAULT_VARS_TO_CHECK)
|
||||
|
||||
# Environment variables to check.
|
||||
list(APPEND VCPKG_DEFAULT_ENV_VARS_TO_CHECK PATH INCLUDE C_INCLUDE_PATH CPLUS_INCLUDE_PATH LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH)
|
||||
list(REMOVE_DUPLICATES VCPKG_DEFAULT_ENV_VARS_TO_CHECK)
|
||||
|
||||
#Flags to check. Flags are a bit special since they are configuration aware.
|
||||
set(FLAGS ${VCPKG_LANGUAGES} RC SHARED_LINKER STATIC_LINKER EXE_LINKER)
|
||||
foreach(flag IN LISTS FLAGS)
|
||||
list(APPEND VCPKG_DEFAULT_FLAGS_TO_CHECK CMAKE_${flag}_FLAGS)
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES VCPKG_DEFAULT_FLAGS_TO_CHECK)
|
||||
|
||||
#Language-specific flags.
|
||||
foreach(_lang IN LISTS VCPKG_LANGUAGES)
|
||||
list(APPEND VCPKG_LANG_FLAGS CMAKE_${_lang}_FLAGS)
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES VCPKG_LANG_FLAGS)
|
||||
|
||||
# TODO if ever necessary: Properties to check
|
||||
|
||||
set(VCPKG_VAR_PREFIX "VCPKG_DETECTED" CACHE STRING "Variable prefix to use for detected flags")
|
||||
set(VCPKG_VARS_TO_CHECK "${VCPKG_DEFAULT_VARS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults")
|
||||
set(VCPKG_FLAGS_TO_CHECK "${VCPKG_DEFAULT_FLAGS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults")
|
||||
set(VCPKG_ENV_VARS_TO_CHECK "${VCPKG_DEFAULT_ENV_VARS_TO_CHECK}" CACHE STRING "Variables to check. If not given there is a list of defaults")
|
||||
|
||||
if(NOT VCPKG_OUTPUT_FILE)
|
||||
message(FATAL_ERROR "VCPKG_OUTPUT_FILE is required to be defined")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
message(FATAL_ERROR "CMAKE_BUILD_TYPE is required to be defined")
|
||||
else()
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" VCPKG_CONFIGS)
|
||||
endif()
|
||||
|
||||
|
||||
project(get_cmake_vars LANGUAGES ${VCPKG_LANGUAGES})
|
||||
|
||||
foreach(VAR IN LISTS VCPKG_VARS_TO_CHECK VCPKG_FLAGS_TO_CHECK)
|
||||
string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_${VAR} \"${${VAR}}\")\n")
|
||||
endforeach()
|
||||
|
||||
foreach(_env IN LISTS VCPKG_ENV_VARS_TO_CHECK)
|
||||
if(CMAKE_HOST_WIN32)
|
||||
string(REPLACE "\\" "/" ENV_${_env} "$ENV{${_env}}")
|
||||
string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_ENV_${_env} \"${ENV_${_env}}\")\n")
|
||||
else()
|
||||
string(APPEND OUTPUT_STRING "set(${VCPKG_VAR_PREFIX}_ENV_${_env} \"$ENV{${_env}}\")\n")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(EXTRA_FLAGS "")
|
||||
|
||||
if(APPLE)
|
||||
if(CMAKE_OSX_SYSROOT)
|
||||
string(APPEND EXTRA_FLAGS " -isysroot \"${CMAKE_OSX_SYSROOT}\"")
|
||||
endif()
|
||||
foreach(arch IN LISTS CMAKE_OSX_ARCHITECTURES)
|
||||
string(APPEND EXTRA_FLAGS " -arch ${arch}")
|
||||
endforeach()
|
||||
if(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
string(APPEND EXTRA_FLAGS " -mios-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
string(APPEND EXTRA_FLAGS " -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_TARGET)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
string(APPEND EXTRA_FLAGS " \"${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}\"")
|
||||
elseif(CMAKE_CXX_COMPILE_OPTIONS_TARGET)
|
||||
string(APPEND EXTRA_FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_TARGET} \"${CMAKE_CXX_COMPILER_TARGET}\"")
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
string(APPEND EXTRA_FLAGS " \"${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}\"")
|
||||
else()
|
||||
string(APPEND EXTRA_FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} \"${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}\"")
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_SYSROOT AND CMAKE_CXX_COMPILE_OPTIONS_SYSROOT)
|
||||
string(APPEND EXTRA_FLAGS " \"${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}\"")
|
||||
endif()
|
||||
|
||||
foreach(flags CXX C SHARED_LINKER EXE_LINKER)
|
||||
set(${flags}_FLAGS "${CMAKE_${flags}_FLAGS} ${CMAKE_${flags}_FLAGS_${VCPKG_CONFIGS}} ${EXTRA_FLAGS}")
|
||||
endforeach()
|
||||
|
||||
foreach(flags STATIC_LINKER RC)
|
||||
set(${flags}_FLAGS "${CMAKE_${flags}_FLAGS} ${CMAKE_${flags}_FLAGS_${VCPKG_CONFIGS}}")
|
||||
endforeach()
|
||||
|
||||
foreach(incdir IN LISTS CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES)
|
||||
string(APPEND CXX_FLAGS " \"${CMAKE_INCLUDE_FLAG_CXX}${incdir}\"")
|
||||
endforeach()
|
||||
|
||||
foreach(incdir IN LISTS CMAKE_C_STANDARD_INCLUDE_DIRECTORIES)
|
||||
string(APPEND C_FLAGS " \"${CMAKE_INCLUDE_FLAG_C}${incdir}\"")
|
||||
endforeach()
|
||||
|
||||
foreach(flag CXX C SHARED_LINKER EXE_LINKER STATIC_LINKER RC)
|
||||
# When using MSVC, maybe transform /flags to -flags.
|
||||
# When cross compiling, "/flags" may be an absolute path starting with /, so don't transform.
|
||||
# Otherwise, transform to improve compatibility with scripts interpreting "/flags" as a path.
|
||||
if(MSVC AND "${CMAKE_HOST_SYSTEM_NAME}" MATCHES "Windows")
|
||||
# This implementation is imperfect because it fails on directories with trailing spaces,
|
||||
# but those are rare.
|
||||
string(REGEX REPLACE "(^| )/" "\\1-" ${flag}_FLAGS "${${flag}_FLAGS}")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
if("${flag}" STREQUAL "CXX")
|
||||
string(APPEND ${flag}_FLAGS " -ZW:nostdlib")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
string(REPLACE "\\" "\\\\" ${flag}_FLAGS "${${flag}_FLAGS}")
|
||||
string(REPLACE "\"" "\\\"" ${flag}_FLAGS "${${flag}_FLAGS}")
|
||||
string(REPLACE "\$" "\\\$" ${flag}_FLAGS "${${flag}_FLAGS}")
|
||||
string(APPEND OUTPUT_STRING "set(VCPKG_COMBINED_${flag}_FLAGS_${VCPKG_CONFIGS} \"${${flag}_FLAGS}\")\n")
|
||||
endforeach()
|
||||
|
||||
file(WRITE "${VCPKG_OUTPUT_FILE}" "${OUTPUT_STRING}")
|
||||
|
||||
# Programs:
|
||||
# CMAKE_AR
|
||||
# CMAKE_<LANG>_COMPILER_AR (Wrapper)
|
||||
# CMAKE_RANLIB
|
||||
# CMAKE_<LANG>_COMPILER_RANLIB
|
||||
# CMAKE_STRIP
|
||||
# CMAKE_NM
|
||||
# CMAKE_OBJDUMP
|
||||
# CMAKE_DLLTOOL
|
||||
# CMAKE_MT
|
||||
# CMAKE_LINKER
|
||||
# CMAKE_C_COMPILER
|
||||
# CMAKE_CXX_COMPILER
|
||||
# CMAKE_RC_COMPILER
|
||||
|
||||
# Program details:
|
||||
# CMAKE_<LANG>_COMPILER_ID
|
||||
# MSVC
|
||||
# MSVC_VERSION
|
||||
|
||||
# Flags:
|
||||
# CMAKE_<LANG>_FLAGS
|
||||
# CMAKE_<LANG>_FLAGS_<CONFIG>
|
||||
# CMAKE_RC_FLAGS
|
||||
# CMAKE_SHARED_LINKER_FLAGS
|
||||
# CMAKE_SHARED_LINKER_FLAGS_<CONFIG>
|
||||
# CMAKE_STATIC_LINKER_FLAGS
|
||||
# CMAKE_STATIC_LINKER_FLAGS_<CONFIG>
|
||||
# CMAKE_EXE_LINKER_FLAGS
|
||||
# CMAKE_EXE_LINKER_FLAGS_<CONFIG>
|
||||
|
||||
# Additional information:
|
||||
# CMAKE_SIZEOF_VOID_P
|
||||
# CMAKE_CROSSCOMPILING
|
||||
# CMAKE_SYSTEM_NAME
|
||||
# CMAKE_HOST_SYSTEM_NAME
|
||||
# CMAKE_SYSTEM_PROCESSOR
|
||||
# CMAKE_HOST_SYSTEM_PROCESSOR
|
|
@ -1,14 +0,0 @@
|
|||
if(VCPKG_CROSSCOMPILING)
|
||||
# make FATAL_ERROR in CI when issue #16773 fixed
|
||||
message(WARNING "vcpkg-cmake-get-vars is a host-only port; please mark it as a host port in your dependencies.")
|
||||
endif()
|
||||
|
||||
file(INSTALL
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_get_vars.cmake"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/cmake_get_vars"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
file(INSTALL "${VCPKG_ROOT_DIR}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
set(VCPKG_POLICY_CMAKE_HELPER_PORT enabled)
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
include("${CMAKE_CURRENT_LIST_DIR}/../vcpkg-cmake/vcpkg-port-config.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_get_vars.cmake")
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"name": "vcpkg-cmake-get-vars",
|
||||
"version-date": "2022-05-10",
|
||||
"port-version": 1,
|
||||
"documentation": "https://vcpkg.io/en/docs/README.html",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
include_guard(GLOBAL)
|
||||
|
||||
set(Z_VCPKG_CMAKE_GET_VARS_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "")
|
||||
|
||||
function(vcpkg_cmake_get_vars out_file)
|
||||
cmake_parse_arguments(PARSE_ARGV 1 arg "" "" "")
|
||||
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CACHE{Z_VCPKG_CMAKE_GET_VARS_FILE})
|
||||
set(Z_VCPKG_CMAKE_GET_VARS_FILE "${CURRENT_BUILDTREES_DIR}/cmake-get-vars-${TARGET_TRIPLET}.cmake.log"
|
||||
CACHE PATH "The file to include to access the CMake variables from a generated project.")
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${Z_VCPKG_CMAKE_GET_VARS_CURRENT_LIST_DIR}/cmake_get_vars"
|
||||
OPTIONS_DEBUG "-DVCPKG_OUTPUT_FILE:PATH=${CURRENT_BUILDTREES_DIR}/cmake-get-vars-${TARGET_TRIPLET}-dbg.cmake.log"
|
||||
OPTIONS_RELEASE "-DVCPKG_OUTPUT_FILE:PATH=${CURRENT_BUILDTREES_DIR}/cmake-get-vars-${TARGET_TRIPLET}-rel.cmake.log"
|
||||
LOGFILE_BASE cmake-get-vars-${TARGET_TRIPLET}
|
||||
Z_CMAKE_GET_VARS_USAGE # be quiet, don't set variables...
|
||||
)
|
||||
|
||||
set(include_string "")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
string(APPEND include_string "include(\"\${CMAKE_CURRENT_LIST_DIR}/cmake-get-vars-${TARGET_TRIPLET}-rel.cmake.log\")\n")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
string(APPEND include_string "include(\"\${CMAKE_CURRENT_LIST_DIR}/cmake-get-vars-${TARGET_TRIPLET}-dbg.cmake.log\")\n")
|
||||
endif()
|
||||
file(WRITE "${Z_VCPKG_CMAKE_GET_VARS_FILE}" "${include_string}")
|
||||
endif()
|
||||
|
||||
set("${out_file}" "${Z_VCPKG_CMAKE_GET_VARS_FILE}" PARENT_SCOPE)
|
||||
endfunction()
|
|
@ -1,14 +0,0 @@
|
|||
if(VCPKG_CROSSCOMPILING)
|
||||
# make FATAL_ERROR in CI when issue #16773 fixed
|
||||
message(WARNING "vcpkg-cmake is a host-only port; please mark it as a host port in your dependencies.")
|
||||
endif()
|
||||
|
||||
file(INSTALL
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_configure.cmake"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_build.cmake"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_install.cmake"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
file(INSTALL "${VCPKG_ROOT_DIR}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
set(VCPKG_POLICY_CMAKE_HELPER_PORT enabled)
|
|
@ -1,3 +0,0 @@
|
|||
include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_configure.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_build.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/vcpkg_cmake_install.cmake")
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"version-date": "2022-07-02",
|
||||
"documentation": "https://vcpkg.io/en/docs/maintainers/ports/vcpkg-cmake.html",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -1,91 +0,0 @@
|
|||
include_guard(GLOBAL)
|
||||
|
||||
function(vcpkg_cmake_build)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "arg" "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "TARGET;LOGFILE_BASE" "")
|
||||
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "vcpkg_cmake_build was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
if(NOT DEFINED arg_LOGFILE_BASE)
|
||||
set(arg_LOGFILE_BASE "build")
|
||||
endif()
|
||||
vcpkg_list(SET build_param)
|
||||
vcpkg_list(SET parallel_param)
|
||||
vcpkg_list(SET no_parallel_param)
|
||||
|
||||
if("${Z_VCPKG_CMAKE_GENERATOR}" STREQUAL "Ninja")
|
||||
vcpkg_list(SET build_param "-v") # verbose output
|
||||
vcpkg_list(SET parallel_param "-j${VCPKG_CONCURRENCY}")
|
||||
vcpkg_list(SET no_parallel_param "-j1")
|
||||
elseif("${Z_VCPKG_CMAKE_GENERATOR}" MATCHES "^Visual Studio")
|
||||
vcpkg_list(SET build_param
|
||||
"/p:VCPkgLocalAppDataDisabled=true"
|
||||
"/p:UseIntelMKL=No"
|
||||
)
|
||||
vcpkg_list(SET parallel_param "/m")
|
||||
elseif("${Z_VCPKG_CMAKE_GENERATOR}" STREQUAL "NMake Makefiles")
|
||||
# No options are currently added for nmake builds
|
||||
elseif(Z_VCPKG_CMAKE_GENERATOR STREQUAL "Unix Makefiles")
|
||||
vcpkg_list(SET build_args "VERBOSE=1")
|
||||
vcpkg_list(SET parallel_args "-j${VCPKG_CONCURRENCY}")
|
||||
vcpkg_list(SET no_parallel_args "")
|
||||
elseif(Z_VCPKG_CMAKE_GENERATOR STREQUAL "Xcode")
|
||||
vcpkg_list(SET parallel_args -jobs "${VCPKG_CONCURRENCY}")
|
||||
vcpkg_list(SET no_parallel_args -jobs 1)
|
||||
else()
|
||||
message(WARNING "Unrecognized GENERATOR setting from vcpkg_cmake_configure().")
|
||||
endif()
|
||||
|
||||
vcpkg_list(SET target_param)
|
||||
if(arg_TARGET)
|
||||
vcpkg_list(SET target_param "--target" "${arg_TARGET}")
|
||||
endif()
|
||||
|
||||
foreach(build_type IN ITEMS debug release)
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "${build_type}")
|
||||
if("${build_type}" STREQUAL "debug")
|
||||
set(short_build_type "dbg")
|
||||
set(config "Debug")
|
||||
else()
|
||||
set(short_build_type "rel")
|
||||
set(config "Release")
|
||||
endif()
|
||||
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-${short_build_type}")
|
||||
|
||||
if(arg_ADD_BIN_TO_PATH)
|
||||
vcpkg_backup_env_variables(VARS PATH)
|
||||
if("${build_type}" STREQUAL "debug")
|
||||
vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin")
|
||||
else()
|
||||
vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(arg_DISABLE_PARALLEL)
|
||||
vcpkg_execute_build_process(
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" --build . --config "${config}" ${target_param}
|
||||
-- ${build_param} ${no_parallel_param}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${short_build_type}"
|
||||
LOGNAME "${arg_LOGFILE_BASE}-${TARGET_TRIPLET}-${short_build_type}"
|
||||
)
|
||||
else()
|
||||
vcpkg_execute_build_process(
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" --build . --config "${config}" ${target_param}
|
||||
-- ${build_param} ${parallel_param}
|
||||
NO_PARALLEL_COMMAND
|
||||
"${CMAKE_COMMAND}" --build . --config "${config}" ${target_param}
|
||||
-- ${build_param} ${no_parallel_param}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${short_build_type}"
|
||||
LOGNAME "${arg_LOGFILE_BASE}-${TARGET_TRIPLET}-${short_build_type}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(arg_ADD_BIN_TO_PATH)
|
||||
vcpkg_restore_env_variables(VARS PATH)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
|
@ -1,311 +0,0 @@
|
|||
include_guard(GLOBAL)
|
||||
|
||||
macro(z_vcpkg_cmake_configure_both_set_or_unset var1 var2)
|
||||
if(DEFINED ${var1} AND NOT DEFINED ${var2})
|
||||
message(FATAL_ERROR "If ${var1} is set, then ${var2} must be set.")
|
||||
elseif(NOT DEFINED ${var1} AND DEFINED ${var2})
|
||||
message(FATAL_ERROR "If ${var2} is set, then ${var1} must be set.")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function(vcpkg_cmake_configure)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "arg"
|
||||
"PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;WINDOWS_USE_MSBUILD;NO_CHARSET_FLAG;Z_CMAKE_GET_VARS_USAGE"
|
||||
"SOURCE_PATH;GENERATOR;LOGFILE_BASE"
|
||||
"OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;MAYBE_UNUSED_VARIABLES"
|
||||
)
|
||||
|
||||
if(NOT arg_Z_CMAKE_GET_VARS_USAGE AND DEFINED CACHE{Z_VCPKG_CMAKE_GENERATOR})
|
||||
message(WARNING "${CMAKE_CURRENT_FUNCTION} already called; this function should only be called once.")
|
||||
endif()
|
||||
if(arg_PREFER_NINJA)
|
||||
message(WARNING "PREFER_NINJA has been deprecated in ${CMAKE_CURRENT_FUNCTION}. Please remove it from the portfile!")
|
||||
endif()
|
||||
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED arg_SOURCE_PATH)
|
||||
message(FATAL_ERROR "SOURCE_PATH must be set")
|
||||
endif()
|
||||
if(NOT DEFINED arg_LOGFILE_BASE)
|
||||
set(arg_LOGFILE_BASE "config-${TARGET_TRIPLET}")
|
||||
endif()
|
||||
|
||||
set(manually_specified_variables "")
|
||||
|
||||
if(arg_Z_CMAKE_GET_VARS_USAGE)
|
||||
set(configuring_message "Getting CMake variables for ${TARGET_TRIPLET}")
|
||||
else()
|
||||
set(configuring_message "Configuring ${TARGET_TRIPLET}")
|
||||
|
||||
foreach(option IN LISTS arg_OPTIONS arg_OPTIONS_RELEASE arg_OPTIONS_DEBUG)
|
||||
if("${option}" MATCHES "^-D([^:=]*)[:=]")
|
||||
vcpkg_list(APPEND manually_specified_variables "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
endforeach()
|
||||
vcpkg_list(REMOVE_DUPLICATES manually_specified_variables)
|
||||
foreach(maybe_unused_var IN LISTS arg_MAYBE_UNUSED_VARIABLES)
|
||||
vcpkg_list(REMOVE_ITEM manually_specified_variables "${maybe_unused_var}")
|
||||
endforeach()
|
||||
debug_message("manually specified variables: ${manually_specified_variables}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
if(DEFINED ENV{PROCESSOR_ARCHITEW6432})
|
||||
set(host_architecture "$ENV{PROCESSOR_ARCHITEW6432}")
|
||||
else()
|
||||
set(host_architecture "$ENV{PROCESSOR_ARCHITECTURE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(ninja_can_be_used ON) # Ninja as generator
|
||||
set(ninja_host ON) # Ninja as parallel configurator
|
||||
|
||||
if(host_architecture STREQUAL "x86")
|
||||
# Prebuilt ninja binaries are only provided for x64 hosts
|
||||
set(ninja_can_be_used OFF)
|
||||
set(ninja_host OFF)
|
||||
endif()
|
||||
|
||||
set(generator "Ninja")
|
||||
if(DEFINED arg_GENERATOR)
|
||||
set(generator "${arg_GENERATOR}")
|
||||
elseif(arg_WINDOWS_USE_MSBUILD OR NOT ninja_can_be_used)
|
||||
set(generator "")
|
||||
set(arch "")
|
||||
z_vcpkg_get_visual_studio_generator(OUT_GENERATOR generator OUT_ARCH arch)
|
||||
endif()
|
||||
|
||||
if(NOT generator)
|
||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME "Windows")
|
||||
endif()
|
||||
message(FATAL_ERROR "Unable to determine appropriate generator for: "
|
||||
"${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}")
|
||||
endif()
|
||||
|
||||
# If we use Ninja, make sure it's on PATH
|
||||
if(generator STREQUAL "Ninja" AND NOT DEFINED ENV{VCPKG_FORCE_SYSTEM_BINARIES})
|
||||
vcpkg_find_acquire_program(NINJA)
|
||||
get_filename_component(ninja_path "${NINJA}" DIRECTORY)
|
||||
vcpkg_add_to_path("${ninja_path}")
|
||||
vcpkg_list(APPEND arg_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}")
|
||||
endif()
|
||||
|
||||
set(build_dir_release "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
set(build_dir_debug "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
file(REMOVE_RECURSE
|
||||
"${build_dir_release}"
|
||||
"${build_dir_debug}")
|
||||
file(MAKE_DIRECTORY "${build_dir_release}")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(MAKE_DIRECTORY "${build_dir_debug}")
|
||||
endif()
|
||||
|
||||
if(DEFINED VCPKG_CMAKE_SYSTEM_NAME)
|
||||
vcpkg_list(APPEND arg_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}")
|
||||
if(VCPKG_TARGET_IS_UWP AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
|
||||
set(VCPKG_CMAKE_SYSTEM_VERSION 10.0)
|
||||
elseif(VCPKG_TARGET_IS_ANDROID AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
|
||||
set(VCPKG_CMAKE_SYSTEM_VERSION 21)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
|
||||
vcpkg_list(APPEND arg_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
vcpkg_list(APPEND arg_OPTIONS "-DBUILD_SHARED_LIBS=ON")
|
||||
elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_list(APPEND arg_OPTIONS "-DBUILD_SHARED_LIBS=OFF")
|
||||
else()
|
||||
message(FATAL_ERROR
|
||||
"Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". "
|
||||
"It must be \"static\" or \"dynamic\"")
|
||||
endif()
|
||||
|
||||
z_vcpkg_cmake_configure_both_set_or_unset(VCPKG_CXX_FLAGS_DEBUG VCPKG_C_FLAGS_DEBUG)
|
||||
z_vcpkg_cmake_configure_both_set_or_unset(VCPKG_CXX_FLAGS_RELEASE VCPKG_C_FLAGS_RELEASE)
|
||||
z_vcpkg_cmake_configure_both_set_or_unset(VCPKG_CXX_FLAGS VCPKG_C_FLAGS)
|
||||
|
||||
set(VCPKG_SET_CHARSET_FLAG ON)
|
||||
if(arg_NO_CHARSET_FLAG)
|
||||
set(VCPKG_SET_CHARSET_FLAG OFF)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
|
||||
z_vcpkg_select_default_vcpkg_chainload_toolchain()
|
||||
endif()
|
||||
|
||||
list(JOIN VCPKG_TARGET_ARCHITECTURE "\;" target_architecture_string)
|
||||
vcpkg_list(APPEND arg_OPTIONS
|
||||
"-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}"
|
||||
"-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}"
|
||||
"-DVCPKG_SET_CHARSET_FLAG=${VCPKG_SET_CHARSET_FLAG}"
|
||||
"-DVCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}"
|
||||
"-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
|
||||
"-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
|
||||
"-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON"
|
||||
"-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE"
|
||||
"-DCMAKE_VERBOSE_MAKEFILE=ON"
|
||||
"-DVCPKG_APPLOCAL_DEPS=OFF"
|
||||
"-DCMAKE_TOOLCHAIN_FILE=${SCRIPTS}/buildsystems/vcpkg.cmake"
|
||||
"-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON"
|
||||
"-DVCPKG_CXX_FLAGS=${VCPKG_CXX_FLAGS}"
|
||||
"-DVCPKG_CXX_FLAGS_RELEASE=${VCPKG_CXX_FLAGS_RELEASE}"
|
||||
"-DVCPKG_CXX_FLAGS_DEBUG=${VCPKG_CXX_FLAGS_DEBUG}"
|
||||
"-DVCPKG_C_FLAGS=${VCPKG_C_FLAGS}"
|
||||
"-DVCPKG_C_FLAGS_RELEASE=${VCPKG_C_FLAGS_RELEASE}"
|
||||
"-DVCPKG_C_FLAGS_DEBUG=${VCPKG_C_FLAGS_DEBUG}"
|
||||
"-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}"
|
||||
"-DVCPKG_LINKER_FLAGS=${VCPKG_LINKER_FLAGS}"
|
||||
"-DVCPKG_LINKER_FLAGS_RELEASE=${VCPKG_LINKER_FLAGS_RELEASE}"
|
||||
"-DVCPKG_LINKER_FLAGS_DEBUG=${VCPKG_LINKER_FLAGS_DEBUG}"
|
||||
"-DVCPKG_TARGET_ARCHITECTURE=${target_architecture_string}"
|
||||
"-DCMAKE_INSTALL_LIBDIR:STRING=lib"
|
||||
"-DCMAKE_INSTALL_BINDIR:STRING=bin"
|
||||
"-D_VCPKG_ROOT_DIR=${VCPKG_ROOT_DIR}"
|
||||
"-D_VCPKG_INSTALLED_DIR=${_VCPKG_INSTALLED_DIR}"
|
||||
"-DVCPKG_MANIFEST_INSTALL=OFF"
|
||||
)
|
||||
|
||||
if(DEFINED arch AND NOT arch STREQUAL "")
|
||||
vcpkg_list(APPEND arg_OPTIONS "-A${arch}")
|
||||
endif()
|
||||
|
||||
# Sets configuration variables for macOS builds
|
||||
foreach(config_var IN ITEMS INSTALL_NAME_DIR OSX_DEPLOYMENT_TARGET OSX_SYSROOT OSX_ARCHITECTURES)
|
||||
if(DEFINED VCPKG_${config_var})
|
||||
vcpkg_list(APPEND arg_OPTIONS "-DCMAKE_${config_var}=${VCPKG_${config_var}}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Allow overrides / additional configuration variables from triplets
|
||||
if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS)
|
||||
vcpkg_list(APPEND arg_OPTIONS ${VCPKG_CMAKE_CONFIGURE_OPTIONS})
|
||||
endif()
|
||||
if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE)
|
||||
vcpkg_list(APPEND arg_OPTIONS_RELEASE ${VCPKG_CMAKE_CONFIGURE_OPTIONS_RELEASE})
|
||||
endif()
|
||||
if(DEFINED VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG)
|
||||
vcpkg_list(APPEND arg_OPTIONS_DEBUG ${VCPKG_CMAKE_CONFIGURE_OPTIONS_DEBUG})
|
||||
endif()
|
||||
|
||||
vcpkg_list(SET rel_command
|
||||
"${CMAKE_COMMAND}" "${arg_SOURCE_PATH}"
|
||||
-G "${generator}"
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}"
|
||||
${arg_OPTIONS} ${arg_OPTIONS_RELEASE})
|
||||
vcpkg_list(SET dbg_command
|
||||
"${CMAKE_COMMAND}" "${arg_SOURCE_PATH}"
|
||||
-G "${generator}"
|
||||
"-DCMAKE_BUILD_TYPE=Debug"
|
||||
"-DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug"
|
||||
${arg_OPTIONS} ${arg_OPTIONS_DEBUG})
|
||||
|
||||
if(ninja_host AND CMAKE_HOST_WIN32 AND NOT arg_DISABLE_PARALLEL_CONFIGURE)
|
||||
vcpkg_list(APPEND arg_OPTIONS "-DCMAKE_DISABLE_SOURCE_CHANGES=ON")
|
||||
|
||||
vcpkg_find_acquire_program(NINJA)
|
||||
if(NOT DEFINED ninja_path)
|
||||
# if ninja_path was defined above, we've already done this
|
||||
get_filename_component(ninja_path "${NINJA}" DIRECTORY)
|
||||
vcpkg_add_to_path("${ninja_path}")
|
||||
endif()
|
||||
|
||||
#parallelize the configure step
|
||||
set(ninja_configure_contents
|
||||
"rule CreateProcess\n command = \$process\n\n"
|
||||
)
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "release")
|
||||
z_vcpkg_configure_cmake_build_cmakecache(ninja_configure_contents ".." "rel")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "debug")
|
||||
z_vcpkg_configure_cmake_build_cmakecache(ninja_configure_contents "../../${TARGET_TRIPLET}-dbg" "dbg")
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY "${build_dir_release}/vcpkg-parallel-configure")
|
||||
file(WRITE
|
||||
"${build_dir_release}/vcpkg-parallel-configure/build.ninja"
|
||||
"${ninja_configure_contents}")
|
||||
|
||||
message(STATUS "${configuring_message}")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND "${NINJA}" -v
|
||||
WORKING_DIRECTORY "${build_dir_release}/vcpkg-parallel-configure"
|
||||
LOGNAME "${arg_LOGFILE_BASE}"
|
||||
SAVE_LOG_FILES ../../${TARGET_TRIPLET}-dbg/CMakeCache.txt ../CMakeCache.txt
|
||||
)
|
||||
|
||||
vcpkg_list(APPEND config_logs
|
||||
"${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-out.log"
|
||||
"${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-err.log")
|
||||
else()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "debug")
|
||||
message(STATUS "${configuring_message}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${dbg_command}
|
||||
WORKING_DIRECTORY "${build_dir_debug}"
|
||||
LOGNAME "${arg_LOGFILE_BASE}-dbg"
|
||||
SAVE_LOG_FILES CMakeCache.txt
|
||||
)
|
||||
vcpkg_list(APPEND config_logs
|
||||
"${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-dbg-out.log"
|
||||
"${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-dbg-err.log")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "release")
|
||||
message(STATUS "${configuring_message}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${rel_command}
|
||||
WORKING_DIRECTORY "${build_dir_release}"
|
||||
LOGNAME "${arg_LOGFILE_BASE}-rel"
|
||||
SAVE_LOG_FILES CMakeCache.txt
|
||||
)
|
||||
vcpkg_list(APPEND config_logs
|
||||
"${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-rel-out.log"
|
||||
"${CURRENT_BUILDTREES_DIR}/${arg_LOGFILE_BASE}-rel-err.log")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(all_unused_variables)
|
||||
foreach(config_log IN LISTS config_logs)
|
||||
if(NOT EXISTS "${config_log}")
|
||||
continue()
|
||||
endif()
|
||||
file(READ "${config_log}" log_contents)
|
||||
debug_message("Reading configure log ${config_log}...")
|
||||
if(NOT log_contents MATCHES "Manually-specified variables were not used by the project:\n\n(( [^\n]*\n)*)")
|
||||
continue()
|
||||
endif()
|
||||
string(STRIP "${CMAKE_MATCH_1}" unused_variables) # remove leading ` ` and trailing `\n`
|
||||
string(REPLACE "\n " ";" unused_variables "${unused_variables}")
|
||||
debug_message("unused variables: ${unused_variables}")
|
||||
foreach(unused_variable IN LISTS unused_variables)
|
||||
if(unused_variable IN_LIST manually_specified_variables)
|
||||
debug_message("manually specified unused variable: ${unused_variable}")
|
||||
vcpkg_list(APPEND all_unused_variables "${unused_variable}")
|
||||
else()
|
||||
debug_message("unused variable (not manually specified): ${unused_variable}")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
if(DEFINED all_unused_variables)
|
||||
vcpkg_list(REMOVE_DUPLICATES all_unused_variables)
|
||||
vcpkg_list(JOIN all_unused_variables "\n " all_unused_variables)
|
||||
message(WARNING "The following variables are not used in CMakeLists.txt:
|
||||
${all_unused_variables}
|
||||
Please recheck them and remove the unnecessary options from the `vcpkg_cmake_configure` call.
|
||||
If these options should still be passed for whatever reason, please use the `MAYBE_UNUSED_VARIABLES` argument.")
|
||||
endif()
|
||||
|
||||
if(NOT arg_Z_CMAKE_GET_VARS_USAGE)
|
||||
set(Z_VCPKG_CMAKE_GENERATOR "${generator}" CACHE INTERNAL "The generator which was used to configure CMake.")
|
||||
endif()
|
||||
endfunction()
|
|
@ -1,21 +0,0 @@
|
|||
include_guard(GLOBAL)
|
||||
|
||||
function(vcpkg_cmake_install)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "arg" "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "" "")
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "vcpkg_cmake_install was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
set(args)
|
||||
foreach(arg IN ITEMS DISABLE_PARALLEL ADD_BIN_TO_PATH)
|
||||
if(arg_${arg})
|
||||
list(APPEND args "${arg}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
vcpkg_cmake_build(
|
||||
${args}
|
||||
LOGFILE_BASE install
|
||||
TARGET install
|
||||
)
|
||||
endfunction()
|
20
conanfile.py
20
conanfile.py
File diff suppressed because one or more lines are too long
|
@ -68,8 +68,8 @@ foreach(EXTERNAL ${OPTIONAL_EXTERNALS})
|
|||
endif ()
|
||||
endforeach()
|
||||
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
find_package(Qt5LinguistToolsMacros)
|
||||
# find_package(Qt5LinguistTools REQUIRED)
|
||||
# find_package(Qt5LinguistToolsMacros)
|
||||
|
||||
if (WIN32)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -bigobj")
|
||||
|
@ -245,6 +245,7 @@ target_opengl()
|
|||
add_crashpad()
|
||||
target_breakpad()
|
||||
target_json()
|
||||
target_glm()
|
||||
target_discord_rpc()
|
||||
|
||||
# perform standard include and linking for found externals
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
// FIXME quazip hasn't been built on the android toolchain
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
#include <quazip5/quazip.h>
|
||||
#include <quazip5/JlCompress.h>
|
||||
#include <quazip/quazip.h>
|
||||
#include <quazip/JlCompress.h>
|
||||
#endif
|
||||
|
||||
#include "ResourceManager.h"
|
||||
|
|
|
@ -24,6 +24,10 @@ endif ()
|
|||
# append audio includes to our list of includes to bubble
|
||||
target_include_directories(${TARGET_NAME} PUBLIC "${HIFI_LIBRARY_DIR}/audio/src")
|
||||
|
||||
if (WIN32)
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE WIN32)
|
||||
endif()
|
||||
|
||||
# have CMake grab externals for us
|
||||
if (APPLE)
|
||||
find_library(CoreAudio CoreAudio)
|
||||
|
|
|
@ -4,4 +4,4 @@ link_hifi_libraries(shared)
|
|||
|
||||
set(OpenGL_GL_PREFERENCE "GLVND")
|
||||
target_opengl()
|
||||
|
||||
target_glad()
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <mutex>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <Windows.h>
|
||||
#elif defined(Q_OS_ANDROID)
|
||||
#elif defined(Q_OS_MAC)
|
||||
#include <OpenGL/OpenGL.h>
|
||||
|
|
|
@ -36,8 +36,8 @@ using namespace gpu;
|
|||
#include <nvtt/nvtt.h>
|
||||
|
||||
#undef _CRT_SECURE_NO_WARNINGS
|
||||
#include <Etc2/Etc.h>
|
||||
#include <Etc2/EtcFilter.h>
|
||||
#include <Etc.h>
|
||||
#include <EtcFilter.h>
|
||||
|
||||
static const glm::uvec2 SPARSE_PAGE_SIZE(128);
|
||||
static const glm::uvec2 MAX_TEXTURE_SIZE_GLES(2048);
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include "ThreadSafeDynamicsWorld.h"
|
||||
#include "PhysicsLogging.h"
|
||||
|
||||
|
||||
|
||||
PhysicsEngine::PhysicsEngine(const glm::vec3& offset) :
|
||||
_originOffset(offset),
|
||||
_myAvatarController(nullptr) {
|
||||
|
@ -302,8 +304,10 @@ void PhysicsEngine::removeContacts(ObjectMotionState* motionState) {
|
|||
}
|
||||
|
||||
void PhysicsEngine::stepSimulation() {
|
||||
#ifndef BT_NO_PROFILE
|
||||
CProfileManager::Reset();
|
||||
BT_PROFILE("stepSimulation");
|
||||
#endif
|
||||
// NOTE: the grand order of operations is:
|
||||
// (1) pull incoming changes
|
||||
// (2) step simulation
|
||||
|
@ -330,7 +334,7 @@ void PhysicsEngine::stepSimulation() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef BT_NO_PROFILE
|
||||
class CProfileOperator {
|
||||
public:
|
||||
CProfileOperator() {}
|
||||
|
@ -373,6 +377,7 @@ public:
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
class StatsWriter : public CProfileOperator {
|
||||
public:
|
||||
StatsWriter(QString filename) : _file(filename) {
|
||||
|
@ -395,8 +400,10 @@ public:
|
|||
protected:
|
||||
QFile _file;
|
||||
};
|
||||
#endif
|
||||
|
||||
void PhysicsEngine::harvestPerformanceStats() {
|
||||
#ifndef BT_NO_PROFILE
|
||||
// unfortunately the full context names get too long for our stats presentation format
|
||||
//QString contextName = PerformanceTimer::getContextName(); // TODO: how to show full context name?
|
||||
QString contextName("...");
|
||||
|
@ -415,9 +422,11 @@ void PhysicsEngine::harvestPerformanceStats() {
|
|||
itr->Next();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void PhysicsEngine::printPerformanceStatsToFile(const QString& filename) {
|
||||
#ifndef BT_NO_PROFILE
|
||||
CProfileIterator* itr = CProfileManager::Get_Iterator();
|
||||
if (itr) {
|
||||
// hunt for stepSimulation context
|
||||
|
@ -432,6 +441,7 @@ void PhysicsEngine::printPerformanceStatsToFile(const QString& filename) {
|
|||
itr->Next();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void PhysicsEngine::doOwnershipInfection(const btCollisionObject* objectA, const btCollisionObject* objectB) {
|
||||
|
@ -627,6 +637,7 @@ const VectorOfMotionStates& PhysicsEngine::getChangedMotionStates() {
|
|||
}
|
||||
|
||||
void PhysicsEngine::dumpStatsIfNecessary() {
|
||||
#ifndef BT_NO_PROFILE
|
||||
if (_dumpNextStats) {
|
||||
_dumpNextStats = false;
|
||||
CProfileManager::Increment_Frame_Counter();
|
||||
|
@ -636,6 +647,7 @@ void PhysicsEngine::dumpStatsIfNecessary() {
|
|||
}
|
||||
CProfileManager::dumpAll();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void PhysicsEngine::saveNextPhysicsStats(QString filename) {
|
||||
|
|
|
@ -37,4 +37,4 @@ endif()
|
|||
target_zlib()
|
||||
target_nsight()
|
||||
target_json()
|
||||
|
||||
target_glm()
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#if defined(Q_OS_WIN)
|
||||
// Enable event queue debugging
|
||||
#define DEBUG_EVENT_QUEUE
|
||||
//#define DEBUG_EVENT_QUEUE
|
||||
#endif
|
||||
|
||||
class QLoggingCategory;
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
# define WEBRTC_POSIX 1
|
||||
# define WEBRTC_LEGACY 1
|
||||
#elif defined(Q_OS_WIN)
|
||||
# define WEBRTC_AUDIO 1
|
||||
# define WEBRTC_DATA_CHANNELS 1
|
||||
# define WEBRTC_WIN 1
|
||||
// # define WEBRTC_AUDIO 1
|
||||
// # define WEBRTC_DATA_CHANNELS 1
|
||||
// # define WEBRTC_WIN 1
|
||||
# define NOMINMAX 1
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN 1
|
||||
|
|
|
@ -20,8 +20,6 @@ if ((WIN32 OR UNIX AND NOT APPLE) AND NOT USE_GLES)
|
|||
|
||||
target_openvr()
|
||||
if (WIN32)
|
||||
target_sranipal()
|
||||
target_aristo()
|
||||
target_link_libraries(${TARGET_NAME} Winmm.lib)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -217,7 +217,7 @@ def processCommand(line):
|
|||
executeSubprocess(scribeArgs)
|
||||
|
||||
# Generate the un-optimized output
|
||||
executeSubprocess([glslangExec, '-V110', '-o', upoptSpirvFile, unoptGlslFile])
|
||||
executeSubprocess([glslangExec, '-V100', '-o', upoptSpirvFile, unoptGlslFile])
|
||||
|
||||
# Optimize the SPIRV
|
||||
executeSubprocess([spirvOptExec, '-O', '-o', spirvFile, upoptSpirvFile])
|
||||
|
|
Loading…
Reference in a new issue