diff --git a/CMakeLists.txt b/CMakeLists.txt index a4f4400..6cbcfce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ set(INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/includes) # libraries add_subdirectory(${INCLUDES}/ReflectiveDLLInjection) add_subdirectory(${INCLUDES}/log.c) +add_subdirectory(src/utils) include(cmake/JuiceModule.cmake) diff --git a/cmake/JuiceModule.cmake b/cmake/JuiceModule.cmake index 391cca2..7f99f1d 100644 --- a/cmake/JuiceModule.cmake +++ b/cmake/JuiceModule.cmake @@ -23,6 +23,7 @@ function(add_juice_module NAME) ${CMAKE_SOURCE_DIR}/includes/log.c "${CMAKE_SOURCE_DIR}/src/${NAME}/utils" "${CMAKE_SOURCE_DIR}/src/${NAME}/include" + "${CMAKE_SOURCE_DIR}/src/utils" ) # Link common libraries @@ -30,6 +31,7 @@ function(add_juice_module NAME) ReflectiveDLLInjection log.c jvm + utils ) add_subdirectory("${CMAKE_SOURCE_DIR}/src/${NAME}") diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt new file mode 100644 index 0000000..54f894e --- /dev/null +++ b/src/utils/CMakeLists.txt @@ -0,0 +1,6 @@ +# src/utils/CMakeLists.txt + +add_library(utils STATIC + test.c) + +target_include_directories(utils PUBLIC ${CMAKE_CURRENT_LIST_DIR}) \ No newline at end of file diff --git a/src/utils/GlobalUtils.h b/src/utils/GlobalUtils.h new file mode 100644 index 0000000..0bcb082 --- /dev/null +++ b/src/utils/GlobalUtils.h @@ -0,0 +1,8 @@ +#ifndef GLOBALUTILS_H +#define GLOBALUTILS_H + +#include "stdio.h" + +void test(); + +#endif \ No newline at end of file diff --git a/src/utils/test.c b/src/utils/test.c new file mode 100644 index 0000000..fdec43c --- /dev/null +++ b/src/utils/test.c @@ -0,0 +1,5 @@ +#include "GlobalUtils.h" + +void test() { + printf("Hello World!\n"); +} \ No newline at end of file