Fixes Windows build
This commit is contained in:
parent
2e9248ff18
commit
71d77350d5
|
@ -37,8 +37,6 @@ include_directories(${Angelscript_SOURCE_DIR}/angelscript/include)
|
|||
include_directories(${Angelscript_SOURCE_DIR}/add_on)
|
||||
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||
include_directories(${PkmnLib_BINARY_DIR}/include/)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options(-fconcepts)
|
||||
|
@ -48,11 +46,21 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|||
add_link_options(-fuse-ld=lld)
|
||||
endif ()
|
||||
|
||||
|
||||
file(GLOB_RECURSE SRC_FILES src/*.cpp src/*.hpp extern/AngelscriptDebugger/src/*.cpp)
|
||||
set(SRC_FILES_PATTERN src/*.cpp src/*.hpp)
|
||||
if (NOT WINDOWS)
|
||||
set(SRC_FILES_PATTERN ${SRC_FILES_PATTERN} extern/AngelscriptDebugger/src/*.cpp)
|
||||
endif()
|
||||
file(GLOB_RECURSE SRC_FILES ${SRC_FILES_PATTERN})
|
||||
add_executable(PokemonScriptTester ${SRC_FILES})
|
||||
|
||||
target_include_directories(PokemonScriptTester PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||
target_include_directories(PokemonScriptTester PUBLIC ${PkmnLib_BINARY_DIR}/include/)
|
||||
target_link_directories(PokemonScriptTester PUBLIC ${Angelscript_BINARY_DIR})
|
||||
|
||||
add_definitions(-DLEVEL_U8)
|
||||
if (NOT WINDOWS)
|
||||
ADD_DEFINITIONS(-DANGELSCRIPT_DEBUGGER)
|
||||
endif()
|
||||
|
||||
SET(_LINKS -static pkmnLib Arbutils)
|
||||
|
||||
|
|
|
@ -34,9 +34,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
i32 RunAll(bool waitForDebugger) {
|
||||
i32 RunAll([[maybe_unused]]bool waitForDebugger) {
|
||||
auto ctx = _scriptResolver->GetContextPool()->RequestContext();
|
||||
ctx->SetUserData(_scriptResolver->GetUserdata());
|
||||
#if ANGELSCRIPT_DEBUGGER
|
||||
_scriptResolver->SetDebugger(new AngelscriptDebugger());
|
||||
auto& debugger = *_scriptResolver->GetDebugger().GetValue();
|
||||
debugger.Run(8684);
|
||||
|
@ -48,6 +49,7 @@ public:
|
|||
}
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
}
|
||||
#endif
|
||||
|
||||
for (auto& test : _tests) {
|
||||
test.second->Run(ctx);
|
||||
|
|
Loading…
Reference in New Issue