Skip to content

Commit

Permalink
small fixes to make android jni library on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman authored and Roman committed Dec 23, 2016
1 parent 81e388d commit f3ac436
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Expand Up @@ -217,7 +217,7 @@ def configure(env):
if env["PLATFORM"]=="win32":
env.AppendUnique(LIBS="kernel32")
conf.Finish()
src_subdirs=["third-party","core","lib","utils"]
src_subdirs=["third-party","core","lib","utils","jni"]
if env["audio_libs"]:
src_subdirs.append("audio")
src_subdirs.append("test")
Expand Down
13 changes: 13 additions & 0 deletions src/android/RHVoice-core/src/main/jni/SConscript
@@ -0,0 +1,13 @@
import os.path

Import("env","libRHVoice_core")
local_env=env.Clone()
local_env["CPPPATH"].append("/usr/lib/jvm/jdk1.8.0_60/include")
local_env["CPPPATH"].append("/usr/lib/jvm/jdk1.8.0_60/include/linux")
local_env["libversion"]="1.0.0"
local_env["liblevel"]=2
local_env.Prepend(LIBS=libRHVoice_core)
src=["native.cpp"]
native=local_env.BuildLibrary("jni",src)
if env["PLATFORM"]!="win32":
local_env.InstallLibrary(native)
2 changes: 1 addition & 1 deletion src/android/RHVoice-core/src/main/jni/native.cpp
Expand Up @@ -432,7 +432,7 @@ JNIEXPORT void JNICALL Java_com_github_olga_1yakovleva_rhvoice_TTSEngine_onInit
params.resource_paths.push_back(jstring_to_string(env,static_cast<jstring>(jstr)));
}
}
params.logger=smart_ptr<event_logger>(new java_logger_wrapper(env,logger));
//params.logger=smart_ptr<event_logger>(new java_logger_wrapper(env,logger));
data->engine_ptr=engine::create(params);
if(data->engine_ptr->get_voices().empty())
throw no_voices();
Expand Down
1 change: 1 addition & 0 deletions src/jni

0 comments on commit f3ac436

Please sign in to comment.