Transition to cmake on Windows - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Transition to cmake on Windows (/thread-1312.html) |
Transition to cmake on Windows - xoft - 01-12-2014 I'd like to move to CMake on Windows, too. I'm exploring the options of the easiest transition options. I think I might cook up a quick script that would call cmake with the appropriate generator and create the bindings files. In the meantime, can someone with Windows try the CMake approach manually, to verify that it works for them, too? STR? Tigerw? The basic instructions are: Clone a fresh new repo to a new folder, download and install cmake, make sure it's available system-wide by setting it in the PATH variable, then run "cmake ." in the repo root. CMake should build a solution file at the repo root, open that with VS and try compiling. RE: Transition to cmake on Windows - NiLSPACE - 01-12-2014 I'm cloning now. CMake is building. VS 2008 is compiling. Bindings didn't generate. I'l have to do that myself first. Error: Code: 1>------ Build started: Project: MCServer, Configuration: Debug Win32 ------ Buildlog: BuildLog.htm (Size: 26.64 KB / Downloads: 358) RE: Transition to cmake on Windows - xoft - 01-12-2014 Hm, the windows version of the CMake script requires that Bindings are generated before running CMake. I'll try to fix that. RE: Transition to cmake on Windows - tigerw - 01-12-2014 I reported this too with your windows cmake PR RE: Transition to cmake on Windows - NiLSPACE - 01-12-2014 Also it seems it doesn't compile Lua (or it doesn't compile it as an dll). RE: Transition to cmake on Windows - xoft - 01-12-2014 Yes, but that was older code. I was hoping to have fixed this. Apparently it is impossible to do right now, so we'll have to stick to the manual way - first generate bindings, then run CMake. STR, can you delete your $/CMakeCache.txt file, run $/src/Bindings/AllToLua.bat and then try CMake again? RE: Transition to cmake on Windows - NiLSPACE - 01-12-2014 Yes it compiles fine when I do that. But I can't start the server because lua.dll is missing. the lua.dll is compiled in $lib/lua/<MODE> Should be fixed when you add Quote:set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/MCServer")in the lua CMakeList.txt in the if (WIN32). RE: Transition to cmake on Windows - worktycho - 01-12-2014 (01-12-2014, 09:32 PM)xoft Wrote: Yes, but that was older code. I was hoping to have fixed this. One option have just discovered is to have cmake run tolua++ during configure time using execute_process(). You would then need to rerun cmake every time you changed the bindings but its a little simpler for those not working on bindings. RE: Transition to cmake on Windows - xoft - 01-12-2014 (01-12-2014, 10:27 PM)worktycho Wrote: One option have just discovered is to have cmake run tolua++ during configure time using execute_process(). I'm trying that right now, but am having trouble - the command is not executed. I currently have this code in the "MSVC" branch of $/src/CMakeLists.txt: Code: if (NOT EXISTS "${PROJECT_SOURCE_DIR}/src/Bindings/Bindings.cpp") Code: Bindings.cpp not found, generating now Waitaminute! When I remove the tolua++ command and leave only the echo command, it works as expected. Ah! It works! Seems like cmake cannot concat variables for the command, so I had to put the entire tolue++.exe path into a separate variable. This seems to have done the trick: Code: # Check the Bindings existence: RE: Transition to cmake on Windows - xoft - 01-14-2014 Okay, how about now, can you retry? And Tigerw, can you try with your faaavorite VS2013? |