File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 with :
3737 name : example-plugin-windows
3838 path : |
39- ./build/*_plugin .dll
40- ./build/*_plugin .pdb
39+ ./build/endstone_* .dll
40+ ./build/endstone_* .pdb
4141
4242 build_linux :
4343 name : Build on Ubuntu
7474 uses : actions/upload-artifact@v4
7575 with :
7676 name : example-plugin-linux
77- path : ./build/*_plugin .so
77+ path : ./build/endstone_* .so
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.15 )
22
3- project (endstone_cpp_example CXX )
3+ project (cpp_example CXX )
44
55set (CMAKE_CXX_STANDARD 17)
66set (CMAKE_CXX_STANDARD_REQUIRED ON )
@@ -16,10 +16,9 @@ FetchContent_MakeAvailable(endstone)
1616add_library (${PROJECT_NAME} SHARED src/example_plugin.cpp )
1717target_include_directories (${PROJECT_NAME} PUBLIC include )
1818target_link_libraries (${PROJECT_NAME} PRIVATE endstone::headers )
19+ set_target_properties (${PROJECT_NAME} PROPERTIES PREFIX "endstone_" )
1920
20- if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
21- target_compile_definitions (${PROJECT_NAME} PRIVATE _ITERATOR_DEBUG_LEVEL=0 )
22- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
21+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
2322 target_compile_options (${PROJECT_NAME} PRIVATE -stdlib=libc++ -fPIC )
2423 target_link_libraries (${PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++ libc++.a libc++abi.a )
2524endif ()
Original file line number Diff line number Diff line change 33#include " example_plugin.h"
44
55// The ENDSTONE_PLUGIN macro defines the metadata for the plugin.
6- ENDSTONE_PLUGIN (/* name=*/ " endstone_cpp_example " , /* version=*/ " 0.4.0" , /* main_class=*/ ExamplePlugin)
6+ ENDSTONE_PLUGIN (/* name=*/ " cpp_example " , /* version=*/ " 0.4.0" , /* main_class=*/ ExamplePlugin)
77{
88 prefix = " CppExamplePlugin" ;
99 description = " C++ example plugin for Endstone servers" ;
You can’t perform that action at this time.
0 commit comments