Refactor XCUI editor module layout
This commit is contained in:
@@ -6,64 +6,101 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
file(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}" XCUIEDITOR_REPO_ROOT_PATH)
|
||||
|
||||
set(XCUI_EDITOR_RESOURCE_FILES
|
||||
ui/views/editor_shell.xcui
|
||||
ui/themes/editor_shell.xctheme
|
||||
function(xcui_editor_apply_common_target_settings target visibility)
|
||||
target_compile_definitions(${target} ${visibility}
|
||||
UNICODE
|
||||
_UNICODE
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(${target} PRIVATE /utf-8 /FS)
|
||||
set_property(TARGET ${target} PROPERTY
|
||||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
set(XCUI_EDITOR_FOUNDATION_SOURCES
|
||||
src/Foundation/UIEditorCommandDispatcher.cpp
|
||||
src/Foundation/UIEditorCommandRegistry.cpp
|
||||
src/Foundation/UIEditorShortcutManager.cpp
|
||||
src/Foundation/UIEditorTheme.cpp
|
||||
)
|
||||
|
||||
set(XCUI_EDITOR_FIELD_SOURCES
|
||||
src/Fields/UIEditorAssetField.cpp
|
||||
src/Fields/UIEditorAssetFieldInteraction.cpp
|
||||
src/Fields/UIEditorBoolField.cpp
|
||||
src/Fields/UIEditorBoolFieldInteraction.cpp
|
||||
src/Fields/UIEditorColorField.cpp
|
||||
src/Fields/UIEditorColorFieldInteraction.cpp
|
||||
src/Fields/UIEditorEnumField.cpp
|
||||
src/Fields/UIEditorEnumFieldInteraction.cpp
|
||||
src/Fields/UIEditorFieldStyle.cpp
|
||||
src/Fields/UIEditorNumberField.cpp
|
||||
src/Fields/UIEditorNumberFieldInteraction.cpp
|
||||
src/Fields/UIEditorObjectField.cpp
|
||||
src/Fields/UIEditorObjectFieldInteraction.cpp
|
||||
src/Fields/UIEditorPropertyGrid.cpp
|
||||
src/Fields/UIEditorPropertyGridInteraction.cpp
|
||||
src/Fields/UIEditorTextField.cpp
|
||||
src/Fields/UIEditorTextFieldInteraction.cpp
|
||||
src/Fields/UIEditorVector2Field.cpp
|
||||
src/Fields/UIEditorVector2FieldInteraction.cpp
|
||||
src/Fields/UIEditorVector3Field.cpp
|
||||
src/Fields/UIEditorVector3FieldInteraction.cpp
|
||||
src/Fields/UIEditorVector4Field.cpp
|
||||
src/Fields/UIEditorVector4FieldInteraction.cpp
|
||||
)
|
||||
|
||||
set(XCUI_EDITOR_COLLECTION_SOURCES
|
||||
src/Collections/UIEditorInlineRenameSession.cpp
|
||||
src/Collections/UIEditorListView.cpp
|
||||
src/Collections/UIEditorListViewInteraction.cpp
|
||||
src/Collections/UIEditorScrollView.cpp
|
||||
src/Collections/UIEditorScrollViewInteraction.cpp
|
||||
src/Collections/UIEditorTabStrip.cpp
|
||||
src/Collections/UIEditorTabStripInteraction.cpp
|
||||
src/Collections/UIEditorTreeView.cpp
|
||||
src/Collections/UIEditorTreeViewInteraction.cpp
|
||||
)
|
||||
|
||||
set(XCUI_EDITOR_SHELL_SOURCES
|
||||
src/Shell/EditorShellAsset.cpp
|
||||
src/Shell/UIEditorDockHost.cpp
|
||||
src/Shell/UIEditorDockHostInteraction.cpp
|
||||
src/Shell/UIEditorMenuBar.cpp
|
||||
src/Shell/UIEditorMenuModel.cpp
|
||||
src/Shell/UIEditorMenuPopup.cpp
|
||||
src/Shell/UIEditorMenuSession.cpp
|
||||
src/Shell/UIEditorPanelContentHost.cpp
|
||||
src/Shell/UIEditorPanelFrame.cpp
|
||||
src/Shell/UIEditorPanelHostLifecycle.cpp
|
||||
src/Shell/UIEditorPanelRegistry.cpp
|
||||
src/Shell/UIEditorShellCompose.cpp
|
||||
src/Shell/UIEditorShellInteraction.cpp
|
||||
src/Shell/UIEditorStatusBar.cpp
|
||||
src/Shell/UIEditorViewportInputBridge.cpp
|
||||
src/Shell/UIEditorViewportShell.cpp
|
||||
src/Shell/UIEditorViewportSlot.cpp
|
||||
src/Shell/UIEditorWorkspaceCompose.cpp
|
||||
src/Shell/UIEditorWorkspaceController.cpp
|
||||
src/Shell/UIEditorWorkspaceInteraction.cpp
|
||||
src/Shell/UIEditorWorkspaceLayoutPersistence.cpp
|
||||
src/Shell/UIEditorWorkspaceModel.cpp
|
||||
src/Shell/UIEditorWorkspaceSession.cpp
|
||||
)
|
||||
|
||||
set(XCUI_EDITOR_WIDGET_SUPPORT_SOURCES
|
||||
src/Widgets/UIEditorCollectionPrimitives.cpp
|
||||
src/Widgets/UIEditorFieldRowLayout.cpp
|
||||
)
|
||||
|
||||
add_library(XCUIEditorLib STATIC
|
||||
src/Core/EditorShellAsset.cpp
|
||||
src/Core/UIEditorCommandDispatcher.cpp
|
||||
src/Core/UIEditorCommandRegistry.cpp
|
||||
src/Core/UIEditorBoolFieldInteraction.cpp
|
||||
src/Core/UIEditorDockHostInteraction.cpp
|
||||
src/Core/UIEditorEnumFieldInteraction.cpp
|
||||
src/Core/UIEditorListViewInteraction.cpp
|
||||
src/Core/UIEditorMenuModel.cpp
|
||||
src/Core/UIEditorMenuSession.cpp
|
||||
src/Core/UIEditorNumberFieldInteraction.cpp
|
||||
src/Core/UIEditorPanelContentHost.cpp
|
||||
src/Core/UIEditorPanelHostLifecycle.cpp
|
||||
src/Core/UIEditorPanelRegistry.cpp
|
||||
src/Core/UIEditorPropertyGridInteraction.cpp
|
||||
src/Core/UIEditorScrollViewInteraction.cpp
|
||||
src/Core/UIEditorShellCompose.cpp
|
||||
src/Core/UIEditorShellInteraction.cpp
|
||||
src/Core/UIEditorShortcutManager.cpp
|
||||
src/Core/UIEditorTextFieldInteraction.cpp
|
||||
src/Core/UIEditorTheme.cpp
|
||||
src/Core/UIEditorTreeViewInteraction.cpp
|
||||
src/Core/UIEditorVector2FieldInteraction.cpp
|
||||
src/Core/UIEditorVector3FieldInteraction.cpp
|
||||
src/Core/UIEditorVector4FieldInteraction.cpp
|
||||
src/Core/UIEditorViewportInputBridge.cpp
|
||||
src/Core/UIEditorViewportShell.cpp
|
||||
src/Core/UIEditorWorkspaceCompose.cpp
|
||||
src/Core/UIEditorWorkspaceInteraction.cpp
|
||||
src/Core/UIEditorWorkspaceLayoutPersistence.cpp
|
||||
src/Core/UIEditorWorkspaceController.cpp
|
||||
src/Core/UIEditorWorkspaceModel.cpp
|
||||
src/Core/UIEditorWorkspaceSession.cpp
|
||||
src/Widgets/UIEditorCollectionPrimitives.cpp
|
||||
src/Widgets/UIEditorFieldRowLayout.cpp
|
||||
src/Widgets/UIEditorBoolField.cpp
|
||||
src/Widgets/UIEditorDockHost.cpp
|
||||
src/Widgets/UIEditorEnumField.cpp
|
||||
src/Widgets/UIEditorListView.cpp
|
||||
src/Widgets/UIEditorMenuBar.cpp
|
||||
src/Widgets/UIEditorMenuPopup.cpp
|
||||
src/Widgets/UIEditorNumberField.cpp
|
||||
src/Widgets/UIEditorPanelFrame.cpp
|
||||
src/Widgets/UIEditorPropertyGrid.cpp
|
||||
src/Widgets/UIEditorScrollView.cpp
|
||||
src/Widgets/UIEditorStatusBar.cpp
|
||||
src/Widgets/UIEditorTabStrip.cpp
|
||||
src/Widgets/UIEditorTextField.cpp
|
||||
src/Widgets/UIEditorTreeView.cpp
|
||||
src/Widgets/UIEditorVector2Field.cpp
|
||||
src/Widgets/UIEditorVector3Field.cpp
|
||||
src/Widgets/UIEditorVector4Field.cpp
|
||||
src/Widgets/UIEditorViewportSlot.cpp
|
||||
${XCUI_EDITOR_FOUNDATION_SOURCES}
|
||||
${XCUI_EDITOR_FIELD_SOURCES}
|
||||
${XCUI_EDITOR_COLLECTION_SOURCES}
|
||||
${XCUI_EDITOR_SHELL_SOURCES}
|
||||
${XCUI_EDITOR_WIDGET_SUPPORT_SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(XCUIEditorLib
|
||||
@@ -75,16 +112,10 @@ target_include_directories(XCUIEditorLib
|
||||
)
|
||||
|
||||
target_compile_definitions(XCUIEditorLib PUBLIC
|
||||
UNICODE
|
||||
_UNICODE
|
||||
XCUIEDITOR_REPO_ROOT="${XCUIEDITOR_REPO_ROOT_PATH}"
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(XCUIEditorLib PRIVATE /utf-8 /FS)
|
||||
set_property(TARGET XCUIEditorLib PROPERTY
|
||||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
endif()
|
||||
xcui_editor_apply_common_target_settings(XCUIEditorLib PUBLIC)
|
||||
|
||||
target_link_libraries(XCUIEditorLib PUBLIC
|
||||
XCEngine
|
||||
@@ -99,21 +130,9 @@ target_include_directories(XCUIEditorHost
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/app
|
||||
${CMAKE_SOURCE_DIR}/engine/include
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
target_compile_definitions(XCUIEditorHost PUBLIC
|
||||
UNICODE
|
||||
_UNICODE
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(XCUIEditorHost PRIVATE /utf-8 /FS)
|
||||
set_property(TARGET XCUIEditorHost PROPERTY
|
||||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
endif()
|
||||
xcui_editor_apply_common_target_settings(XCUIEditorHost PUBLIC)
|
||||
|
||||
target_link_libraries(XCUIEditorHost PUBLIC
|
||||
XCEngine
|
||||
@@ -126,27 +145,18 @@ if(XCENGINE_BUILD_XCUI_EDITOR_APP)
|
||||
add_executable(XCUIEditorApp WIN32
|
||||
app/main.cpp
|
||||
app/Application.cpp
|
||||
${XCUI_EDITOR_RESOURCE_FILES}
|
||||
)
|
||||
|
||||
target_include_directories(XCUIEditorApp PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/app
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/engine/include
|
||||
)
|
||||
|
||||
target_compile_definitions(XCUIEditorApp PRIVATE
|
||||
UNICODE
|
||||
_UNICODE
|
||||
XCUIEDITOR_REPO_ROOT="${XCUIEDITOR_REPO_ROOT_PATH}"
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(XCUIEditorApp PRIVATE /utf-8 /FS)
|
||||
set_property(TARGET XCUIEditorApp PROPERTY
|
||||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
endif()
|
||||
xcui_editor_apply_common_target_settings(XCUIEditorApp PRIVATE)
|
||||
|
||||
target_link_libraries(XCUIEditorApp PRIVATE
|
||||
XCUIEditorLib
|
||||
@@ -158,5 +168,3 @@ if(XCENGINE_BUILD_XCUI_EDITOR_APP)
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin"
|
||||
)
|
||||
endif()
|
||||
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${XCUI_EDITOR_RESOURCE_FILES})
|
||||
|
||||
Reference in New Issue
Block a user