mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 08:36:16 +00:00
[NFC] Cleanup project structure a bit (#93)
This commit is contained in:
@@ -51,7 +51,7 @@ momo_add_subdirectory_and_get_targets("src" OWN_TARGETS)
|
||||
|
||||
##########################################
|
||||
|
||||
momo_targets_set_folder("External Dependencies" ${EXTERNAL_TARGETS})
|
||||
momo_targets_set_folder("dependencies" ${EXTERNAL_TARGETS})
|
||||
|
||||
momo_targets_exclude_from_all(${EXTERNAL_TARGETS})
|
||||
momo_targets_disable_warnings(${EXTERNAL_TARGETS})
|
||||
|
||||
@@ -3,14 +3,18 @@ add_subdirectory(emulator)
|
||||
add_subdirectory(gdb-stub)
|
||||
add_subdirectory(unicorn-emulator)
|
||||
add_subdirectory(windows-emulator)
|
||||
add_subdirectory(windows-gdb-stub)
|
||||
|
||||
if (NOT MOMO_BUILD_AS_LIBRARY)
|
||||
add_subdirectory(analyzer)
|
||||
add_subdirectory(fuzzing-engine)
|
||||
add_subdirectory(fuzzer)
|
||||
if(WIN32)
|
||||
add_subdirectory(bad-sample)
|
||||
add_subdirectory(test-sample)
|
||||
endif()
|
||||
add_subdirectory(windows-emulator-test)
|
||||
add_subdirectory(tools)
|
||||
if(WIN32)
|
||||
momo_add_subdirectory_and_get_targets("tools" TOOL_TARGETS)
|
||||
momo_targets_set_folder("tools" ${TOOL_TARGETS})
|
||||
|
||||
momo_add_subdirectory_and_get_targets("samples" SAMPLE_TARGETS)
|
||||
momo_targets_set_folder("samples" ${SAMPLE_TARGETS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -15,7 +15,7 @@ target_precompile_headers(analyzer PRIVATE std_include.hpp)
|
||||
target_link_libraries(analyzer PRIVATE
|
||||
reflect
|
||||
windows-emulator
|
||||
gdb-stub
|
||||
windows-gdb-stub
|
||||
)
|
||||
|
||||
set_property(GLOBAL PROPERTY VS_STARTUP_PROJECT analyzer)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "std_include.hpp"
|
||||
|
||||
#include <windows_emulator.hpp>
|
||||
#include <debugging/win_x64_gdb_stub_handler.hpp>
|
||||
#include <win_x64_gdb_stub_handler.hpp>
|
||||
|
||||
#include "object_watching.hpp"
|
||||
|
||||
|
||||
@@ -8,6 +8,4 @@ list(SORT SRC_FILES)
|
||||
|
||||
add_library(emulator ${SRC_FILES})
|
||||
|
||||
target_include_directories(emulator INTERFACE
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
target_include_directories(emulator INTERFACE "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
@@ -14,8 +14,6 @@ target_link_libraries(fuzzing-engine PRIVATE
|
||||
emulator-common
|
||||
)
|
||||
|
||||
target_include_directories(fuzzing-engine INTERFACE
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
target_include_directories(fuzzing-engine INTERFACE "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
momo_strip_target(fuzzing-engine)
|
||||
|
||||
@@ -10,12 +10,10 @@ add_library(gdb-stub ${SRC_FILES})
|
||||
|
||||
momo_assign_source_group(${SRC_FILES})
|
||||
|
||||
target_link_libraries(gdb-stub PRIVATE
|
||||
target_link_libraries(gdb-stub PUBLIC
|
||||
emulator-common
|
||||
)
|
||||
|
||||
target_include_directories(gdb-stub INTERFACE
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
target_include_directories(gdb-stub INTERFACE "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
momo_strip_target(gdb-stub)
|
||||
|
||||
2
src/samples/CMakeLists.txt
Normal file
2
src/samples/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
add_subdirectory(bad-sample)
|
||||
add_subdirectory(test-sample)
|
||||
@@ -1,4 +1 @@
|
||||
if(WIN32)
|
||||
add_subdirectory(dump-apiset)
|
||||
endif()
|
||||
|
||||
add_subdirectory(dump-apiset)
|
||||
|
||||
@@ -12,9 +12,7 @@ else()
|
||||
add_library(unicorn-emulator SHARED ${SRC_FILES})
|
||||
endif()
|
||||
|
||||
target_include_directories(unicorn-emulator INTERFACE
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
target_include_directories(unicorn-emulator INTERFACE "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
target_link_libraries(unicorn-emulator PUBLIC emulator)
|
||||
target_link_libraries(unicorn-emulator PRIVATE unicorn emulator-common)
|
||||
|
||||
@@ -21,4 +21,6 @@ endif()
|
||||
|
||||
add_test(NAME windows-emulator-test
|
||||
COMMAND windows-emulator-test
|
||||
WORKING_DIRECTORY "$<TARGET_FILE_DIR:windows-emulator-test>")
|
||||
WORKING_DIRECTORY "$<TARGET_FILE_DIR:windows-emulator-test>")
|
||||
|
||||
momo_targets_set_folder("tests" windows-emulator-test)
|
||||
@@ -21,8 +21,6 @@ target_link_libraries(windows-emulator PUBLIC
|
||||
emulator
|
||||
)
|
||||
|
||||
target_include_directories(windows-emulator INTERFACE
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
target_include_directories(windows-emulator INTERFACE "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
momo_strip_target(windows-emulator)
|
||||
|
||||
20
src/windows-gdb-stub/CMakeLists.txt
Normal file
20
src/windows-gdb-stub/CMakeLists.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
file(GLOB_RECURSE SRC_FILES CONFIGURE_DEPENDS
|
||||
*.cpp
|
||||
*.hpp
|
||||
*.rc
|
||||
)
|
||||
|
||||
list(SORT SRC_FILES)
|
||||
|
||||
add_library(windows-gdb-stub ${SRC_FILES})
|
||||
|
||||
momo_assign_source_group(${SRC_FILES})
|
||||
|
||||
target_link_libraries(windows-gdb-stub PUBLIC
|
||||
gdb-stub
|
||||
windows-emulator
|
||||
)
|
||||
|
||||
target_include_directories(windows-gdb-stub INTERFACE "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
momo_strip_target(windows-gdb-stub)
|
||||
0
src/windows-gdb-stub/empty.cpp
Normal file
0
src/windows-gdb-stub/empty.cpp
Normal file
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "x64_gdb_stub_handler.hpp"
|
||||
|
||||
#include "../windows_emulator.hpp"
|
||||
#include <windows_emulator.hpp>
|
||||
|
||||
class win_x64_gdb_stub_handler : public x64_gdb_stub_handler
|
||||
{
|
||||
@@ -1,10 +1,9 @@
|
||||
#pragma once
|
||||
#include <gdb_stub.hpp>
|
||||
#include <scoped_hook.hpp>
|
||||
#include <x64_emulator.hpp>
|
||||
|
||||
#include <utils/concurrency.hpp>
|
||||
#include <gdb-stub/gdb_stub.hpp>
|
||||
|
||||
#include "scoped_hook.hpp"
|
||||
|
||||
#include "x64_register_mapping.hpp"
|
||||
#include "x64_target_descriptions.hpp"
|
||||
Reference in New Issue
Block a user