Skip to content

Commit 713f328

Browse files
committed
Switch to use external sharedlibpp instead of internal shlibpp
1 parent 9921b59 commit 713f328

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

.github/CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Example:
5858
#define BLOCKFACTORY_CORE_FACTORYSINGLETON_H
5959

6060
#include "BlockFactory/Core/Log.h"
61-
#include "shlibpp/SharedLibrary.h"
62-
#include "shlibpp/SharedLibraryClass.h"
61+
#include "sharedlibpp/SharedLibrary.h"
62+
#include "sharedlibpp/SharedLibraryClass.h"
6363

6464
#include <memory>
6565

CMakeLists.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# GNU Lesser General Public License v2.1 or any later version.
44

55
cmake_minimum_required(VERSION 3.16...3.31)
6-
project(blockfactory LANGUAGES CXX VERSION 0.8.5)
6+
project(blockfactory LANGUAGES CXX VERSION 1.0.0)
77

88
if(BUILD_DOCS)
99
add_subdirectory(doc)
@@ -109,16 +109,16 @@ endif()
109109
# Handle unit tests support
110110
option(BUILD_TESTING "Create tests using CMake" OFF)
111111

112-
option(BLOCKFACTORY_USES_SYSTEM_SHLIBPP "If ON, find shlibpp with find_package(shlibpp)" OFF)
113-
if(BLOCKFACTORY_USES_SYSTEM_SHLIBPP)
114-
find_package(shlibpp REQUIRED)
112+
option(BLOCKFACTORY_USES_SYSTEM_SHAREDLIBPP "If ON, find sharedlibpp with find_package(sharedlibpp)" OFF)
113+
if(BLOCKFACTORY_USES_SYSTEM_SHAREDLIBPP)
114+
find_package(sharedlibpp REQUIRED)
115115
else()
116116
include(FetchContent)
117117
FetchContent_Declare(
118-
shlibpp
119-
URL https://github.com/ami-iit/shlibpp/archive/refs/tags/v0.0.2.zip
118+
sharedlibpp
119+
URL https://github.com/ami-iit/sharedlibpp/archive/refs/tags/v0.0.3.zip
120120
)
121-
FetchContent_MakeAvailable(shlibpp)
121+
FetchContent_MakeAvailable(sharedlibpp)
122122
endif()
123123

124124
add_subdirectory(deps)

doc/mkdocs/data/create_new_library.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ A plugin library usually contains multiple classes used for multiple Blocks. The
521521
#include "SignalMath.h"
522522
523523
// Class factory API
524-
#include <shlibpp/SharedLibraryClassApi.h>
524+
#include <sharedlibpp/SharedLibraryClassApi.h>
525525
526526
// Add the example::SignalMath class to the plugin factory
527527
SHLIBPP_DEFINE_SHARED_SUBCLASS(SignalMath, example::SignalMath, blockfactory::core::Block);

