Skip to content

Commit

Permalink
fix: compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Apr 30, 2024
1 parent cefb73d commit 9f93e35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(endstone)

if (MSVC)
add_compile_definitions(_ITERATOR_DEBUG_LEVEL=0)
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -fPIC")
link_libraries(-static-libgcc -static-libstdc++ libc++.a libc++abi.a)
endif ()

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

0 comments on commit 9f93e35

Please sign in to comment.