mirror of
https://github.com/logos-storage/logos-storage-app-skeleton.git
synced 2026-07-29 10:23:12 +00:00
Update CMakeLists
This commit is contained in:
parent
cf3f547155
commit
94770d5787
@ -4,6 +4,7 @@ project(StorageUIPlugin VERSION 1.0.0 LANGUAGES CXX)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
########### DEPENDENCIES SECTION ###########
|
||||
|
||||
@ -136,11 +137,11 @@ endif()
|
||||
|
||||
# Source files
|
||||
set(SOURCES
|
||||
plugin/StorageUIPlugin.cpp
|
||||
plugin/StorageUIPlugin.h
|
||||
plugin/src/StorageBackend.cpp
|
||||
plugin/src/StorageBackend.h
|
||||
plugin/storage_resources.qrc
|
||||
src/StorageUIPlugin.cpp
|
||||
src/StorageUIPlugin.h
|
||||
src/StorageBackend.cpp
|
||||
src/StorageBackend.h
|
||||
src/storage_resources.qrc
|
||||
)
|
||||
|
||||
# Add SDK sources (only if source layout, installed layout uses the library)
|
||||
@ -250,17 +251,16 @@ if(_cpp_sdk_is_source)
|
||||
)
|
||||
endif()
|
||||
|
||||
# Add custom target to run the cpp generator
|
||||
add_custom_target(run_cpp_generator_storage_ui
|
||||
COMMAND "${CPP_GENERATOR}" --metadata "${METADATA_JSON}" --general-only --output-dir "${PLUGINS_OUTPUT_DIR}"
|
||||
WORKING_DIRECTORY "${LOGOS_CPP_SDK_ROOT}/.."
|
||||
COMMENT "Running logos-cpp-generator on ${METADATA_JSON} with output-dir ${PLUGINS_OUTPUT_DIR}"
|
||||
VERBATIM
|
||||
add_custom_command(
|
||||
OUTPUT "${PLUGINS_OUTPUT_DIR}/logos_sdk.cpp"
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${PLUGINS_OUTPUT_DIR}"
|
||||
COMMAND "${CPP_GENERATOR}" --metadata "${METADATA_JSON}" --general-only --output-dir "${PLUGINS_OUTPUT_DIR}"
|
||||
WORKING_DIRECTORY "${LOGOS_CPP_SDK_ROOT}/.."
|
||||
DEPENDS "${METADATA_JSON}" cpp_generator_build
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# Add dependency to ensure cpp generator is built first
|
||||
add_dependencies(run_cpp_generator_storage_ui cpp_generator_build)
|
||||
add_dependencies(run_cpp_generator_storage_ui run_cpp_generator_storage_module)
|
||||
add_custom_target(run_cpp_generator_storage_ui DEPENDS "${PLUGINS_OUTPUT_DIR}/logos_sdk.cpp")
|
||||
|
||||
# Add generated logos_sdk.cpp - will be generated by run_cpp_generator_storage_ui
|
||||
list(APPEND SOURCES
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user