mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
35 lines
1.1 KiB
CMake
35 lines
1.1 KiB
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
|
|
DOWNLOAD_EXTRACT_TIMESTAMP 1
|
|
BUILD_BYPRODUCTS
|
|
"project/src/LibOVRPlatform/Windows/LibOVRPlatform64_1.lib"
|
|
)
|
|
|
|
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")
|