Skip to content
Merged
4 changes: 4 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ option(EXAMPLE_DYNAMICLOADING "Include dynamic loading examples" OFF)
option(EXAMPLE_SIMPLECOMRPC_TEST "Include Simple COMRPC test client" OFF)
option(EXAMPLE_PLUGINSMARTINTERFACETYPE_EXAMPLE "Include PluginSmartInterfaceType examples" OFF)
option(EXAMPLE_DYNAMICJSONRPCERRORMESSAGE_EXAMPLE "Include DynamicJSONRPCErrorMessage example" OFF)
option(EXAMPLE_GENERATORSHOWCASE_EXAMPLE "Include GeneratorShowCase example" OFF)

if(EXAMPLE_COMRPCCLIENT)
add_subdirectory(COMRPCClient)
Expand Down Expand Up @@ -95,3 +96,6 @@ if (EXAMPLE_DYNAMICJSONRPCERRORMESSAGE_EXAMPLE)
add_subdirectory(DynamicJSONRPCErrorMessage)
endif()

if (EXAMPLE_GENERATORSHOWCASE_EXAMPLE)
add_subdirectory(GeneratorShowcase)
endif()
58 changes: 58 additions & 0 deletions examples/GeneratorShowcase/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# If not stated otherwise in this file or this component's LICENSE file the
# following copyright and licenses apply:
#
# Copyright 2024 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.

project(GeneratorShowcase)

cmake_minimum_required(VERSION 3.15)

find_package(Thunder)

project_version(1.0.0)

set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME})

message("Setup ${MODULE_NAME} v${PROJECT_VERSION}")

find_package(${NAMESPACE}Core REQUIRED)
find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(${NAMESPACE}Messaging REQUIRED)
find_package(CompileSettingsDebug REQUIRED)

set(PLUGIN_GENERATORSHOWCASE_STARTMODE "Activated" CACHE STRING "Automatically start the plugin")

add_library(${MODULE_NAME} SHARED
GeneratorShowcase.cpp
Module.cpp)

target_include_directories(${MODULE_NAME} SYSTEM
PRIVATE
".")

target_link_libraries(${MODULE_NAME}
PRIVATE
${NAMESPACE}Core::${NAMESPACE}Core
${NAMESPACE}Plugins::${NAMESPACE}Plugins
${NAMESPACE}Definitions::${NAMESPACE}Definitions
${NAMESPACE}Messaging::${NAMESPACE}Messaging
CompileSettingsDebug::CompileSettingsDebug)


# Library installation section
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/${STORAGE_DIRECTORY}/plugins COMPONENT ${NAMESPACE}_Runtime)

write_config()
1 change: 1 addition & 0 deletions examples/GeneratorShowcase/GeneratorShowcase.conf.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
startmode = "@PLUGIN_GENERATORSHOWCASE_STARTMODE@"
43 changes: 43 additions & 0 deletions examples/GeneratorShowcase/GeneratorShowcase.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2022 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 "GeneratorShowcase.h"

namespace Thunder {

namespace Plugin {

namespace {
static Metadata<GeneratorShowcase> metadata(
// Version
1, 0, 0,
// Preconditions
{ },
// Terminations
{ },
// Controls
{ }
);
}


} // namespace Plugin

}
Loading
Loading