keep up-to-date
This commit is contained in:
parent
d61e0ec7e0
commit
df6ec4036b
2 changed files with 17 additions and 1 deletions
|
@ -16,6 +16,20 @@ elseif(CMAKE_TARGET_OS STREQUAL "linux")
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
|
||||||
|
add_custom_command(OUTPUT "${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp"
|
||||||
|
COMMAND bash ARGS --login "${CMAKE_CURRENT_LIST_DIR}/generate-swig.sh"
|
||||||
|
COMMENT "Generating sources...")
|
||||||
|
else()
|
||||||
|
add_custom_command(OUTPUT "${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp"
|
||||||
|
COMMAND "${CMAKE_CURRENT_LIST_DIR}/generate-swig.sh"
|
||||||
|
COMMENT "Generating sources...")
|
||||||
|
endif()
|
||||||
|
add_custom_target(OsmAndJNI_swig
|
||||||
|
DEPENDS "${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp"
|
||||||
|
)
|
||||||
|
set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp" PROPERTIES GENERATED TRUE)
|
||||||
|
|
||||||
if(CMAKE_SHARED_LIBS_ALLOWED_ON_TARGET)
|
if(CMAKE_SHARED_LIBS_ALLOWED_ON_TARGET)
|
||||||
add_library(OsmAndJNI SHARED
|
add_library(OsmAndJNI SHARED
|
||||||
"c-src/swig.cpp"
|
"c-src/swig.cpp"
|
||||||
|
@ -29,6 +43,9 @@ if(CMAKE_SHARED_LIBS_ALLOWED_ON_TARGET)
|
||||||
"$ENV{JAVA_HOME}/include"
|
"$ENV{JAVA_HOME}/include"
|
||||||
${target_specific_private_includes}
|
${target_specific_private_includes}
|
||||||
)
|
)
|
||||||
|
add_dependencies(OsmAndJNI
|
||||||
|
OsmAndJNI_swig
|
||||||
|
)
|
||||||
|
|
||||||
if(CMAKE_STATIC_LIBS_ALLOWED_ON_TARGET)
|
if(CMAKE_STATIC_LIBS_ALLOWED_ON_TARGET)
|
||||||
add_dependencies(OsmAndJNI
|
add_dependencies(OsmAndJNI
|
||||||
|
|
|
@ -28,7 +28,6 @@ function compile {
|
||||||
"$ROOT_LOC/core/externals/configure.sh" ${OSMAND_ANDROID_EXTERNAL_DEPENDENCIES[*]}
|
"$ROOT_LOC/core/externals/configure.sh" ${OSMAND_ANDROID_EXTERNAL_DEPENDENCIES[*]}
|
||||||
"$ROOT_LOC/core/externals/build.sh" ${OSMAND_ANDROID_EXTERNAL_DEPENDENCIES[*]}
|
"$ROOT_LOC/core/externals/build.sh" ${OSMAND_ANDROID_EXTERNAL_DEPENDENCIES[*]}
|
||||||
"$ROOT_LOC/tools/map-viewer/externals/configure.sh"
|
"$ROOT_LOC/tools/map-viewer/externals/configure.sh"
|
||||||
"$ROOT_LOC/android/OsmAnd-java/generate-swig.sh"
|
|
||||||
if [ ! -d "$ROOT_LOC/amd64-linux-gcc-release.makefile" ]; then
|
if [ ! -d "$ROOT_LOC/amd64-linux-gcc-release.makefile" ]; then
|
||||||
"$ROOT_LOC/build/amd64-linux-gcc.sh" release
|
"$ROOT_LOC/build/amd64-linux-gcc.sh" release
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue