Skip to content
Snippets Groups Projects
Commit 0d809cd1 authored by Christian Dreher's avatar Christian Dreher
Browse files

refactor: Restructuring.

parent 0239b6cc
No related branches found
No related tags found
1 merge request!66Refactor/new arch
......@@ -5,5 +5,5 @@ if(NOT DEFINED ARMARX_LEGACY_CMAKE_PROJECT OR ${ARMARX_LEGACY_CMAKE_PROJECT})
include(${ArmarXGui_CMAKE_DIR}/legacy/GuiCommands.cmake)
else()
message(STATUS "Using ArmarXGui scripts in next-gen mode.")
include(${ArmarXGui_CMAKE_DIR}/latest/GuiCommands.cmake)
include(${ArmarXGui_CMAKE_DIR}/latest/add_qt_targets.cmake)
endif()
......@@ -96,11 +96,6 @@ function(armarx_add_qt_plugin TARGET)
DEPENDENCIES ${AX_DEPENDENCIES}
DEPENDENCIES_LEGACY ${AX_DEPENDENCIES_LEGACY}
)
# Add Qt targets to all_generate and generated files.
add_dependencies(all_generate ${TARGET}_autogen)
file(GLOB_RECURSE QT_GENERATED_FILES "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_autogen/*")
target_sources(generated_files PRIVATE ${QT_GENERATED_FILES})
endfunction()
......@@ -114,12 +109,12 @@ function(armarx_add_qt_library TARGET)
message(FATAL_ERROR "${TARGET}: Unknown arguments `${AX_UNPARSED_ARGUMENTS}`.")
endif()
# Variables modified within this context.
# Variables modified within this scope.
set(SOURCES ${AX_SOURCES})
set(HEADERS ${AX_HEADERS} ${AX_UI_FILES})
set(DEPENDENCIES ${AX_DEPENDENCIES})
# TODO: urgh...
# TODO: Remove this.
if(NOT "${TARGET}" STREQUAL "ArmarXGuiBase")
list(APPEND DEPENDENCIES ArmarXGuiBase)
endif()
......@@ -158,4 +153,9 @@ function(armarx_add_qt_library TARGET)
"-P" "${ArmarXGui_CMAKE_DIR}/check_qt_moc_includes.cmake"
COMMENT "Checking Qt MOC includes."
)
# Add Qt targets to all_generate and generated files.
add_dependencies(all_generate ${TARGET}_autogen)
file(GLOB_RECURSE QT_GENERATED_FILES "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_autogen/*")
target_sources(generated_files PRIVATE ${QT_GENERATED_FILES})
endfunction()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment