编译KlayGE,UniversalDXSDK项目报错

错误原因

路径设置问题

代码块

PROJECT(UniversalDXSDK)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6)

IF(COMMAND cmake_policy)
    CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND cmake_policy)

SET(DXSDK_DIR "../..")
SET(KLAYGE_ROOT_DIR "${DXSDK_DIR}/../..")

INCLUDE(${KLAYGE_ROOT_DIR}/cmake/Common.cmake)
INCLUDE(${KLAYGE_ROOT_DIR}/cmake/Platform.cmake)
INCLUDE(${KLAYGE_ROOT_DIR}/cmake/Compiler.cmake)
INCLUDE(${KLAYGE_ROOT_DIR}/External/Build/CMake/ExternalCommon.cmake)

SET(KLAYGE_BIN_DIR "${DXSDK_DIR}/../../KlayGE/bin/${KLAYGE_PLATFORM_NAME}")
SET(D3DCOMPILER_NAME "d3dcompiler_47.dll")
SET(REL_PATH "External/Downloads/UniversalDXSDK.7z")
SET(SEVENZIP_PATH "${KLAYGE_ROOT_DIR}/External/Downloads/${KLAYGE_HOST_PLATFORM_NAME}/7z")
SET(PACKAGE_COMMIT_ID "ad787fbcbe77410ea25ebfe8b17644d8b1f38480")
SET(PACKAGE_FILE_ID "318ee1572dcd89b165eeb11297fda36a5d9cb035")

DOWNLOAD_PACKAGE("UniversalDXSDK" ${REL_PATH} ${PACKAGE_COMMIT_ID} ${PACKAGE_FILE_ID} "README.md")

IF(KLAYGE_PLATFORM_WINDOWS)
    SET(D3DCOMPILER_ARCH_NAME ${KLAYGE_ARCH_NAME})
ELSE()
    SET(D3DCOMPILER_ARCH_NAME "x86")
ENDIF()
SET(SRC_PATH "${DXSDK_DIR}/Redist/${D3DCOMPILER_ARCH_NAME}/${D3DCOMPILER_NAME}")
SET(REDIST_PATH "${KLAYGE_BIN_DIR}/${D3DCOMPILER_NAME}")
ADD_CUSTOM_COMMAND(OUTPUT ${REDIST_PATH}
    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SRC_PATH} ${REDIST_PATH})
ADD_CUSTOM_TARGET(Redist ALL DEPENDS ${REDIST_PATH})

解决办法

修改 DXSDK_DIR,如上代码。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值