From 7c9b945386af0e38de34825bc97c768787c2df12 Mon Sep 17 00:00:00 2001 From: Lysann Tranvouez Date: Wed, 1 Oct 2025 23:07:06 +0200 Subject: [PATCH] reorganize cmakelists --- CMakeLists.txt | 17 +++-------------- sample/CMakeLists.txt | 6 ++++++ tests/CMakeLists.txt | 6 ++++++ 3 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 sample/CMakeLists.txt create mode 100644 tests/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b53caf..f203ba0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,18 +21,7 @@ target_include_directories(mach_detours PRIVATE src ) - -add_executable(mach_detours_sample - sample/main.c -) -target_link_libraries(mach_detours_sample - PRIVATE mach_detours -) - - add_subdirectory(lib/catch2) -add_executable(mach_detours_tests - tests/test.cpp) -target_link_libraries(mach_detours_tests - PRIVATE Catch2::Catch2WithMain mach_detours -) + +add_subdirectory(sample) +add_subdirectory(tests) diff --git a/sample/CMakeLists.txt b/sample/CMakeLists.txt new file mode 100644 index 0000000..88e2f30 --- /dev/null +++ b/sample/CMakeLists.txt @@ -0,0 +1,6 @@ +add_executable(mach_detours_sample + main.c +) +target_link_libraries(mach_detours_sample + PRIVATE mach_detours +) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..d216ff3 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,6 @@ +add_executable(mach_detours_tests + test.cpp) + +target_link_libraries(mach_detours_tests + PRIVATE Catch2::Catch2WithMain mach_detours +) \ No newline at end of file