Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake command not working on Windows 10 #1540

Closed
kandroid29 opened this issue Feb 20, 2021 · 4 comments
Closed

CMake command not working on Windows 10 #1540

kandroid29 opened this issue Feb 20, 2021 · 4 comments
Labels
Bug Build Outdated Old issues that may not be relevant for current releases. Marked issues are queued to be closed.

Comments

@kandroid29
Copy link

kandroid29 commented Feb 20, 2021

I wanted to build the project on my Windows10 PC. When I executed the following command
cmake -H. -DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake -Bbuild -G "Visual Studio 15 2017"
it complaint "Argument "." to --help-command is not a CMake command. Use --help-command-list to see all commands."

I guess it was related to the -H. argment passed to cmake, but I had not figured out what was the problem.

Please help me fix this issue

screenshots
wz2100-cmake-problem

Your System:

  • OS: Windows 10 64bit
  • CMake version: 3.19.0
@kandroid29 kandroid29 added the Bug label Feb 20, 2021
@kandroid29 kandroid29 changed the title CMake command 10 not working on Windows 10 CMake command not working on Windows 10 Feb 20, 2021
@adrian5
Copy link

adrian5 commented Mar 2, 2021

Could you try and out-of-source build without the -H. and -B flags?

  1. Create an empty directory and cd into it
  2. From above directory, call something like:
    cmake -DCMAKE_TOOLCHAIN_FILE=vc…\vcpkg.cmake -G "Visual Studio 15 2017" D:\OpenSource\warzone2100
    

I'm assuming here that OpenSource\warzone2100 contains the source files (and CMakeLists.txt).

See if that works for you.

@kandroid29
Copy link
Author

Could you try and out-of-source build without the -H. and -B flags?

  1. Create an empty directory and cd into it
  2. From above directory, call something like:
    cmake -DCMAKE_TOOLCHAIN_FILE=vc…\vcpkg.cmake -G "Visual Studio 15 2017" D:\OpenSource\warzone2100
    

I'm assuming here that OpenSource\warzone2100 contains the source files (and CMakeLists.txt).

See if that works for you.

What I tried was replacing the -H. with . and it works fine, following is the command I used:
cmake . -DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake -Bbuild -G "Visual Studio 15 2017"

I guess -H has different effect on different platform or with different CMake version

I think what you advised will also work
Thanks:)

@adrian5
Copy link

adrian5 commented Mar 4, 2021

Ok, great! If you found the -H. line in Warzone2100 documentation, then it would be good to point out where so it can be fixed.

Please close this issue, if it has been resolved. Thanks!

@kandroid29
Copy link
Author

Ok, great! If you found the -H. line in Warzone2100 documentation, then it would be good to point out where so it can be fixed.

Please close this issue, if it has been resolved. Thanks!

It's under the Howt to Build -> Windows using MSVC section in readme.md file;
Hopefully you can fix this so other developer would not be stuck with the cmake command error.
Thanks!

@KJeff01 KJeff01 added the Build label Nov 1, 2022
@KJeff01 KJeff01 added the Outdated Old issues that may not be relevant for current releases. Marked issues are queued to be closed. label Apr 13, 2024
@KJeff01 KJeff01 closed this as completed Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build Outdated Old issues that may not be relevant for current releases. Marked issues are queued to be closed.
Projects
None yet
Development

No branches or pull requests

3 participants