Skip to content

Commit

Permalink
feat: simplify CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Jul 28, 2024
1 parent 7a7600c commit 4dc6e60
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,4 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(endstone)

add_library(${PROJECT_NAME} SHARED src/example_plugin.cpp)
target_include_directories(${PROJECT_NAME} PUBLIC include)
target_link_libraries(${PROJECT_NAME} PRIVATE endstone::headers)
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "endstone_")

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(${PROJECT_NAME} PRIVATE -stdlib=libc++ -fPIC)
target_link_libraries(${PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++ libc++.a libc++abi.a)
endif ()
endstone_add_plugin(${PROJECT_NAME} src/example_plugin.cpp)

0 comments on commit 4dc6e60

Please sign in to comment.