mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
PR feedback
This commit is contained in:
parent
8c4f0ec774
commit
2691c39d66
9 changed files with 30 additions and 24 deletions
|
@ -35,8 +35,8 @@ project(hifi)
|
|||
include("cmake/init.cmake")
|
||||
include("cmake/compiler.cmake")
|
||||
|
||||
add_paths_to_fixup_libs(${VKPKG_INSTALL_ROOT}/bin)
|
||||
add_paths_to_fixup_libs(${VKPKG_INSTALL_ROOT}/debug/bin)
|
||||
add_paths_to_fixup_libs(${VCPKG_INSTALL_ROOT}/bin)
|
||||
add_paths_to_fixup_libs(${VCPKG_INSTALL_ROOT}/debug/bin)
|
||||
|
||||
if (NOT DEFINED CLIENT_ONLY)
|
||||
set(CLIENT_ONLY 0)
|
||||
|
|
2
cmake/externals/quazip/CMakeLists.txt
vendored
2
cmake/externals/quazip/CMakeLists.txt
vendored
|
@ -9,7 +9,7 @@ set(QUAZIP_CMAKE_ARGS
|
|||
-DCMAKE_PREFIX_PATH=${QT_CMAKE_PREFIX_PATH}
|
||||
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DZLIB_ROOT=${VKPKG_INSTALL_ROOT}
|
||||
-DZLIB_ROOT=${VCPKG_INSTALL_ROOT}
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON)
|
||||
|
||||
if (NOT APPLE)
|
||||
|
|
|
@ -19,13 +19,13 @@ macro(manually_install_openssl_for_qt)
|
|||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
install(
|
||||
FILES "${VKPKG_INSTALL_ROOT}/bin/ssleay32.dll"
|
||||
FILES "${VCPKG_INSTALL_ROOT}/bin/ssleay32.dll"
|
||||
DESTINATION ${TARGET_INSTALL_DIR}
|
||||
COMPONENT ${TARGET_INSTALL_COMPONENT}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${VKPKG_INSTALL_ROOT}/bin/libeay32.dll"
|
||||
FILES "${VCPKG_INSTALL_ROOT}/bin/libeay32.dll"
|
||||
DESTINATION ${TARGET_INSTALL_DIR}
|
||||
COMPONENT ${TARGET_INSTALL_COMPONENT}
|
||||
)
|
||||
|
|
|
@ -10,8 +10,8 @@ macro(TARGET_DRACO)
|
|||
list(APPEND DRACO_LIBRARIES ${LIB_DIR}/libdracoenc.a)
|
||||
target_link_libraries(${TARGET_NAME} ${DRACO_LIBRARIES})
|
||||
else()
|
||||
set(LIB_SEARCH_PATH_RELEASE ${VKPKG_INSTALL_ROOT}/lib/)
|
||||
set(LIB_SEARCH_PATH_DEBUG ${VKPKG_INSTALL_ROOT}/debug/lib/)
|
||||
set(LIB_SEARCH_PATH_RELEASE ${VCPKG_INSTALL_ROOT}/lib/)
|
||||
set(LIB_SEARCH_PATH_DEBUG ${VCPKG_INSTALL_ROOT}/debug/lib/)
|
||||
foreach(LIB ${LIBS})
|
||||
find_library(${LIB}_LIBPATH ${LIB} PATHS ${LIB_SEARCH_PATH_RELEASE} NO_DEFAULT_PATH)
|
||||
list(APPEND DRACO_LIBRARY_RELEASE ${${LIB}_LIBPATH})
|
||||
|
|
|
@ -13,8 +13,8 @@ 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 ${VKPKG_INSTALL_ROOT}/debug/lib/ NO_DEFAULT_PATH)
|
||||
find_library(ETC2COMP_LIBRARY_RELEASE EtcLib PATHS ${VKPKG_INSTALL_ROOT}/lib/ NO_DEFAULT_PATH)
|
||||
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)
|
||||
endif()
|
||||
|
||||
select_library_configurations(ETC2COMP)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#
|
||||
macro(TARGET_GLM)
|
||||
if (ANDROID)
|
||||
target_include_directories(${TARGET_NAME} PUBLIC "${VKPKG_INSTALL_ROOT}/include")
|
||||
target_include_directories(${TARGET_NAME} PUBLIC "${VCPKG_INSTALL_ROOT}/include")
|
||||
else()
|
||||
find_package(glm CONFIG REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} glm)
|
||||
|
|
|
@ -17,8 +17,8 @@ macro(TARGET_NVTT)
|
|||
set(NVTT_LIBRARIES ${NVTT_LIBS} CACHE TYPE INTERNAL)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${NVTT_INCLUDE_DIRS})
|
||||
else()
|
||||
find_library(NVTT_LIBRARY_RELEASE nvtt PATHS ${VKPKG_INSTALL_ROOT}/lib NO_DEFAULT_PATH)
|
||||
find_library(NVTT_LIBRARY_DEBUG nvtt PATHS ${VKPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
|
||||
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)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_OPENVR)
|
||||
find_library(OPENVR_LIBRARY_RELEASE NAMES openvr_api PATHS ${VKPKG_INSTALL_ROOT}/lib)
|
||||
find_library(OPENVR_LIBRARY_DEBUG NAMES openvr_api PATHS ${VKPKG_INSTALL_ROOT}/debug/lib)
|
||||
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})
|
||||
endmacro()
|
||||
|
|
26
prebuild.py
26
prebuild.py
|
@ -71,14 +71,6 @@ def downloadAndExtract(url, destPath, hash=None):
|
|||
|
||||
# Extract the archive
|
||||
with tarfile.open(tempFileName, 'r:gz') as tgz:
|
||||
# prefix = os.path.commonprefix(tgz.getnames())
|
||||
# if (prefix != '.' and prefix != ''):
|
||||
# prefixlen = len(prefix)
|
||||
# for member in tgz.getmembers():
|
||||
# name = member.name
|
||||
# if prefix == name:
|
||||
# continue
|
||||
# member.name = name[prefixlen + 1:]
|
||||
tgz.extractall(destPath)
|
||||
os.remove(tempFileName)
|
||||
|
||||
|
@ -162,8 +154,22 @@ class VcpkgRepo:
|
|||
self.clean()
|
||||
|
||||
global args
|
||||
downloadVcpkg = False
|
||||
if args.force_bootstrap:
|
||||
print("Forcing bootstrap")
|
||||
downloadVcpkg = True
|
||||
|
||||
if not downloadVcpkg and not os.path.isfile(self.exe):
|
||||
print("Missing executable, boostrapping")
|
||||
downloadVcpkg = True
|
||||
|
||||
# Make sure we have a vcpkg executable
|
||||
if True or args.force_bootstrap or (not os.path.isfile(self.exe)) or (not os.path.isfile(os.path.join(self.path, '.vcpkg_root'))):
|
||||
testFile = os.path.join(self.path, '.vcpkg-root')
|
||||
if not downloadVcpkg and not os.path.isfile(testFile):
|
||||
print("Missing {}, bootstrapping".format(testFile))
|
||||
downloadVcpkg = True
|
||||
|
||||
if downloadVcpkg:
|
||||
print("Fetching vcpkg from {} to {}".format(self.vcpkgUrl, self.path))
|
||||
downloadAndExtract(self.vcpkgUrl, self.path, self.vcpkgHash)
|
||||
|
||||
|
@ -215,7 +221,7 @@ class VcpkgRepo:
|
|||
installPath = os.path.join(self.path, 'installed', self.triplet)
|
||||
toolsPath = os.path.join(self.path, 'installed', self.hostTriplet, 'tools')
|
||||
cmakeTemplate = 'set(CMAKE_TOOLCHAIN_FILE "{}" CACHE FILEPATH "Toolchain file")\n'
|
||||
cmakeTemplate += 'set(VKPKG_INSTALL_ROOT "{}" CACHE FILEPATH "vcpkg installed packages path")\n'
|
||||
cmakeTemplate += 'set(VCPKG_INSTALL_ROOT "{}" CACHE FILEPATH "vcpkg installed packages path")\n'
|
||||
cmakeTemplate += 'set(VCPKG_TOOLS_DIR "{}" CACHE FILEPATH "vcpkg installed packages path")\n'
|
||||
cmakeConfig = cmakeTemplate.format(cmakeScript, installPath, toolsPath).replace('\\', '/')
|
||||
with open(configFilePath, 'w') as f:
|
||||
|
|
Loading…
Reference in a new issue