example/matlab/AutogenerationExample_grt_rtw/AutogenerationExample.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ void AutogenerationExampleModelClass::initialize()
198198
// TODO: find a better way to handle them.
199199
{
200200
// Create a new class. This object will be destroyed at the end of the scope.
201-
shlibpp::SharedLibraryClass<blockfactory::core::Block> blockPtr(*factory);
201+
sharedlibpp::SharedLibraryClass<blockfactory::core::Block> blockPtr(*factory);
202202
auto tmpCoderBlockInfo = std::unique_ptr<blockfactory::coder::CoderBlockInformation>(
203203
new blockfactory::coder::CoderBlockInformation);
204204
tmpCoderBlockInfo->storeRTWParameters(params);

example/src/Factory.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "SignalMath.h"
22

33
// Class factory API
4-
#include <shlibpp/SharedLibraryClassApi.h>
4+
#include <sharedlibpp/SharedLibraryClassApi.h>
55

66
// Add the example::SignalMath class to the plugin factory
77
SHLIBPP_DEFINE_SHARED_SUBCLASS(SignalMath, example::SignalMath, blockfactory::core::Block);

matlab/BlockFactory.tlc

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
// TODO: find a better way to handle them.
238238
{
239239
// Create a new class. This object will be destroyed at the end of the scope.
240-
shlibpp::SharedLibraryClass<blockfactory::core::Block> blockPtr(*factory);
240+
sharedlibpp::SharedLibraryClass<blockfactory::core::Block> blockPtr(*factory);
241241

242242
auto tmpCoderBlockInfo = std::unique_ptr<blockfactory::coder::CoderBlockInformation>(
243243
new blockfactory::coder::CoderBlockInformation);

sources/Core/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ set(CORE_PRIVATE_HDR
2727
add_library(Core ${CORE_SRC} ${CORE_PUBLIC_HDR} ${CORE_PRIVATE_HDR})
2828
add_library(BlockFactory::Core ALIAS Core)
2929

30-
target_link_libraries(Core PUBLIC shlibpp::shlibpp)
30+
target_link_libraries(Core PUBLIC sharedlibpp::sharedlibpp)
3131

3232
target_include_directories(Core PUBLIC
3333
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
@@ -55,6 +55,6 @@ install_basic_package_files(BlockFactoryCore
5555
COMPATIBILITY AnyNewerVersion
5656
EXPORT BlockFactoryCoreExport
5757
FIRST_TARGET Core
58-
DEPENDENCIES shlibpp
58+
DEPENDENCIES sharedlibpp
5959
NAMESPACE BlockFactory::
6060
NO_CHECK_REQUIRED_COMPONENTS_MACRO)

sources/Core/include/BlockFactory/Core/FactorySingleton.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#define BLOCKFACTORY_CORE_FACTORYSINGLETON_H
1111

1212
#include "BlockFactory/Core/Log.h"
13-
#include "shlibpp/SharedLibrary.h"
14-
#include "shlibpp/SharedLibraryClass.h"
13+
#include "sharedlibpp/SharedLibrary.h"
14+
#include "sharedlibpp/SharedLibraryClass.h"
1515

1616
#include <memory>
1717

@@ -23,9 +23,9 @@ namespace blockfactory {
2323
} // namespace blockfactory
2424

2525
/**
26-
* @brief Class for interfacing with shlibpp plugin library
26+
* @brief Class for interfacing with sharedlibpp plugin library
2727
*
28-
* This helper class ease the integration of shlibpp within the BlockFactory framework. It is
28+
* This helper class ease the integration of sharedlibpp within the BlockFactory framework. It is
2929
* implemented with a singleton pattern.
3030
*
3131
* It can handle multiple plugin libraries together and provides support of destructing the related
@@ -41,7 +41,7 @@ class blockfactory::core::ClassFactorySingleton
4141
#endif
4242

4343
public:
44-
using ClassFactory = shlibpp::SharedLibraryClassFactory<blockfactory::core::Block>;
44+
using ClassFactory = sharedlibpp::SharedLibraryClassFactory<blockfactory::core::Block>;
4545
using ClassFactoryPtr = std::shared_ptr<ClassFactory>;
4646

4747
/// @brief Name of the factory associated to the class specified during its registration

sources/Simulink/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24")
1313
include/BlockFactory/Simulink/Private/SimulinkBlockInformationImpl.h
1414
src/BlockFactory.cpp
1515
NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES
16-
LINK_TO ${Matlab_MEX_LIBRARY} ${Matlab_MX_LIBRARY} BlockFactory::Core shlibpp::shlibpp mxpp)
16+
LINK_TO ${Matlab_MEX_LIBRARY} ${Matlab_MX_LIBRARY} BlockFactory::Core sharedlibpp::sharedlibpp mxpp)
1717
else()
1818
matlab_add_mex(
1919
NAME Simulink
@@ -23,7 +23,7 @@ else()
2323
src/SimulinkBlockInformationImpl.cpp
2424
include/BlockFactory/Simulink/Private/SimulinkBlockInformationImpl.h
2525
src/BlockFactory.cpp
26-
LINK_TO ${Matlab_MEX_LIBRARY} ${Matlab_MX_LIBRARY} BlockFactory::Core shlibpp::shlibpp mxpp)
26+
LINK_TO ${Matlab_MEX_LIBRARY} ${Matlab_MX_LIBRARY} BlockFactory::Core sharedlibpp::sharedlibpp mxpp)
2727
endif()
2828
add_library(BlockFactory::Simulink ALIAS Simulink)
2929

@@ -50,6 +50,6 @@ install_basic_package_files(BlockFactorySimulink
5050
COMPATIBILITY AnyNewerVersion
5151
EXPORT BlockFactorySimulinkExport
5252
FIRST_TARGET Simulink
53-
DEPENDENCIES BlockFactoryCore mxpp shlibpp
53+
DEPENDENCIES BlockFactoryCore mxpp sharedlibpp
5454
NAMESPACE BlockFactory::
5555
NO_CHECK_REQUIRED_COMPONENTS_MACRO)

tests/Factory/MockPlugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "MockPlugin.h"
1010
#include <BlockFactory/Core/Parameter.h>
1111

12-
#include <shlibpp/SharedLibraryClassApi.h>
12+
#include <sharedlibpp/SharedLibraryClassApi.h>
1313

1414
mock::MockBlock::MockBlock()
1515
{

0 commit comments

Comments
 (0)