0% found this document useful (0 votes)
11 views1 page

CMake Lists

This document is a CMake configuration file for a project named 'daemon'. It specifies the minimum required CMake version, includes external directories, sets source files, creates a shared library, and defines include directories and linked libraries. Additionally, it includes a conditional block for handling debug symbols if a specific path is defined.

Uploaded by

ys574106
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

CMake Lists

This document is a CMake configuration file for a project named 'daemon'. It specifies the minimum required CMake version, includes external directories, sets source files, creates a shared library, and defines include directories and linked libraries. Additionally, it includes a conditional block for handling debug symbols if a specific path is defined.

Uploaded by

ys574106
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

project(daemon)

cmake_minimum_required(VERSION 3.4.1)

add_subdirectory(${EXTERNAL_ROOT} external)

set(SOURCES
dex2oat.cpp
logcat.cpp
obfuscation.cpp
)

add_library(${PROJECT_NAME} SHARED ${SOURCES})

target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

target_link_libraries(${PROJECT_NAME} PRIVATE lsplant_static dex_builder_static


android log)

if (DEFINED DEBUG_SYMBOLS_PATH)
message(STATUS "Debug symbols will be placed at ${DEBUG_SYMBOLS_PATH}")
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEBUG_SYMBOLS_PATH}/$
{ANDROID_ABI}
COMMAND ${CMAKE_OBJCOPY} --only-keep-debug $<TARGET_FILE:$
{PROJECT_NAME}>
${DEBUG_SYMBOLS_PATH}/${ANDROID_ABI}/${PROJECT_NAME}.debug
COMMAND ${CMAKE_STRIP} --strip-all $<TARGET_FILE:${PROJECT_NAME}>
COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink ${DEBUG_SYMBOLS_PATH}/$
{ANDROID_ABI}/${PROJECT_NAME}.debug
$<TARGET_FILE:${PROJECT_NAME}>)
endif()

You might also like