Skip to content

Commit

Permalink
cstool: compile with CMake using CMakeLists.txt in root dir
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Oct 11, 2016
1 parent 4834cd2 commit ae02bf1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -389,4 +389,9 @@ if (CAPSTONE_BUILD_SHARED)
ARCHIVE DESTINATION lib)
endif ()

add_subdirectory(cstool)
if (CAPSTONE_BUILD_SHARED)
add_executable(cstool "cstool/cstool.c")
target_link_libraries(cstool ${default-target})

install(TARGETS cstool DESTINATION bin)
endif ()
14 changes: 0 additions & 14 deletions cstool/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion cstool/cstool.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static uint8_t *preprocess(char *code, size_t *size)

static void usage(char *prog)
{
printf("Cstool v%s for Capstone Disassembler Engine (www.capstone-engine.org)\n", VERSION);
printf("Cstool v%s for Capstone Disassembler Engine (www.capstone-engine.org)\n\n", VERSION);
printf("Syntax: %s <arch+mode> <assembly-hexstring> [start-address-in-hex-format]\n", prog);
printf("\nThe following <arch+mode> options are supported:\n");

Expand Down

0 comments on commit ae02bf1

Please sign in to comment.