-
Notifications
You must be signed in to change notification settings - Fork 135
Moving interfaces fron plugins to new interfaces directory #2006
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,145 @@ | ||
| # 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}/.." NO_INCLUDES) | ||
|
|
||
| file(GLOB JSON_DATA_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/json/JsonData_*.h" "${CMAKE_CURRENT_BINARY_DIR}/json/json_*.h") | ||
| 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 | ||
| Module.cpp | ||
| ) | ||
|
|
||
| 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 11 | ||
| CXX_STANDARD_REQUIRED YES | ||
| FRAMEWORK FALSE | ||
| SOVERSION ${VERSION_MAJOR} | ||
| ) | ||
|
|
||
| set_target_properties(${TARGET} PROPERTIES | ||
| CXX_STANDARD 11 | ||
| 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 | ||
| ) | ||
|
|
||
| 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}) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||
| /* | ||||||
| * If not stated otherwise in this file or this component's LICENSE file the | ||||||
| * following copyright and licenses apply: | ||||||
| * | ||||||
| * Copyright 2020 Metrological | ||||||
|
||||||
| * Copyright 2020 Metrological | |
| * Copyright 2025 Metrological |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /* | ||
| * 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. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #ifndef MODULE_NAME | ||
| #define MODULE_NAME Interfaces | ||
| #endif | ||
|
|
||
| #include <core/core.h> | ||
|
|
||
| #if defined(__WINDOWS__) && defined(INTERFACES_EXPORTS) | ||
| #undef EXTERNAL | ||
| #define EXTERNAL EXTERNAL_EXPORT | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /* | ||
| * 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. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #ifndef MODULE_NAME | ||
| #error "Please define a MODULE_NAME that describes the binary/library you are building." | ||
| #endif | ||
|
|
||
| // Since this header is included, the code using it is external to Thunder core. | ||
| // So therefore it should use the correct Tracing functionality and not TRACE_L# (which are just fancy printfs). | ||
| #define CORE_TRACE_NOT_ALLOWED | ||
|
|
||
| #include "Module.h" | ||
| #include "IController.h" | ||
| #include "IPlugin.h" | ||
| #include "IShell.h" | ||
| #include "IStateControl.h" | ||
| #include "ISubSystem.h" | ||
| #include "IVirtualInput.h" | ||
| #include "IStateController.h" | ||
| #include "IDispatcher.h" | ||
|
|
||
| #ifdef __WINDOWS__ | ||
| #pragma comment(lib, "interfaces.lib") | ||
| #endif |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in comment: "errors" should be "errors" is correct, but "erros" in the comment is misspelled.