Skip to content

Add ability to disable installation via ZYDIS_INSTALL #565

@StackOverflowExcept1on

Description

@StackOverflowExcept1on

https://github.com/StackOverflowExcept1on/funchook/blob/908b05224361a5ad0fe346c8277adb3ddb232205/CMakeLists.txt#L129-L147

I'm using Zydis v4.1.1 and trying to build my project like this:

cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ...
cmake --build . --config Release --target INSTALL

However, this results in "Maybe need administrative privileges" error:

PostBuildEvent:
  setlocal
  "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
  if %errorlevel% neq 0 goto :cmEnd
  :cmEnd
  endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  :cmErrorLevel
  exit /b %1
  :cmDone
  if %errorlevel% neq 0 goto :VCEnd
  :VCEnd
  -- Install configuration: "Release"
  CMake Error at _deps/zydis-build/cmake_install.cmake:36 (file):
    file cannot create directory: C:/Program Files
    (x86)/library/lib/cmake/zydis.  Maybe need administrative privileges.
  Call Stack (most recent call first):
    _deps/funchook-build/cmake_install.cmake:37 (include)
    cmake_install.cmake:37 (include)

I am also using latest version of cmake (4.0.0):

CMake Deprecation Warning at build/_deps/zydis-src/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Deprecation Warning at build/_deps/zydis-src/dependencies/zycore/CMakeLists.txt:5 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-buildArea: Build system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions