alexbatalov / fallout2-re

Reverse engineered Fallout 2
Other
324 stars 34 forks source link

How to build a project on MSVC 2022? #51

Closed JordanCpp closed 1 year ago

JordanCpp commented 2 years ago

Greetings.

Please write instructions for compiling the project.

FetchContent_Declare(zlib GIT_REPOSITORY "https://github.com/madler/zlib" GIT_TAG "v1.2.11" )

This does not work.

c6-dev commented 2 years ago

I was able to build the project using cmake integrated into VS2022 by changing "generator" field in CMakeSettings.json to "Visual Studio 17 2022" for both configurations, everything else worked right away.

Lexx2k commented 2 years ago

As a side note, after every commit a new build is generated and can be downloaded here. So unless someone wants to actually write their own code, it's not necessary to compile the files manually.

JanSimek commented 2 years ago

@JordanCpp do you have git installed and is it in your PATH system variable? If not you will get an error message like this.

1> [CMake] CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/ExternalProject.cmake:2666 (message):
1> [CMake]   error: could not find git for clone of fpattern-populate
1> [CMake] Call Stack (most recent call first):
1> [CMake]   C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/ExternalProject.cmake:3716 (_ep_add_download_command)
1> [CMake]   CMakeLists.txt:23 (ExternalProject_Add)
1> [CMake] -- Configuring incomplete, errors occurred!

If that's not the issue you should post the actual error message you get.

JordanCpp commented 2 years ago

@JanSimek

installed git.

Серьезность Код Описание Проект Файл Строка Состояние подавления Ошибка CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.21/Modules/FetchContent.cmake:1058 (__FetchContent_getSavedDetails): Unknown CMake command "__FetchContent_getSavedDetails". CrossCompileExample C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.21/Modules/FetchContent.cmake 1058

FetchContent.cmake __FetchContent_getSavedDetails(${contentName} contentDetails) if("${contentDetails}" STREQUAL "") message(FATAL_ERROR "No details have been set for content: ${contentName}") endif()

alexbatalov commented 2 years ago

Apparently you don't have git installed. Open up Visual Studio Installer, click Modify, on the Individual components tab find Git for Windows. Also you'll probably need to switch to Ninja in CMakeSettings.json.