MaKiPL / FF8_demaster

Unofficial Final Fantasy VIII Remastered core mod based on import-dependency DLL that updates the gamecode and fixes issues left by developers
https://makipl.github.io/FF8_demaster/
GNU General Public License v3.0
101 stars 9 forks source link

Create CMAKELISTS.TXT #35

Closed Sebanisu closed 3 years ago

Sebanisu commented 3 years ago

This is currently working though I haven't fully tested it. I copied it over to FF8Remaster's folder and it loaded Mcindus's Field backgrounds. Example with nmake. (not compatible with csharp, this also allows me to work in clion instead of visual studio.)

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat
mkdir build
cmake -G "CodeBlocks - NMake Makefiles" -B build
cmake --build build --target all

Example with msbuild. (maybe able to build csharp via msbuild/cmake as well)

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat
mkdir build
cmake -G "Visual Studio 16 2019" -A Win32 -B build
MSBuild build\ALL_BUILD.vcxproj

Cmake has pluses and minuses. It's kinda become the defacto standard for C++ development.

Cmake has limited support of Csharp while using it with Visual Studio only. We could always dump the zzz files with c++ too. I have code for it and so does myst6re.

One thing we might wanna do is dynamically grab the 3rd party libraries from github. Cmake has built in tools for that. Instead of keeping static .lib files in the repo. What would happen cmake would go grab the code and you would decide how you want to build or link it.

I also asked @julianxhokaxhiu if he wanted to take a look, because at the time I was stumped with linker errors. Few hours later I got things to work. It's really damn picky. Ya gotta have everything just right to compile as it is. So he might come up with some improvements to this.

I copied over my .clang-format and .cmake-format.yaml, though I haven't formatted anything yet. Formatting seems overall fine.

Sebanisu commented 3 years ago

the cmake lists.txt mostly works. Though it's not really needed. was more of a logical exercise. :)