Hello everyone. When I try to run my cmake, I get an error message (it started after I decided to reinstall my system, the same cmake used to work without any problems (I tried Googling, but I didn’t find anything sane except the advice “include(FetchContent)”))
It’s my code(It is fully operational…)
cmake_minimum_required(VERSION 3.15)
include(FetchContent)
project("DynamicRetDec")
FetchContent_Declare(
Zydis
GIT_REPOSITORY https://github.com/zyantific/zydis.git
GIT_TAG master
)
set(ZYDIS_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
set(ZYDIS_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(Zydis)
FetchContent_Declare(
unicorn
GIT_REPOSITORY https://github.com/unicorn-engine/unicorn.git
GIT_TAG master
)
FetchContent_MakeAvailable(unicorn)
# Add our project executable
add_executable(${PROJECT_NAME}
"src/dynamic-retdec-decompiler/Emu.cpp"
"src/dynamic-retdec-decompiler/Emu.hpp"
"src/dynamic-retdec-decompiler/Dynamic-retdec-decompiler.cpp"
"src/dynamic-retdec-decompiler/PeLoaderEmu/Work with PE file.cpp"
"src/dynamic-retdec-decompiler/PeLoaderEmu/Work with DLL.cpp"
"src/dynamic-retdec-decompiler/PeLoaderEmu/PeLoaderEmu.hpp"
"src/dynamic-retdec-decompiler/Hooks/HooksFromEmu.cpp"
"src/dynamic-retdec-decompiler/Hooks/HooksFromEmu.hpp"
"src/dynamic-retdec-decompiler/Hooks/FirstPhase/FirstPhase.cpp"
"src/dynamic-retdec-decompiler/Hooks/FirstPhase/FirstPhase.hpp"
"src/dynamic-retdec-decompiler/z3/z3states.hpp"
"src/dynamic-retdec-decompiler/z3/z3ASMx64Instructions.hpp"
"src/dynamic-retdec-decompiler/z3/z3ASMx64Instructions.cpp")
# Have CMake link our project executable against Zydis.
target_link_libraries(${PROJECT_NAME} PRIVATE Zydis
PRIVATE unicorn)
target_include_directories(${PROJECT_NAME} PRIVATE Zydis PRIVATE unicorn)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
I get this error after trying “cmake …”
D:\Programs\Soft\Coding\C\VisualStudio\Coders\DynamicRetDecWinServ2022\bld2>cmake ..
CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/ExternalProject.cmake:2806 (message):
error: could not find git for clone of zydis-populate
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.26/Modules/ExternalProject.cmake:4208 (_ep_add_download_command)
CMakeLists.txt:23 (ExternalProject_Add)
-- Configuring incomplete, errors occurred!
CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FetchContent.cmake:1610 (message):
CMake step for zydis failed: 1
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.26/Modules/FetchContent.cmake:1762:EVAL:2 (__FetchContent_directPopulate)
C:/Program Files/CMake/share/cmake-3.26/Modules/FetchContent.cmake:1762 (cmake_language)
C:/Program Files/CMake/share/cmake-3.26/Modules/FetchContent.cmake:1976 (FetchContent_Populate)
CMakeLists.txt:12 (FetchContent_MakeAvailable)
-- Configuring incomplete, errors occurred!