зеркало из https://github.com/microsoft/DirectXTK.git
Update CMake to use gameinput package (#498)
This commit is contained in:
Родитель
ee515b2dbe
Коммит
f0f7423135
|
@ -292,10 +292,15 @@ include(CheckIncludeFileCXX)
|
|||
|
||||
if(BUILD_GAMEINPUT)
|
||||
message(STATUS "Using GameInput for GamePad/Keyboard/Mouse.")
|
||||
set(CMAKE_REQUIRED_QUIET ON)
|
||||
CHECK_INCLUDE_FILE_CXX(GameInput.h GAMEINPUT_HEADER)
|
||||
if(NOT GAMEINPUT_HEADER)
|
||||
message(FATAL_ERROR "Microsoft GDK required to build GameInput. See https://aka.ms/gdk")
|
||||
find_package(gameinput CONFIG QUIET)
|
||||
if(gameinput_FOUND)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC Microsoft::GameInput)
|
||||
else()
|
||||
set(CMAKE_REQUIRED_QUIET ON)
|
||||
CHECK_INCLUDE_FILE_CXX(GameInput.h GAMEINPUT_HEADER)
|
||||
if(NOT GAMEINPUT_HEADER)
|
||||
message(FATAL_ERROR "Microsoft GDK required to build GameInput. See https://aka.ms/gdk")
|
||||
endif()
|
||||
endif()
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC USING_GAMEINPUT)
|
||||
elseif(BUILD_WGI)
|
||||
|
|
Загрузка…
Ссылка в новой задаче