mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-28 01:20:55 +01:00
Backend Targets Impl
This commit is contained in:
parent
d4b9ce1678
commit
e0e32bdadd
@ -5,6 +5,10 @@ project(imgui)
|
||||
option(IMGUI_IMPL_WIN32 "Enable ImGui Win32 implementation" ON)
|
||||
option(IMGUI_IMPL_OPENGL2 "Enable ImGui OpenGL2 implementation" OFF)
|
||||
option(IMGUI_IMPL_OPENGL3 "Enable ImGui OpenGL3 implementation" OFF)
|
||||
option(IMGUI_IMPL_DX9 "Enable ImGui DirectX9 implementation" OFF)
|
||||
option(IMGUI_IMPL_DX10 "Enable ImGui DirectX10 implementation" OFF)
|
||||
option(IMGUI_IMPL_DX11 "Enable ImGui DirectX11 implementation" OFF)
|
||||
option(IMGUI_IMPL_DX12 "Enable ImGui DirectX12 implementation" OFF)
|
||||
option(IMGUI_ENABLE_PLAYGROUND "Enable playground subdirectory" OFF)
|
||||
|
||||
set(IMGUI_INC_DIR
|
||||
|
@ -31,3 +31,41 @@ install_target_and_headers(imgui opengl3
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(IMGUI_IMPL_DX9)
|
||||
add_library_ns(imgui dx9 STATIC imgui_impl_dx9.cpp)
|
||||
target_include_dir_iface(imgui-dx9 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} include PRIVATE ${IMGUI_INC_DIR})
|
||||
target_link_libraries(imgui-dx9 d3d9.lib)
|
||||
install_target_and_headers(imgui dx9
|
||||
imgui_impl_dx9.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if(IMGUI_IMPL_DX10)
|
||||
add_library_ns(imgui dx10 STATIC imgui_impl_dx10.cpp)
|
||||
target_include_dir_iface(imgui-dx10 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} include PRIVATE ${IMGUI_INC_DIR})
|
||||
target_link_libraries(imgui-dx10 d3d10.lib)
|
||||
install_target_and_headers(imgui dx10
|
||||
imgui_impl_dx10.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if(IMGUI_IMPL_DX11)
|
||||
add_library_ns(imgui dx11 STATIC imgui_impl_dx11.cpp)
|
||||
target_include_dir_iface(imgui-dx11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} include PRIVATE ${IMGUI_INC_DIR})
|
||||
target_link_libraries(imgui-dx11 d3d11.lib)
|
||||
install_target_and_headers(imgui dx11
|
||||
imgui_impl_dx11.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if(IMGUI_IMPL_DX12)
|
||||
add_library_ns(imgui dx12 STATIC imgui_impl_dx12.cpp)
|
||||
target_include_dir_iface(imgui-dx12 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} include PRIVATE ${IMGUI_INC_DIR})
|
||||
target_link_libraries(imgui-dx12 d3d12.lib)
|
||||
install_target_and_headers(imgui dx12
|
||||
imgui_impl_dx12.h
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -28,3 +28,19 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/imgui-opengl3-targets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/imgui-opengl3-targets.cmake")
|
||||
endif()
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/imgui-dx9-targets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/imgui-dx9-targets.cmake")
|
||||
endif()
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/imgui-dx10-targets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/imgui-dx10-targets.cmake")
|
||||
endif()
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/imgui-dx11-targets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/imgui-dx11-targets.cmake")
|
||||
endif()
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/imgui-dx12-targets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/imgui-dx12-targets.cmake")
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user