-
Notifications
You must be signed in to change notification settings - Fork 135
Move interfaces from Thunder/plugins to Thunder/interfaces #2102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
ab49afb
54a2aae
471ca6f
bcbcb29
bc999a4
a702bd2
a9d2950
e5d19b6
c300410
dba7834
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,147 @@ | ||
| # If not stated otherwise in this file or this component's license file the | ||
| # following copyright and licenses apply: | ||
| # | ||
| # Copyright 2025 Metrological | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set(TARGET ${NAMESPACE}Interfaces) | ||
| set(TARGET_PROXYSTUBS ${NAMESPACE}ProxyStubs) | ||
| string(TOLOWER ${NAMESPACE} NAMESPACE_LIB) | ||
|
|
||
| ProxyStubGenerator(NAMESPACE "Thunder::PluginHost" INPUT "${CMAKE_CURRENT_SOURCE_DIR}/IPlugin.h" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/..") | ||
| ProxyStubGenerator(NAMESPACE "Thunder::PluginHost" INPUT "${CMAKE_CURRENT_SOURCE_DIR}/IShell.h" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/..") | ||
| ProxyStubGenerator(NAMESPACE "Thunder::Exchange" INPUT "${CMAKE_CURRENT_SOURCE_DIR}/IController.h" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/..") | ||
| ProxyStubGenerator(NAMESPACE "Thunder::PluginHost" INPUT "${CMAKE_CURRENT_SOURCE_DIR}/IStateControl.h" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/..") | ||
| ProxyStubGenerator(NAMESPACE "Thunder::PluginHost" INPUT "${CMAKE_CURRENT_SOURCE_DIR}/IStateController.h" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/..") | ||
| ProxyStubGenerator(NAMESPACE "Thunder::PluginHost" INPUT "${CMAKE_CURRENT_SOURCE_DIR}/ISubSystem.h" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/..") | ||
| ProxyStubGenerator(NAMESPACE "Thunder::PluginHost" INPUT "${CMAKE_CURRENT_SOURCE_DIR}/IDispatcher.h" OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/..") | ||
|
|
||
| JsonGenerator(CODE NAMESPACE Thunder::Exchange::Controller INPUT ${CMAKE_CURRENT_SOURCE_DIR}/IController.h OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/json" INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/.." NO_INCLUDES) | ||
| JsonGenerator(CODE NAMESPACE Thunder::PluginHost INPUT ${CMAKE_CURRENT_SOURCE_DIR}/IStateController.h OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/json" INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/..") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fishy if IStateController.h does work properly without NO_INCLUDES, then IController should also. This should then be reflected in windows projects as well. |
||
|
|
||
| file(GLOB JSON_DATA_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/json/JsonData_*.h" "${CMAKE_CURRENT_BINARY_DIR}/json/json_*.h") | ||
| file(GLOB JSON_ENUM_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/json/JsonEnum_*.cpp") | ||
| file(GLOB PROXY_STUB_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/generated/ProxyStubs*.cpp") | ||
| list(APPEND JSON_CODE_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/json/JStateController.h") | ||
|
|
||
| add_library(${TARGET_PROXYSTUBS} SHARED | ||
| ${PROXY_STUB_SOURCES} | ||
| Module.cpp | ||
| ) | ||
|
|
||
| add_library(${TARGET} SHARED | ||
| ${JSON_ENUM_SOURCES} | ||
| Module.cpp | ||
| ) | ||
|
nxtum marked this conversation as resolved.
|
||
|
|
||
| set(PUBLIC_HEADERS | ||
| IController.h | ||
| IDispatcher.h | ||
| IPlugin.h | ||
| IShell.h | ||
| IStateControl.h | ||
| IStateController.h | ||
| ISubSystem.h | ||
| IVirtualInput.h | ||
| interfaces.h | ||
| Module.h | ||
| ) | ||
|
|
||
| # when compiling proxy/stubs we should ignore deprecated warnings (which are treated as errors nowadays) | ||
| # as usage of those deprecated methods is valid here | ||
| target_compile_options(${TARGET_PROXYSTUBS} PRIVATE -Wno-deprecated-declarations) | ||
|
|
||
| target_link_libraries(${TARGET_PROXYSTUBS} | ||
| PRIVATE | ||
| CompileSettingsDebug::CompileSettingsDebug | ||
| ${NAMESPACE}Core::${NAMESPACE}Core | ||
| ${NAMESPACE}COM::${NAMESPACE}COM | ||
| ${NAMESPACE}Messaging::${NAMESPACE}Messaging | ||
| ) | ||
|
|
||
| target_link_libraries(${TARGET} | ||
| PUBLIC | ||
| ${NAMESPACE}Core::${NAMESPACE}Core | ||
| ${NAMESPACE}COM::${NAMESPACE}COM | ||
| PRIVATE | ||
| CompileSettingsDebug::CompileSettingsDebug | ||
| ) | ||
|
|
||
| target_include_directories( ${TARGET_PROXYSTUBS} | ||
| PRIVATE | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../> | ||
| ) | ||
|
|
||
| target_include_directories( ${TARGET} | ||
| PUBLIC | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../> | ||
| $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}> | ||
| ) | ||
|
|
||
| set_target_properties(${TARGET_PROXYSTUBS} PROPERTIES | ||
| CXX_STANDARD ${CXX_STD} | ||
| CXX_STANDARD_REQUIRED YES | ||
| FRAMEWORK FALSE | ||
| SOVERSION ${VERSION_MAJOR} | ||
| ) | ||
|
|
||
| set_target_properties(${TARGET} PROPERTIES | ||
| CXX_STANDARD ${CXX_STD} | ||
| CXX_STANDARD_REQUIRED YES | ||
| FRAMEWORK FALSE | ||
| PUBLIC_HEADER "${PUBLIC_HEADERS}" # specify the public headers | ||
| SOVERSION ${VERSION_MAJOR} | ||
| ) | ||
|
|
||
| if(HUMAN_VERSIONED_BINARIES) | ||
| set_target_properties(${TARGET} PROPERTIES | ||
| VERSION ${VERSION} | ||
| ) | ||
| endif() | ||
| # =========================================================================================== | ||
| # Install ARTIFACTS: | ||
| # =========================================================================================== | ||
| install( | ||
| TARGETS ${TARGET} EXPORT ${TARGET}Targets | ||
| ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${NAMESPACE}_Development | ||
| LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${NAMESPACE}_Runtime NAMELINK_COMPONENT ${NAMESPACE}_Development | ||
| RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime | ||
| FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime | ||
| PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/interfaces COMPONENT ${NAMESPACE}_Development | ||
| INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE} | ||
| ) | ||
|
|
||
| install( | ||
| FILES ${JSON_DATA_HEADERS} ${JSON_CODE_HEADERS} | ||
| DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/interfaces/json | ||
| COMPONENT ${NAMESPACE}_Development | ||
| ) | ||
|
Comment on lines
+117
to
+131
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The installed Thunder interfaces now end up in the same folder as 3rdparty plugin interfaces... This may (or may not?) be a problem. |
||
|
|
||
| install( | ||
| TARGETS ${TARGET_PROXYSTUBS} EXPORT ${TARGET_PROXYSTUBS}Targets | ||
| ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${NAMESPACE_LIB}/proxystubs COMPONENT ${NAMESPACE}_Development | ||
| LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${NAMESPACE_LIB}/proxystubs COMPONENT ${NAMESPACE}_Runtime NAMELINK_COMPONENT ${NAMESPACE}_Development | ||
| RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime | ||
| FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR}/${NAMESPACE_LIB}/proxystubs COMPONENT ${NAMESPACE}_Runtime | ||
| PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/proxystubs COMPONENT ${NAMESPACE}_Development | ||
| INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/proxystubs | ||
| ) | ||
| # =========================================================================================== | ||
| # Install METADATA: | ||
| # =========================================================================================== | ||
|
|
||
| InstallCMakeConfig(TARGETS ${TARGET}) | ||
| InstallCMakeConfig(TARGETS ${TARGET_PROXYSTUBS}) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* | ||
| * If not stated otherwise in this file or this component's LICENSE file the | ||
| * following copyright and licenses apply: | ||
| * | ||
| * Copyright 2020 Metrological | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #include "Module.h" | ||
| #include "IController.h" | ||
|
|
||
| #ifdef BUILD_SHARED_LIBS | ||
| MODULE_NAME_DECLARATION(BUILD_REFERENCE) | ||
| #else | ||
| MODULE_NAME_ARCHIVE_DECLARATION | ||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| * If not stated otherwise in this file or this component's LICENSE file the | ||
| * following copyright and licenses apply: | ||
| * | ||
| * Copyright 2020 Metrological | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #ifndef MODULE_NAME | ||
| #define MODULE_NAME Interfaces | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main idea was to unclash these from Plugins module, but now we're clashing with Interfaces! |
||
| #endif | ||
|
|
||
| #include <core/core.h> | ||
| #include <com/com.h> | ||
| #include <cryptalgo/cryptalgo.h> | ||
| #include <websocket/websocket.h> | ||
| #include <messaging/messaging.h> | ||
|
|
||
| #ifdef __CORE_WARNING_REPORTING__ | ||
| #include <warningreporting/warningreporting.h> | ||
| #endif | ||
|
|
||
| #if defined(__WINDOWS__) && defined(INTERFACES_EXPORTS) | ||
| #undef EXTERNAL | ||
| #define EXTERNAL EXTERNAL_EXPORT | ||
| #endif | ||
|
|
||
| // @insert <com/Ids.h> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /* | ||
| * If not stated otherwise in this file or this component's LICENSE file the | ||
| * following copyright and licenses apply: | ||
| * | ||
| * Copyright 2023 Metrological | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| // Generated JSON enum sources include this header. | ||
|
|
||
| #include <core/core.h> | ||
| #include <interfaces/IController.h> | ||
| #include <interfaces/IStateController.h> |
Uh oh!
There was an error while loading. Please reload this page.