Skip to content

Commit

Permalink
Include new wrapper files in test CmakeLists file
Browse files Browse the repository at this point in the history
  • Loading branch information
MohitMaliDeveloper committed Mar 3, 2023
1 parent f4b5d7a commit 58516a2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
4 changes: 2 additions & 2 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ android {
defaultConfig {

minSdk 33
targetSdk 32
targetSdk 33
versionCode 1
versionName "1.0"

Expand Down Expand Up @@ -272,7 +272,7 @@ task copyBuildKiwixSoFile(type: Copy) {
}

task createCodeCoverageReport(type: Exec) {
workingDir "${projectDir}/src/androidTests/java/org/kiwix/kiwixlib/"
workingDir "${projectDir}/src/test/"
commandLine 'sh', '-c', "bash 'compile_and_run_test.sh' ${buildDir}/libs/*app*.jar $buildDir"
}

Expand Down
44 changes: 28 additions & 16 deletions lib/src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,30 @@ cmake_minimum_required (VERSION 3.16)
project (buildkiwix)

add_library(buildkiwix
SHARED
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/base64.cpp
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/book.cpp
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/filter.cpp
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/kiwixicu.cpp
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/kiwixreader.cpp
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/kiwixsearcher.cpp
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/kiwixserver.cpp
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/library.cpp
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/manager.cpp
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/utils.h
SHARED
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/book.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/bookmark.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/filter.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/illustration.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/kiwixicu.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/kiwixserver.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/library.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libkiwix/manager.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/archive.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/blob.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/entry.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/entry_iterator.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/item.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/query.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/search.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/search_iterator.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/searcher.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/suggestion_item.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/suggestion_iterator.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/suggestion_search.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/libzim/suggestion_searcher.cpp
${PROJECT_SOURCE_DIR}/../main/cpp/utils.h
${PROJECT_SOURCE_DIR}/../main/cpp/wrapper.cpp
)

find_package(JNI)
Expand All @@ -25,11 +38,10 @@ endif()
include_directories(
/opt/hostedtoolcache/jdk/11.0.17/x64/include
/opt/hostedtoolcache/jdk/11.0.17/x64/include/linux
${CMAKE_SOURCE_DIR}/../../../../../main/cpp
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/include/libkiwix
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/include/libzim
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/include/javah_generated
${CMAKE_SOURCE_DIR}/../../../../../main/cpp/include/utils
${PROJECT_SOURCE_DIR}/../main/cpp
${PROJECT_SOURCE_DIR}/../../build/include/libkiwix
${PROJECT_SOURCE_DIR}/../../build/include/libzim
${PROJECT_SOURCE_DIR}/../../build/include/javah_generated
)

target_link_libraries(buildkiwix
Expand Down

0 comments on commit 58516a2

Please sign in to comment.