Skip to content

Commit 23918e8

Browse files
authored
Rename project back to sharedlibpp (#12)
* Rename project back to sharedlibpp
1 parent a5e2aad commit 23918e8

22 files changed

+137
-137
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
cmake_minimum_required(VERSION 3.5)
88

9-
project(shlibpp
10-
VERSION 0.0.2
9+
project(sharedlibpp
10+
VERSION 0.0.3
1111
DESCRIPTION "Tiny cross-platform plug-in system (dll, so, dylib)"
1212
LANGUAGES CXX)
1313

@@ -62,10 +62,10 @@ add_subdirectory(src)
6262

6363
# Install CMake config files for the library
6464
include(InstallBasicPackageFiles)
65-
install_basic_package_files(shlibpp
66-
VERSION ${shlibpp_VERSION}
65+
install_basic_package_files(sharedlibpp
66+
VERSION ${sharedlibpp_VERSION}
6767
COMPATIBILITY AnyNewerVersion
68-
EXPORT shlibpp
68+
EXPORT sharedlibpp
6969
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
7070

7171
# Add uninstall target

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Simple cross platform plug-in system
22
====================================
33

4-
`shlibpp` is a tiny cross-platform library to create and load shared
5-
libraries for different platform (Linux/Mac/Windows). `shlibpp` provides
4+
`sharedlibpp` is a tiny cross-platform library to create and load shared
5+
libraries for different platform (Linux/Mac/Windows). `sharedlibpp` provides
66
an easy and portable way to create plug-ins which encapsulate your c++ classes
77
inside a shared library (so, dylib, dll).
88
The original code is taken and from
@@ -13,7 +13,7 @@ added to report the native OS error messages on failures.
1313

1414
Building on Linux/Mac
1515
---------------------
16-
$ cd shlibpp
16+
$ cd sharedlibpp
1717
$ cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install
1818
$ cmake --build . --config Release
1919
$ cmake --install .
@@ -25,7 +25,7 @@ The build system by default compiles and build the examples.
2525

2626
* On Linux/Mac
2727
```
28-
$ cd shlibpp/build/examples
28+
$ cd sharedlibpp/build/examples
2929
$ ./math_test mymath
3030
$ ./math_test_custom mymathcustom
3131
```

examples/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
# BSD-3-Clause license. See the accompanying LICENSE file for details.
66

77
add_library(mymath MODULE MyMath.cpp MyMath.h)
8-
target_include_directories(mymath PRIVATE $<TARGET_PROPERTY:shlibpp::shlibpp,INTERFACE_INCLUDE_DIRECTORIES>)
8+
target_include_directories(mymath PRIVATE $<TARGET_PROPERTY:sharedlibpp::sharedlibpp,INTERFACE_INCLUDE_DIRECTORIES>)
99

1010
add_executable(math_test math_test.cpp)
11-
target_link_libraries(math_test PRIVATE shlibpp::shlibpp)
11+
target_link_libraries(math_test PRIVATE sharedlibpp::sharedlibpp)
1212

1313
add_library(mymathcustom MODULE MyMathCustom.cpp MyMathCustom.h)
14-
target_include_directories(mymathcustom PRIVATE $<TARGET_PROPERTY:shlibpp::shlibpp,INTERFACE_INCLUDE_DIRECTORIES>)
14+
target_include_directories(mymathcustom PRIVATE $<TARGET_PROPERTY:sharedlibpp::sharedlibpp,INTERFACE_INCLUDE_DIRECTORIES>)
1515

1616
add_executable(math_test_custom math_test_custom.cpp)
17-
target_link_libraries(math_test_custom PRIVATE shlibpp::shlibpp)
17+
target_link_libraries(math_test_custom PRIVATE sharedlibpp::sharedlibpp)

examples/MyMath.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
#include "MyMath.h"
10-
#include <shlibpp/SharedLibraryClass.h>
10+
#include <sharedlibpp/SharedLibraryClass.h>
1111

1212
SHLIBPP_DEFINE_SHARED_SUBCLASS(my_math, MyMathImpl, MyMath);
1313

examples/MyMathCustom.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
#include "MyMathCustom.h"
10-
#include <shlibpp/SharedLibraryClass.h>
10+
#include <sharedlibpp/SharedLibraryClass.h>
1111

1212
SHLIBPP_DEFINE_SHARED_SUBCLASS_CUSTOM(CUSTOM_START_CHECK, CUSTOM_END_CHECK, CUSTOM_SYSTEM_VERSION, my_math_custom, MyMathCustomImpl, MyMathCustom);
1313

examples/math_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include <stdio.h>
1010
#include "MyMath.h"
1111

12-
#include <shlibpp/SharedLibraryClass.h>
13-
#include <shlibpp/SharedLibrary.h>
12+
#include <sharedlibpp/SharedLibraryClass.h>
13+
#include <sharedlibpp/SharedLibrary.h>
1414

1515

1616
int main(int argc, char *argv[])
@@ -24,15 +24,15 @@ int main(int argc, char *argv[])
2424

2525
// create an instance of shared library class factory to load the library
2626
printf("Loading the shared library... \n");
27-
shlibpp::SharedLibraryClassFactory<MyMath> myMathFactory(argv[1], "my_math");
27+
sharedlibpp::SharedLibraryClassFactory<MyMath> myMathFactory(argv[1], "my_math");
2828
if (!myMathFactory.isValid()) {
2929
printf("error (%d) : %s\n", static_cast<std::uint32_t>(myMathFactory.getStatus()),
3030
myMathFactory.getError().c_str());
3131
return 1;
3232
}
3333

3434
// create an instance of the class and call its functions
35-
shlibpp::SharedLibraryClass<MyMath> myMath(myMathFactory);
35+
sharedlibpp::SharedLibraryClass<MyMath> myMath(myMathFactory);
3636
printf("Calling some of its functions... \n");
3737
printf("15 + 12 = %d\n", myMath->add(15, 12));
3838
printf("15 - 12 = %d\n", myMath->sub(15, 12));

examples/math_test_custom.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include <stdio.h>
1010
#include "MyMathCustom.h"
1111

12-
#include <shlibpp/SharedLibraryClass.h>
13-
#include <shlibpp/SharedLibrary.h>
12+
#include <sharedlibpp/SharedLibraryClass.h>
13+
#include <sharedlibpp/SharedLibrary.h>
1414

1515

1616
int main(int argc, char *argv[])
@@ -24,7 +24,7 @@ int main(int argc, char *argv[])
2424

2525
// create an instance of shared library class factory to load the library
2626
printf("Loading the shared library... \n");
27-
shlibpp::SharedLibraryClassFactory<MyMathCustom> myMathFactory(argv[1],
27+
sharedlibpp::SharedLibraryClassFactory<MyMathCustom> myMathFactory(argv[1],
2828
CUSTOM_START_CHECK,
2929
CUSTOM_END_CHECK,
3030
CUSTOM_SYSTEM_VERSION,
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
3636
}
3737

3838
// create an instance of the class and call its functions
39-
shlibpp::SharedLibraryClass<MyMathCustom> myMath(myMathFactory);
39+
sharedlibpp::SharedLibraryClass<MyMathCustom> myMath(myMathFactory);
4040
printf("Calling some of its functions... \n");
4141
printf("15 + 12 = %d\n", myMath->add(15, 12));
4242
printf("15 - 12 = %d\n", myMath->sub(15, 12));

pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "shlibpp"
2+
name = "sharedlibpp"
33
# As this version is currently ignored, we do not
44
# waste effort in mantain it in synch with the value
55
# specified in CMakeLists.txt

src/CMakeLists.txt

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,39 @@
66

77
include (GNUInstallDirs)
88

9-
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shlibpp/config.h.in"
10-
"${CMAKE_CURRENT_BINARY_DIR}/shlibpp/config.h"
9+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sharedlibpp/config.h.in"
10+
"${CMAKE_CURRENT_BINARY_DIR}/sharedlibpp/config.h"
1111
@ONLY)
1212

13-
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shlibpp/version.h.in"
14-
"${CMAKE_CURRENT_BINARY_DIR}/shlibpp/version.h"
13+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sharedlibpp/version.h.in"
14+
"${CMAKE_CURRENT_BINARY_DIR}/sharedlibpp/version.h"
1515
@ONLY)
1616

17-
set(shlibpp_HDRS "${CMAKE_CURRENT_BINARY_DIR}/shlibpp/config.h"
18-
"${CMAKE_CURRENT_BINARY_DIR}/shlibpp/version.h"
19-
shlibpp/api.h
20-
shlibpp/SharedLibraryClassApi.h
21-
shlibpp/SharedLibraryClassFactory.h
22-
shlibpp/SharedLibraryClassFactory-inl.h
23-
shlibpp/SharedLibraryClass.h
24-
shlibpp/SharedLibraryClass-inl.h
25-
shlibpp/SharedLibraryFactory.h
26-
shlibpp/SharedLibrary.h)
17+
set(sharedlibpp_HDRS "${CMAKE_CURRENT_BINARY_DIR}/sharedlibpp/config.h"
18+
"${CMAKE_CURRENT_BINARY_DIR}/sharedlibpp/version.h"
19+
sharedlibpp/api.h
20+
sharedlibpp/SharedLibraryClassApi.h
21+
sharedlibpp/SharedLibraryClassFactory.h
22+
sharedlibpp/SharedLibraryClassFactory-inl.h
23+
sharedlibpp/SharedLibraryClass.h
24+
sharedlibpp/SharedLibraryClass-inl.h
25+
sharedlibpp/SharedLibraryFactory.h
26+
sharedlibpp/SharedLibrary.h)
2727

28-
set(shlibpp_SRCS version.cpp
28+
set(sharedlibpp_SRCS version.cpp
2929
SharedLibrary.cpp
3030
SharedLibraryFactory.cpp)
3131

32-
add_library(shlibpp ${shlibpp_SRCS} ${shlibpp_HDRS})
33-
add_library(shlibpp::shlibpp ALIAS shlibpp)
32+
add_library(sharedlibpp ${sharedlibpp_SRCS} ${sharedlibpp_HDRS})
33+
add_library(sharedlibpp::sharedlibpp ALIAS sharedlibpp)
3434

3535
# Add build definitions
3636
if(NOT BUILD_SHARED_LIBS)
3737
target_compile_definitions(shlibpp PRIVATE SHLIBPP_STATIC)
3838
endif()
39-
set_target_properties(shlibpp PROPERTIES DEFINE_SYMBOL BUILDING_SHLIBPP)
39+
set_target_properties(sharedlibpp PROPERTIES DEFINE_SYMBOL BUILDING_SHLIBPP)
4040

41-
target_include_directories(shlibpp PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
41+
target_include_directories(sharedlibpp PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
4242
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
4343
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
4444

@@ -47,24 +47,24 @@ if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.8)
4747
endif()
4848
if(CMAKE_VERSION VERSION_LESS 3.8)
4949
# Should be enough to enable c++11
50-
target_compile_features(shlibpp PUBLIC cxx_constexpr
50+
target_compile_features(sharedlibpp PUBLIC cxx_constexpr
5151
cxx_nullptr)
5252
else()
53-
target_compile_features(shlibpp PUBLIC cxx_std_11)
53+
target_compile_features(sharedlibpp PUBLIC cxx_std_11)
5454
endif()
5555

5656
if(UNIX)
57-
target_link_libraries(shlibpp PRIVATE dl)
57+
target_link_libraries(sharedlibpp PRIVATE dl)
5858
endif()
5959

60-
set_property(TARGET shlibpp PROPERTY PUBLIC_HEADER ${shlibpp_HDRS})
61-
set_property(TARGET shlibpp PROPERTY VERSION ${shlibpp_VERSION})
62-
set_property(TARGET shlibpp PROPERTY SOVERSION 1)
60+
set_property(TARGET sharedlibpp PROPERTY PUBLIC_HEADER ${sharedlibpp_HDRS})
61+
set_property(TARGET sharedlibpp PROPERTY VERSION ${sharedlibpp_VERSION})
62+
set_property(TARGET sharedlibpp PROPERTY SOVERSION 1)
6363

64-
install(TARGETS shlibpp
65-
EXPORT shlibpp
66-
COMPONENT shlibpp
64+
install(TARGETS sharedlibpp
65+
EXPORT sharedlibpp
66+
COMPONENT sharedlibpp
6767
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
6868
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
6969
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
70-
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/shlibpp)
70+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sharedlibpp)

src/SharedLibrary.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
# include <dlfcn.h>
1515
#endif
1616

17-
#include <shlibpp/SharedLibrary.h>
17+
#include <sharedlibpp/SharedLibrary.h>
1818

19-
using namespace shlibpp;
19+
using namespace sharedlibpp;
2020

2121

2222
class SharedLibrary::Private

0 commit comments

Comments
 (0)