Fixes as to make including AngelScript actually possible.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-01-09 19:03:38 +01:00
parent c8f85a8556
commit 497acc1311
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
3 changed files with 8 additions and 5 deletions

View File

@ -81,6 +81,7 @@ endif (WINDOWS)
target_link_libraries(pkmnLib PUBLIC ${_LINKS}) target_link_libraries(pkmnLib PUBLIC ${_LINKS})
if (SCRIPT_PROVIDER STREQUAL "angelscript") if (SCRIPT_PROVIDER STREQUAL "angelscript")
SET(GCC_COVERAGE_COMPILE_FLAGS "-fno-strict-aliasing")
target_link_libraries(pkmnLib-angelscript PUBLIC ${_LINKS}) target_link_libraries(pkmnLib-angelscript PUBLIC ${_LINKS})
endif() endif()

View File

@ -21,12 +21,9 @@ class PkmnLibConan(ConanFile):
cmake.configure() cmake.configure()
cmake.build() cmake.build()
# Explicit way:
# self.run('cmake "%s/src" %s' % (self.source_folder, cmake.command_line))
# self.run("cmake --build . %s" % cmake.build_config)
def package(self): def package(self):
self.copy("*.hpp", dst="include", src="src") self.copy("*.hpp", dst="include", src="src")
self.copy("*.h", dst="include", src="src")
self.copy("*.lib", dst="lib", keep_path=False) self.copy("*.lib", dst="lib", keep_path=False)
self.copy("*.dll", dst="bin", keep_path=False) self.copy("*.dll", dst="bin", keep_path=False)
self.copy("*.dylib*", dst="lib", keep_path=False) self.copy("*.dylib*", dst="lib", keep_path=False)

View File

@ -1,8 +1,13 @@
#include "../Battling/Library/PokemonScriptResolver.hpp" #include "../Battling/Library/PokemonScriptResolver.hpp"
#define ANGELSCRIPT_DLL_LIBRARY_IMPORT
#define GetPropertyCache
#undef GetProperty
#include <angelscript.h>
#define GetProperty GetPropertyCache
using namespace PkmnLib::Battling; using namespace PkmnLib::Battling;
void PokemonScriptResolver::Initialize(const PkmnLib::Battling::BattleLibrary* library){ void PokemonScriptResolver::Initialize(const PkmnLib::Battling::BattleLibrary* library){
} }
CreatureLib::Battling::Script* PokemonScriptResolver::LoadScript(ScriptCategory category, const std::string& scriptName){ CreatureLib::Battling::Script* PokemonScriptResolver::LoadScript(ScriptCategory category, const std::string& scriptName){