Skip to content

Commit

Permalink
add instructions how to to use AndroidNdkGdb.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Rojtberg committed Jun 11, 2014
1 parent cfe63d3 commit 3ce330b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion AndroidNdkGdb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

# ------------------------------------------------------------------------------
# Usage:
# 1. place AndroidNdkGdb.cmake somewhere inside ${CMAKE_MODULE_PATH}
# 2. inside your project add
#
# include(AndroidNdkGdb)
# android_ndk_gdb_enable()
# # for each target
# add_library(MyLibrary ...)
# android_ndk_gdb_debuggable(MyLibrary)


# add gdbserver and general gdb configuration to project
# also create a mininal NDK skeleton so ndk-gdb finds the paths
macro(android_ndk_gdb_enable)
Expand Down Expand Up @@ -72,4 +84,4 @@ macro(android_ndk_gdb_debuggable TARGET_NAME)
# 5. strip symbols
add_custom_command(TARGET NDK_GDB POST_BUILD COMMAND ${CMAKE_STRIP} ${TARGET_LOCATION})
endif()
endmacro()
endmacro()

0 comments on commit 3ce330b

Please sign in to comment.