reorganize files and add missing includes
This commit is contained in:
parent
d80ec89490
commit
21cd133480
5 changed files with 13 additions and 4 deletions
|
|
@ -4,8 +4,13 @@ project(mach_detours C)
|
||||||
set(CMAKE_C_STANDARD 23)
|
set(CMAKE_C_STANDARD 23)
|
||||||
|
|
||||||
add_library(mach_detours SHARED
|
add_library(mach_detours SHARED
|
||||||
mach_detours.c
|
include/mach_detours.h
|
||||||
mach_detours.h
|
|
||||||
arm64/detours_arm64.h
|
src/mach_detours.c
|
||||||
detours_internal.h
|
src/detours_internal.h
|
||||||
|
src/arm64/detours_arm64.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(mach_detours
|
||||||
|
PUBLIC "include"
|
||||||
|
PRIVATE "src")
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
#ifndef MACH_DETOURS_ARM64_H
|
#ifndef MACH_DETOURS_ARM64_H
|
||||||
#define MACH_DETOURS_ARM64_H
|
#define MACH_DETOURS_ARM64_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef struct detour_align
|
typedef struct detour_align
|
||||||
{
|
{
|
||||||
uint8_t obTarget;
|
uint8_t obTarget;
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
#define DETOUR_TRACE(x) printf x
|
#define DETOUR_TRACE(x) printf x
|
||||||
#define DETOUR_BREAK() raise(SIGTRAP)
|
#define DETOUR_BREAK() raise(SIGTRAP)
|
||||||
#else
|
#else
|
||||||
|
#include <signal.h>
|
||||||
|
#include <stdio.h>
|
||||||
#define DETOUR_TRACE(x)
|
#define DETOUR_TRACE(x)
|
||||||
#define DETOUR_BREAK()
|
#define DETOUR_BREAK()
|
||||||
#endif
|
#endif
|
||||||
Loading…
Add table
Add a link
Reference in a new issue