Files
XCEngine/tests/NewEditor/CMakeLists.txt

579 lines
22 KiB
CMake
Raw Normal View History

2026-04-05 04:55:25 +08:00
cmake_minimum_required(VERSION 3.15)
project(XCEngine_NewEditorTests)
file(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}" XCENGINE_TEST_REPO_ROOT_CMAKE)
function(xcengine_configure_new_editor_test_target target_name)
if(MSVC)
set_target_properties(${target_name} PROPERTIES
LINK_FLAGS "/NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcmt.lib"
COMPILE_PDB_NAME "${target_name}-compile"
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb"
COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Debug"
COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/Release"
COMPILE_PDB_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/MinSizeRel"
COMPILE_PDB_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_BINARY_DIR}/compile-pdb/RelWithDebInfo"
VS_GLOBAL_UseMultiToolTask "false"
)
target_compile_options(${target_name} PRIVATE /FS /utf-8)
target_link_options(${target_name} PRIVATE
$<$<CONFIG:Debug,RelWithDebInfo>:/INCREMENTAL:NO>)
endif()
endfunction()
function(xcengine_discover_new_editor_gtests target_name)
include(GoogleTest)
gtest_discover_tests(${target_name}
DISCOVERY_MODE PRE_TEST)
endfunction()
set(NEW_EDITOR_RUNTIME_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIDemoRuntime.h
)
set(NEW_EDITOR_RUNTIME_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIDemoRuntime.cpp
)
set(NEW_EDITOR_LAYOUT_LAB_RUNTIME_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUILayoutLabRuntime.h
)
set(NEW_EDITOR_LAYOUT_LAB_RUNTIME_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUILayoutLabRuntime.cpp
)
set(NEW_EDITOR_ASSET_DOCUMENT_SOURCE_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIAssetDocumentSource.h
)
set(NEW_EDITOR_ASSET_DOCUMENT_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIAssetDocumentSource.cpp
)
set(NEW_EDITOR_UI_DOCUMENT_COMPILER_SOURCE
${CMAKE_SOURCE_DIR}/engine/src/Resources/UI/UIDocumentCompiler.cpp
)
set(NEW_EDITOR_BACKEND_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/ImGuiTransitionBackend.h
)
set(NEW_EDITOR_INPUT_BRIDGE_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIInputBridge.h
)
set(NEW_EDITOR_INPUT_BRIDGE_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIInputBridge.cpp
)
set(NEW_EDITOR_COMMAND_ROUTER_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIEditorCommandRouter.h
)
set(NEW_EDITOR_COMMAND_ROUTER_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIEditorCommandRouter.cpp
)
2026-04-05 04:55:25 +08:00
set(NEW_EDITOR_IMGUI_INPUT_ADAPTER_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/ImGuiXCUIInputAdapter.h
)
set(NEW_EDITOR_IMGUI_INPUT_ADAPTER_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/ImGuiXCUIInputAdapter.cpp
)
set(NEW_EDITOR_RHI_COMMAND_SUPPORT_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIRHICommandSupport.h
)
set(NEW_EDITOR_RHI_COMMAND_COMPILER_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIRHICommandCompiler.h
)
set(NEW_EDITOR_RHI_COMMAND_COMPILER_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIRHICommandCompiler.cpp
)
set(NEW_EDITOR_RHI_RENDER_BACKEND_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIRHIRenderBackend.h
)
set(NEW_EDITOR_RHI_RENDER_BACKEND_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIRHIRenderBackend.cpp
)
set(NEW_EDITOR_IMGUI_TEXT_ATLAS_PROVIDER_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/ImGuiTextAtlasProvider.h
)
set(NEW_EDITOR_IMGUI_TEXT_ATLAS_PROVIDER_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/ImGuiTextAtlasProvider.cpp
)
set(NEW_EDITOR_FONT_SETUP_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIEditorFontSetup.h
)
set(NEW_EDITOR_FONT_SETUP_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIEditorFontSetup.cpp
)
set(NEW_EDITOR_STANDALONE_TEXT_ATLAS_PROVIDER_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIStandaloneTextAtlasProvider.h
)
set(NEW_EDITOR_STANDALONE_TEXT_ATLAS_PROVIDER_SOURCE
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIStandaloneTextAtlasProvider.cpp
)
set(NEW_EDITOR_HOSTED_PREVIEW_PRESENTER_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/XCUIHostedPreviewPresenter.h
)
set(NEW_EDITOR_WINDOW_UI_COMPOSITOR_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/IWindowUICompositor.h
)
set(NEW_EDITOR_IMGUI_WINDOW_UI_COMPOSITOR_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/XCUIBackend/ImGuiWindowUICompositor.h
)
2026-04-05 04:55:25 +08:00
set(NEW_EDITOR_NATIVE_BACKDROP_RENDERER_HEADER
${CMAKE_SOURCE_DIR}/new_editor/src/Rendering/MainWindowNativeBackdropRenderer.h
)
if(EXISTS "${NEW_EDITOR_RUNTIME_HEADER}" AND
EXISTS "${NEW_EDITOR_RUNTIME_SOURCE}" AND
EXISTS "${NEW_EDITOR_ASSET_DOCUMENT_SOURCE_HEADER}" AND
EXISTS "${NEW_EDITOR_ASSET_DOCUMENT_SOURCE}")
add_executable(new_editor_xcui_demo_runtime_tests
test_xcui_demo_runtime.cpp
${NEW_EDITOR_RUNTIME_SOURCE}
${NEW_EDITOR_ASSET_DOCUMENT_SOURCE}
)
xcengine_configure_new_editor_test_target(new_editor_xcui_demo_runtime_tests)
target_link_libraries(new_editor_xcui_demo_runtime_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
)
target_include_directories(new_editor_xcui_demo_runtime_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
)
target_compile_definitions(new_editor_xcui_demo_runtime_tests PRIVATE
XCENGINE_NEW_EDITOR_REPO_ROOT="${XCENGINE_TEST_REPO_ROOT_CMAKE}"
)
xcengine_discover_new_editor_gtests(new_editor_xcui_demo_runtime_tests)
else()
message(STATUS "Skipping new_editor_xcui_demo_runtime_tests because XCUIDemoRuntime files are missing.")
endif()
if(EXISTS "${NEW_EDITOR_ASSET_DOCUMENT_SOURCE_HEADER}" AND
EXISTS "${NEW_EDITOR_ASSET_DOCUMENT_SOURCE}" AND
EXISTS "${NEW_EDITOR_UI_DOCUMENT_COMPILER_SOURCE}" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test_xcui_asset_document_source.cpp")
add_executable(new_editor_xcui_asset_document_source_tests
test_xcui_asset_document_source.cpp
${NEW_EDITOR_ASSET_DOCUMENT_SOURCE}
${NEW_EDITOR_UI_DOCUMENT_COMPILER_SOURCE}
)
xcengine_configure_new_editor_test_target(new_editor_xcui_asset_document_source_tests)
target_link_libraries(new_editor_xcui_asset_document_source_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
)
target_include_directories(new_editor_xcui_asset_document_source_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
)
target_compile_definitions(new_editor_xcui_asset_document_source_tests PRIVATE
XCENGINE_NEW_EDITOR_REPO_ROOT="${XCENGINE_TEST_REPO_ROOT_CMAKE}"
)
include(GoogleTest)
gtest_discover_tests(new_editor_xcui_asset_document_source_tests)
else()
message(STATUS "Skipping new_editor_xcui_asset_document_source_tests because asset document source files or the test source are missing.")
endif()
if(EXISTS "${NEW_EDITOR_LAYOUT_LAB_RUNTIME_HEADER}" AND
EXISTS "${NEW_EDITOR_LAYOUT_LAB_RUNTIME_SOURCE}" AND
EXISTS "${NEW_EDITOR_ASSET_DOCUMENT_SOURCE_HEADER}" AND
EXISTS "${NEW_EDITOR_ASSET_DOCUMENT_SOURCE}")
add_executable(new_editor_xcui_layout_lab_runtime_tests
test_xcui_layout_lab_runtime.cpp
${NEW_EDITOR_LAYOUT_LAB_RUNTIME_SOURCE}
${NEW_EDITOR_ASSET_DOCUMENT_SOURCE}
)
xcengine_configure_new_editor_test_target(new_editor_xcui_layout_lab_runtime_tests)
target_link_libraries(new_editor_xcui_layout_lab_runtime_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
)
target_include_directories(new_editor_xcui_layout_lab_runtime_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
)
target_compile_definitions(new_editor_xcui_layout_lab_runtime_tests PRIVATE
XCENGINE_NEW_EDITOR_REPO_ROOT="${XCENGINE_TEST_REPO_ROOT_CMAKE}"
)
xcengine_discover_new_editor_gtests(new_editor_xcui_layout_lab_runtime_tests)
else()
message(STATUS "Skipping new_editor_xcui_layout_lab_runtime_tests because XCUILayoutLabRuntime files are missing.")
endif()
if(EXISTS "${NEW_EDITOR_BACKEND_HEADER}" AND EXISTS "${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui.cpp")
add_executable(new_editor_imgui_transition_backend_tests
test_new_editor_imgui_transition_backend.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_draw.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_tables.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_widgets.cpp
)
xcengine_configure_new_editor_test_target(new_editor_imgui_transition_backend_tests)
target_link_libraries(new_editor_imgui_transition_backend_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
user32
comdlg32
)
target_include_directories(new_editor_imgui_transition_backend_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
${CMAKE_BINARY_DIR}/_deps/imgui-src
${CMAKE_BINARY_DIR}/_deps/imgui-src/backends
)
xcengine_discover_new_editor_gtests(new_editor_imgui_transition_backend_tests)
else()
message(STATUS "Skipping new_editor_imgui_transition_backend_tests because backend or ImGui sources are missing.")
endif()
if(EXISTS "${NEW_EDITOR_HOSTED_PREVIEW_PRESENTER_HEADER}" AND EXISTS "${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui.cpp")
add_executable(new_editor_xcui_hosted_preview_presenter_tests
test_xcui_hosted_preview_presenter.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_draw.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_tables.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_widgets.cpp
)
xcengine_configure_new_editor_test_target(new_editor_xcui_hosted_preview_presenter_tests)
target_link_libraries(new_editor_xcui_hosted_preview_presenter_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
user32
comdlg32
)
target_include_directories(new_editor_xcui_hosted_preview_presenter_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
${CMAKE_BINARY_DIR}/_deps/imgui-src
${CMAKE_BINARY_DIR}/_deps/imgui-src/backends
)
xcengine_discover_new_editor_gtests(new_editor_xcui_hosted_preview_presenter_tests)
else()
message(STATUS "Skipping new_editor_xcui_hosted_preview_presenter_tests because presenter header or ImGui sources are missing.")
endif()
if(EXISTS "${NEW_EDITOR_WINDOW_UI_COMPOSITOR_HEADER}" AND
EXISTS "${NEW_EDITOR_IMGUI_WINDOW_UI_COMPOSITOR_HEADER}" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test_imgui_window_ui_compositor.cpp")
add_executable(new_editor_imgui_window_ui_compositor_tests
test_imgui_window_ui_compositor.cpp
)
xcengine_configure_new_editor_test_target(new_editor_imgui_window_ui_compositor_tests)
target_link_libraries(new_editor_imgui_window_ui_compositor_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
user32
comdlg32
)
target_include_directories(new_editor_imgui_window_ui_compositor_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
${CMAKE_SOURCE_DIR}/editor/src
${CMAKE_BINARY_DIR}/_deps/imgui-src
${CMAKE_BINARY_DIR}/_deps/imgui-src/backends
)
xcengine_discover_new_editor_gtests(new_editor_imgui_window_ui_compositor_tests)
else()
message(STATUS "Skipping new_editor_imgui_window_ui_compositor_tests because compositor headers or the test source are missing.")
endif()
2026-04-05 04:55:25 +08:00
if(EXISTS "${NEW_EDITOR_NATIVE_BACKDROP_RENDERER_HEADER}")
add_executable(new_editor_native_backdrop_renderer_api_tests
test_main_window_native_backdrop_renderer_api.cpp
)
xcengine_configure_new_editor_test_target(new_editor_native_backdrop_renderer_api_tests)
target_link_libraries(new_editor_native_backdrop_renderer_api_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
)
target_include_directories(new_editor_native_backdrop_renderer_api_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
${CMAKE_BINARY_DIR}/_deps/imgui-src
)
xcengine_discover_new_editor_gtests(new_editor_native_backdrop_renderer_api_tests)
else()
message(STATUS "Skipping new_editor_native_backdrop_renderer_api_tests because renderer header is missing.")
endif()
if(EXISTS "${NEW_EDITOR_INPUT_BRIDGE_HEADER}" AND
EXISTS "${NEW_EDITOR_INPUT_BRIDGE_SOURCE}")
add_executable(new_editor_xcui_input_bridge_tests
test_xcui_input_bridge.cpp
${NEW_EDITOR_INPUT_BRIDGE_SOURCE}
)
xcengine_configure_new_editor_test_target(new_editor_xcui_input_bridge_tests)
target_link_libraries(new_editor_xcui_input_bridge_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
)
target_include_directories(new_editor_xcui_input_bridge_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
${CMAKE_BINARY_DIR}/_deps/imgui-src
${CMAKE_BINARY_DIR}/_deps/imgui-src/backends
)
xcengine_discover_new_editor_gtests(new_editor_xcui_input_bridge_tests)
else()
message(STATUS "Skipping new_editor_xcui_input_bridge_tests because input bridge files are missing.")
endif()
if(EXISTS "${NEW_EDITOR_COMMAND_ROUTER_HEADER}" AND
EXISTS "${NEW_EDITOR_COMMAND_ROUTER_SOURCE}" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test_xcui_editor_command_router.cpp")
add_executable(new_editor_xcui_editor_command_router_tests
test_xcui_editor_command_router.cpp
${NEW_EDITOR_COMMAND_ROUTER_SOURCE}
)
xcengine_configure_new_editor_test_target(new_editor_xcui_editor_command_router_tests)
target_link_libraries(new_editor_xcui_editor_command_router_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
)
target_include_directories(new_editor_xcui_editor_command_router_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
)
xcengine_discover_new_editor_gtests(new_editor_xcui_editor_command_router_tests)
else()
message(STATUS "Skipping new_editor_xcui_editor_command_router_tests because command router files or the test source are missing.")
endif()
2026-04-05 04:55:25 +08:00
if(EXISTS "${NEW_EDITOR_IMGUI_INPUT_ADAPTER_HEADER}" AND
EXISTS "${NEW_EDITOR_IMGUI_INPUT_ADAPTER_SOURCE}" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test_imgui_xcui_input_adapter.cpp" AND
EXISTS "${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui.cpp")
add_executable(new_editor_imgui_xcui_input_adapter_tests
test_imgui_xcui_input_adapter.cpp
${NEW_EDITOR_IMGUI_INPUT_ADAPTER_SOURCE}
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_draw.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_tables.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_widgets.cpp
)
xcengine_configure_new_editor_test_target(new_editor_imgui_xcui_input_adapter_tests)
target_link_libraries(new_editor_imgui_xcui_input_adapter_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
user32
comdlg32
)
target_include_directories(new_editor_imgui_xcui_input_adapter_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
${CMAKE_BINARY_DIR}/_deps/imgui-src
${CMAKE_BINARY_DIR}/_deps/imgui-src/backends
)
xcengine_discover_new_editor_gtests(new_editor_imgui_xcui_input_adapter_tests)
else()
message(STATUS "Skipping new_editor_imgui_xcui_input_adapter_tests because ImGui adapter files, test source, or ImGui sources are missing.")
endif()
if(EXISTS "${NEW_EDITOR_RHI_COMMAND_SUPPORT_HEADER}")
add_executable(new_editor_xcui_rhi_command_support_tests
test_xcui_rhi_command_support.cpp
)
xcengine_configure_new_editor_test_target(new_editor_xcui_rhi_command_support_tests)
target_link_libraries(new_editor_xcui_rhi_command_support_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
)
target_include_directories(new_editor_xcui_rhi_command_support_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
)
xcengine_discover_new_editor_gtests(new_editor_xcui_rhi_command_support_tests)
else()
message(STATUS "Skipping new_editor_xcui_rhi_command_support_tests because support helper header is missing.")
endif()
if(EXISTS "${NEW_EDITOR_RHI_RENDER_BACKEND_HEADER}" AND
EXISTS "${NEW_EDITOR_RHI_RENDER_BACKEND_SOURCE}" AND
EXISTS "${NEW_EDITOR_RHI_COMMAND_COMPILER_HEADER}" AND
EXISTS "${NEW_EDITOR_RHI_COMMAND_COMPILER_SOURCE}" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test_xcui_rhi_render_backend.cpp")
add_executable(new_editor_xcui_rhi_render_backend_tests
test_xcui_rhi_render_backend.cpp
${NEW_EDITOR_RHI_RENDER_BACKEND_SOURCE}
${NEW_EDITOR_RHI_COMMAND_COMPILER_SOURCE}
)
xcengine_configure_new_editor_test_target(new_editor_xcui_rhi_render_backend_tests)
target_link_libraries(new_editor_xcui_rhi_render_backend_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
)
target_include_directories(new_editor_xcui_rhi_render_backend_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
)
xcengine_discover_new_editor_gtests(new_editor_xcui_rhi_render_backend_tests)
else()
message(STATUS "Skipping new_editor_xcui_rhi_render_backend_tests because backend/compiler sources or the test source are missing.")
endif()
if(EXISTS "${NEW_EDITOR_IMGUI_TEXT_ATLAS_PROVIDER_HEADER}" AND
EXISTS "${NEW_EDITOR_IMGUI_TEXT_ATLAS_PROVIDER_SOURCE}" AND
EXISTS "${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui.cpp")
add_executable(new_editor_imgui_text_atlas_provider_tests
test_imgui_text_atlas_provider.cpp
${NEW_EDITOR_IMGUI_TEXT_ATLAS_PROVIDER_SOURCE}
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_draw.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_tables.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_widgets.cpp
)
xcengine_configure_new_editor_test_target(new_editor_imgui_text_atlas_provider_tests)
target_link_libraries(new_editor_imgui_text_atlas_provider_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
user32
comdlg32
)
target_include_directories(new_editor_imgui_text_atlas_provider_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
${CMAKE_BINARY_DIR}/_deps/imgui-src
${CMAKE_BINARY_DIR}/_deps/imgui-src/backends
)
xcengine_discover_new_editor_gtests(new_editor_imgui_text_atlas_provider_tests)
else()
message(STATUS "Skipping new_editor_imgui_text_atlas_provider_tests because atlas provider or ImGui sources are missing.")
endif()
if(EXISTS "${NEW_EDITOR_STANDALONE_TEXT_ATLAS_PROVIDER_HEADER}" AND
EXISTS "${NEW_EDITOR_STANDALONE_TEXT_ATLAS_PROVIDER_SOURCE}" AND
EXISTS "${NEW_EDITOR_FONT_SETUP_HEADER}" AND
EXISTS "${NEW_EDITOR_FONT_SETUP_SOURCE}" AND
EXISTS "${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui.cpp")
add_executable(new_editor_xcui_standalone_text_atlas_provider_tests
test_xcui_standalone_text_atlas_provider.cpp
${NEW_EDITOR_FONT_SETUP_SOURCE}
${NEW_EDITOR_STANDALONE_TEXT_ATLAS_PROVIDER_SOURCE}
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_draw.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_tables.cpp
${CMAKE_BINARY_DIR}/_deps/imgui-src/imgui_widgets.cpp
)
xcengine_configure_new_editor_test_target(new_editor_xcui_standalone_text_atlas_provider_tests)
target_link_libraries(new_editor_xcui_standalone_text_atlas_provider_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
user32
comdlg32
)
target_include_directories(new_editor_xcui_standalone_text_atlas_provider_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
${CMAKE_BINARY_DIR}/_deps/imgui-src
${CMAKE_BINARY_DIR}/_deps/imgui-src/backends
)
xcengine_discover_new_editor_gtests(new_editor_xcui_standalone_text_atlas_provider_tests)
else()
message(STATUS "Skipping new_editor_xcui_standalone_text_atlas_provider_tests because standalone atlas provider, font setup, or ImGui sources are missing.")
endif()
if(EXISTS "${NEW_EDITOR_RHI_COMMAND_COMPILER_HEADER}" AND
EXISTS "${NEW_EDITOR_RHI_COMMAND_COMPILER_SOURCE}")
add_executable(new_editor_xcui_rhi_command_compiler_tests
test_xcui_rhi_command_compiler.cpp
${NEW_EDITOR_RHI_COMMAND_COMPILER_SOURCE}
)
xcengine_configure_new_editor_test_target(new_editor_xcui_rhi_command_compiler_tests)
target_link_libraries(new_editor_xcui_rhi_command_compiler_tests
PRIVATE
XCEngine
GTest::gtest
GTest::gtest_main
)
target_include_directories(new_editor_xcui_rhi_command_compiler_tests PRIVATE
${CMAKE_SOURCE_DIR}/engine/include
${CMAKE_SOURCE_DIR}/new_editor/src
)
xcengine_discover_new_editor_gtests(new_editor_xcui_rhi_command_compiler_tests)
else()
message(STATUS "Skipping new_editor_xcui_rhi_command_compiler_tests because compiler files are missing.")
endif()