From 9f93e35961cb2c2008dedce5c4367e0423d61cb7 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 30 Apr 2024 11:16:01 +0100 Subject: [PATCH] fix: compilation errors --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 377b6a2..5495c0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)