1
0
mirror of synced 2024-11-24 15:50:16 +01:00
ImHex/CMakeLists.txt

76 lines
2.3 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.16)
2021-01-22 23:27:01 +01:00
# Updating the version here will update it throughout ImHex as well
2021-01-11 09:56:09 +01:00
project(imhex VERSION 1.6.1)
2021-01-22 23:27:01 +01:00
set(CMAKE_CXX_STANDARD 20)
2021-01-22 23:33:13 +01:00
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
2021-01-22 23:27:01 +01:00
include("${CMAKE_SOURCE_DIR}/cmake/build_helpers.cmake")
setDefaultBuiltTypeIfUnset()
2021-01-22 23:27:01 +01:00
# List plugin names here. Project name must match folder name
set(PLUGINS
example
builtin
)
2021-01-22 23:27:01 +01:00
# List extra magic databases to compile here
set(MAGICDBS
magic_dbs/nintendo_magic
2021-01-22 23:27:01 +01:00
)
2021-01-22 23:27:01 +01:00
findLibraries()
detectOS()
detectArch()
2021-01-22 23:27:01 +01:00
# Add bundled dependencies
add_subdirectory(external/llvm)
add_subdirectory(plugins/libimhex)
2021-01-12 16:50:15 +01:00
# Add include directories
include_directories(include ${MBEDTLS_INCLUDE_DIRS} ${CAPSTONE_INCLUDE_DIRS} ${MAGIC_INCLUDE_DIRS} ${Python_INCLUDE_DIRS})
2021-01-22 23:27:01 +01:00
addVersionDefines()
configurePackageCreation()
add_executable(imhex ${application_type}
source/main.cpp
source/window.cpp
source/helpers/patches.cpp
2020-11-30 00:03:12 +01:00
source/helpers/project_file_handler.cpp
2020-12-01 02:21:40 +01:00
source/helpers/loader_script_handler.cpp
source/helpers/plugin_handler.cpp
source/providers/file_provider.cpp
2020-11-10 21:31:04 +01:00
source/views/view_hexeditor.cpp
source/views/view_pattern.cpp
source/views/view_pattern_data.cpp
source/views/view_hashes.cpp
source/views/view_information.cpp
2020-11-14 21:16:03 +01:00
source/views/view_help.cpp
2020-11-15 00:46:38 +01:00
source/views/view_tools.cpp
2020-11-15 01:42:43 +01:00
source/views/view_strings.cpp
2020-11-21 00:12:58 +01:00
source/views/view_data_inspector.cpp
source/views/view_disassembler.cpp
source/views/view_bookmarks.cpp
2020-11-29 02:06:41 +01:00
source/views/view_patches.cpp
source/views/view_command_palette.cpp
source/views/view_settings.cpp
source/views/view_data_processor.cpp
2020-11-10 21:31:04 +01:00
${imhex_icon}
)
2020-12-21 11:24:27 +01:00
set_target_properties(imhex PROPERTIES CXX_VISIBILITY_PRESET hidden)
2021-02-07 22:57:34 +01:00
target_link_directories(imhex PRIVATE ${CAPSTONE_LIBRARY_DIRS} ${MAGIC_LIBRARY_DIRS})
if (WIN32)
target_link_libraries(imhex libdl.a libmagic.a libgnurx.a libtre.a libintl.a libiconv.a libshlwapi.a libcapstone.a LLVMDemangle libimhex ${Python_LIBRARIES} wsock32 ws2_32)
elseif (UNIX)
2021-02-07 22:57:34 +01:00
target_link_libraries(imhex magic ${CMAKE_DL_LIBS} capstone LLVMDemangle libimhex ${Python_LIBRARIES} dl)
endif()
2020-12-09 19:49:56 +01:00
2021-01-22 23:27:01 +01:00
createPackage()