cstool: compile with CMake using CMakeLists.txt in root dir

test2
Nguyen Anh Quynh 8 years ago
parent 7415467aee
commit 130eb7ef94
  1. 7
      CMakeLists.txt
  2. 14
      cstool/CMakeLists.txt
  3. 2
      cstool/cstool.c

@ -450,4 +450,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 ()

@ -1,14 +0,0 @@
# Cstool for Capstone disassembler engine.
# By Nguyen Anh Quynh, 2016
cmake_minimum_required(VERSION 2.8)
project(cstool)
include_directories("../include")
add_executable(cstool cstool.c)
target_link_libraries(cstool capstone)
install(TARGETS cstool DESTINATION bin)

@ -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");

Loading…
Cancel
Save