Jump to content

Recommended Posts

Posted

Hello MaNGOS Community,

 

I am excited at the prospect of joining this project, but first I need to ensure I can compile and debug in VS 2022.  I'm running into a roadblock that I've been unable to figure out on my own.  So, now it's time to ask for help.  :D  I am not familiar with CMake on Windows, but everything seems to be working correctly with the exception of on little hiccup:

CMake build fails with a single error when "Building RC object src\realmd\CMakeFiles\realmd.dir\__\__\cmake\win\VersionInfo.rc.res": "Cannot open include file: 'VersionInfo.h': No such file or directory".  Searching the Git Hub repos of all MaNGOS Core projects does not reveal an include file named "VersionInfo.h".  I was guessing that "VersionInfo.h" would be generated somehow during the guild process.  But that's just the problem: I'm guessing.  Is this include file supposed to be generated during the CMake compile process; perhaps while running "EnsureVersion.cmake"?

Any help would be profoundly appreciated and may even earn this team a dedicated and passionate developer.  Have a blessed day!

 

Best Regards,

Xavian

Posted

Well, I was successful in building Mangos Two in Visual Studio 2022.

After digging through the CMake configuration and banging my head against a nice firm brick wall, I found an inconsistency in .\src\realmd\CMakeLists.txt. "/VersionInfo.h" was appended to ${CMAKE_CURRENT_BINARY_DIR}}.  See below.

target_include_directories(realmd
    PUBLIC
        ${CMAKE_CURRENT_SOURCE_DIR}
        ${CMAKE_CURRENT_BINARY_DIR}}/VersionInfo.h
        ${OPENSSL_INCLUDE_DIR}
)

This does not jive with the same configuration line in .\src\mangosd\CMakeLists.txt.  So after .\src\realmd\CMakeLists.txt was updated to match .\src\mangosd\CMakeLists.txt...

target_include_directories(realmd
    PUBLIC
        ${CMAKE_CURRENT_SOURCE_DIR}
        ${CMAKE_CURRENT_BINARY_DIR}}
        ${OPENSSL_INCLUDE_DIR}
)

And now the project builds and installs as expected.   Good times!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use