2021-01-22 17:01:39 +00:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
2021-01-22 21:44:45 +00:00
|
|
|
# Change this to the name of your plugin #
|
2021-01-22 17:01:39 +00:00
|
|
|
project(builtin)
|
|
|
|
|
2021-01-22 21:44:45 +00:00
|
|
|
# Add your source files here #
|
|
|
|
add_library(${PROJECT_NAME} SHARED
|
2021-01-22 17:01:39 +00:00
|
|
|
source/plugin_builtin.cpp
|
|
|
|
|
|
|
|
source/content/command_palette_commands.cpp
|
|
|
|
source/content/data_inspector.cpp
|
2021-09-08 13:18:24 +00:00
|
|
|
source/content/pl_builtin_functions.cpp
|
2022-04-17 14:57:30 +00:00
|
|
|
source/content/pl_pragmas.cpp
|
2021-01-22 17:01:39 +00:00
|
|
|
source/content/settings_entries.cpp
|
|
|
|
source/content/tools_entries.cpp
|
2021-01-30 21:39:06 +00:00
|
|
|
source/content/data_processor_nodes.cpp
|
2021-08-20 22:52:11 +00:00
|
|
|
source/content/ui_items.cpp
|
2021-12-07 21:47:41 +00:00
|
|
|
source/content/providers.cpp
|
|
|
|
source/content/views.cpp
|
2022-01-12 23:27:31 +00:00
|
|
|
source/content/data_formatters.cpp
|
2022-01-17 23:10:10 +00:00
|
|
|
source/content/layouts.cpp
|
|
|
|
source/content/main_menu_items.cpp
|
2022-02-01 17:09:40 +00:00
|
|
|
source/content/welcome_screen.cpp
|
2022-05-27 18:42:07 +00:00
|
|
|
source/content/data_visualizers.cpp
|
|
|
|
source/content/events.cpp
|
2022-05-30 14:36:46 +00:00
|
|
|
source/content/hashes.cpp
|
2022-07-30 20:01:49 +00:00
|
|
|
source/content/shortcuts.cpp
|
2022-11-25 09:47:11 +00:00
|
|
|
source/content/global_actions.cpp
|
2022-12-29 18:26:00 +00:00
|
|
|
source/content/themes.cpp
|
2021-12-07 21:47:41 +00:00
|
|
|
|
|
|
|
source/content/providers/file_provider.cpp
|
|
|
|
source/content/providers/gdb_provider.cpp
|
2021-12-11 23:42:12 +00:00
|
|
|
source/content/providers/disk_provider.cpp
|
2022-08-12 13:11:27 +00:00
|
|
|
source/content/providers/intel_hex_provider.cpp
|
|
|
|
source/content/providers/motorola_srec_provider.cpp
|
2022-10-21 10:01:28 +00:00
|
|
|
source/content/providers/memory_file_provider.cpp
|
2021-12-07 21:47:41 +00:00
|
|
|
|
2022-02-06 20:02:31 +00:00
|
|
|
source/content/views/view_hex_editor.cpp
|
2021-12-07 21:47:41 +00:00
|
|
|
source/content/views/view_pattern_editor.cpp
|
|
|
|
source/content/views/view_pattern_data.cpp
|
|
|
|
source/content/views/view_hashes.cpp
|
|
|
|
source/content/views/view_information.cpp
|
2022-03-04 18:06:29 +00:00
|
|
|
source/content/views/view_about.cpp
|
2021-12-07 21:47:41 +00:00
|
|
|
source/content/views/view_tools.cpp
|
|
|
|
source/content/views/view_data_inspector.cpp
|
|
|
|
source/content/views/view_disassembler.cpp
|
|
|
|
source/content/views/view_bookmarks.cpp
|
|
|
|
source/content/views/view_patches.cpp
|
|
|
|
source/content/views/view_command_palette.cpp
|
|
|
|
source/content/views/view_settings.cpp
|
|
|
|
source/content/views/view_data_processor.cpp
|
|
|
|
source/content/views/view_yara.cpp
|
|
|
|
source/content/views/view_constants.cpp
|
|
|
|
source/content/views/view_store.cpp
|
|
|
|
source/content/views/view_diff.cpp
|
2021-12-11 23:41:44 +00:00
|
|
|
source/content/views/view_provider_settings.cpp
|
2022-07-29 11:59:57 +00:00
|
|
|
source/content/views/view_find.cpp
|
2021-12-07 21:47:41 +00:00
|
|
|
|
2022-09-07 21:11:24 +00:00
|
|
|
source/content/helpers/math_evaluator.cpp
|
2022-11-08 20:43:22 +00:00
|
|
|
|
|
|
|
source/ui/hex_editor.cpp
|
|
|
|
source/ui/pattern_drawer.cpp
|
2021-01-22 17:01:39 +00:00
|
|
|
)
|
|
|
|
|
2021-01-22 21:44:45 +00:00
|
|
|
# Add additional include directories here #
|
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE include)
|
|
|
|
|
2021-12-14 19:16:59 +00:00
|
|
|
# Add additional libraries here #
|
2023-01-04 11:34:38 +00:00
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE libimhex ${FMT_LIBRARIES})
|
2021-01-22 21:44:45 +00:00
|
|
|
|
|
|
|
# ---- No need to change anything from here downwards unless you know what you're doing ---- #
|
|
|
|
|
2023-01-01 00:01:24 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 23)
|
2021-02-07 12:40:47 +00:00
|
|
|
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
|
|
|
set(CMAKE_SHARED_LIBRARY_SUFFIX ".hexplug")
|
2021-01-22 21:44:45 +00:00
|
|
|
|
|
|
|
if (WIN32)
|
2021-04-18 18:24:42 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--allow-multiple-definition -fvisibility=hidden")
|
2021-01-22 21:44:45 +00:00
|
|
|
endif()
|
|
|
|
|
2022-02-02 16:19:50 +00:00
|
|
|
add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}")
|
2022-02-07 14:42:38 +00:00
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
2022-08-05 06:32:08 +00:00
|
|
|
setupCompilerWarnings(${PROJECT_NAME})
|
2022-09-29 08:33:39 +00:00
|
|
|
|
|
|
|
set(LIBROMFS_RESOURCE_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/romfs)
|
|
|
|
set(LIBROMFS_PROJECT_NAME ${PROJECT_NAME})
|
|
|
|
add_subdirectory(../../lib/external/libromfs ${CMAKE_CURRENT_BINARY_DIR}/libromfs)
|
2022-09-29 08:47:34 +00:00
|
|
|
set_target_properties(${LIBROMFS_LIBRARY} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
2022-09-29 08:33:39 +00:00
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${LIBROMFS_LIBRARY})
|