Replies: 4 comments 4 replies
-
We never actually build on Windows with Cmake, not in CI or locally. Its not built for that case, and I'm surprised it worked last year if it did. We should probably update the docs to state the Cmake build is not supported on Windows. The only reason we ever attempted to support it was to have allwpilib inside of vcpkg itself, but that is very out of date, and none of us have the time to keep that up to date. |
Beta Was this translation helpful? Give feedback.
-
WITH_FLAT_INSTALL is disabled by default, but enabled for MSVC. WITH_FLAT_INSTALL sets wpilib_config_dir and wpiutil_config_dir to wpilib_dest, which is an empty string. This results in an empty string being passed to install()'s destination. We should probably specify CMAKE_CURRENT_BINARY_DIR instead. |
Beta Was this translation helpful? Give feedback.
-
Regarding Python, it sounds like it's finding a shortcut that prompts to install via the Microsoft store. Did you try disabling the shortcut as suggested? If the shortcut is disabled, it might be able to find the Visual Studio one? |
Beta Was this translation helpful? Give feedback.
-
Is there a way to build WPILib using MSVC compilers without using cmake? |
Beta Was this translation helpful? Give feedback.
-
Last year building WPILib with VS2022 on windows was easy, CMake correctly used vcpkg to install the needed external dependencies. This year, I have spent most of a day attempting to build WPILib with CMake and VS2022. I have not been able to successfully Configure using CMake 3.25.1. I get the following errors:
Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.18362.0.
Platform version: 10.0.22000.0
CMake Error at wpiutil/CMakeLists.txt:192 (install):
install FILES given no DESTINATION!
CMake Error at wpiutil/CMakeLists.txt:193 (install):
install EXPORT given no DESTINATION!
CMake Error at wpinet/CMakeLists.txt:191 (install):
install FILES given no DESTINATION!
CMake Error at wpinet/CMakeLists.txt:192 (install):
install EXPORT given no DESTINATION!
P
ython was not found; run without arguments to install from the Microsoft Store, or disable
this shortcut from Setting
s > Manage App Execution Aliases.
P
ython was not found; run without arguments to install from the Microsoft Store, or disab
le this shortcut from Settings > Manage App
Execution Aliases.
CMake Error at ntcore/CMakeLists.txt:11 (message):
python and python3 generate_topics.py failed
Configuring incomplete, errors occurred!
Python is installed using Anaconda 3 and is also present in VS2022.
Attached are my CMakeOutput.log, CMakeError.log, and CMakeCache.txt.
CMakeCache.txt
CMakeOutput.log
CMakeError.log
The documentation on using CMake CMAKE-README.md only deals with Linux and has the following statement:
Although it is supported on Windows, these docs will only go over Linux builds.
What external dependencies are needed to build NTCORE, SIMULATION_MODULES, WPILIB, and WPIMATH using CMake with VS2022 on Windows?
Beta Was this translation helpful? Give feedback.
All reactions