mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 15:07:08 +02:00
This uses a variable that can be overriden with an environment variable. This makes it easy for the community to create alternate asset hosts. Due to vcpkg using a clean environment, variables can't be easily passed to cmake scripts run by vcpkg. This was worked around by writing the data that needs to be passed into temporary files and reading it from the vcpkg ports.
32 lines
992 B
CMake
32 lines
992 B
CMake
include(ExternalProject)
|
|
include(SelectLibraryConfigurations)
|
|
|
|
set(EXTERNAL_NAME LibOVRPlatform)
|
|
|
|
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
|
|
|
if (WIN32)
|
|
|
|
ExternalProject_Add(
|
|
${EXTERNAL_NAME}
|
|
URL "${EXTERNAL_BUILD_ASSETS}/dependencies/OVRPlatformSDK_v1.10.0.zip"
|
|
URL_MD5 e6c8264af16d904e6506acd5172fa0a9
|
|
CONFIGURE_COMMAND ""
|
|
BUILD_COMMAND ""
|
|
INSTALL_COMMAND ""
|
|
LOG_DOWNLOAD 1
|
|
)
|
|
|
|
ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR)
|
|
|
|
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
|
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${SOURCE_DIR}/Windows/LibOVRPlatform64_1.lib CACHE STRING INTERNAL)
|
|
else()
|
|
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${SOURCE_DIR}/Windows/LibOVRPlatform32_1.lib CACHE STRING INTERNAL)
|
|
endif()
|
|
|
|
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SOURCE_DIR}/Include CACHE STRING INTERNAL)
|
|
endif ()
|
|
|
|
# Hide this external target (for ide users)
|
|
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|