Skip to content

Commit

Permalink
Refactor CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
chiteroman committed Sep 3, 2024
1 parent 32270b2 commit f3c2e39
Showing 1 changed file with 37 additions and 15 deletions.
52 changes: 37 additions & 15 deletions app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
cmake_minimum_required(VERSION 3.22.1)

project("playintegrityfix")

find_package(cxx REQUIRED CONFIG)

link_libraries(cxx::cxx)

add_library(${CMAKE_PROJECT_NAME} SHARED main.cpp cJSON/cJSON.c)

target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE cJSON)

target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE log dobby_static)

add_subdirectory(Dobby)
cmake_minimum_required(VERSION 3.22.1)

project("playintegrityfix")

find_package(cxx REQUIRED CONFIG)

if (${ANDROID_ABI} STREQUAL "arm64-v8a")
set(ARCH "arm64")
elseif (${ANDROID_ABI} STREQUAL "armeabi-v7a")
set(ARCH "arm")
endif ()

file(GLOB SHADOWHOOK_SRC
shadowhook/*.c
shadowhook/arch/${ARCH}/*.c
shadowhook/common/*.c
shadowhook/third_party/xdl/*.c
)

add_library(${CMAKE_PROJECT_NAME} SHARED
main.cpp
cJSON/cJSON.c
${SHADOWHOOK_SRC}
)

target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
cJSON
shadowhook/shadowhook/src/main/cpp
shadowhook/arch/${ARCH}
shadowhook/include
shadowhook/common
shadowhook/third_party/bsd
shadowhook/third_party/lss
shadowhook/third_party/xdl
)

target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE log cxx::cxx)

0 comments on commit f3c2e39

Please sign in to comment.