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

Visual Studio cmake fails (Windows, Visual Studio 2022) #44

Open
DRNadler opened this issue Jul 23, 2024 · 3 comments
Open

Visual Studio cmake fails (Windows, Visual Studio 2022) #44

DRNadler opened this issue Jul 23, 2024 · 3 comments

Comments

@DRNadler
Copy link

Apologies, I'm not a cmake expert, and I can't build...
I'm using Visual Studio 2022 with all the latest patches, with its built-in cmake.
I installed wxWidgets 3.2.5, and built the libraries (debug 64-bit) using wxWidgets-provided SLN (not cmake).
wxWidgets samples build and run fine (I've written wxWidgets apps before, no problem there).

I tried to follow your instructions for Windows/Visual Studio.
When I first opened the project, settings wanted separate paths for wxWidgets_ROOT_DIR and wxWidgets_LIB_DIR which I provided. First attempt at build wanted path for wxWidgets_wxrc_EXECUTABLE which I added.
Now build fails as follows:
Severity Code Description Project File Line Suppression State Details Error CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS core base adv html ribbon xml xrc qa propgrid) C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake 230

I added wxWidgets_LIBRARIES and wxWidgets_INCLUDE_DIRS to settings but that made no difference.

Again sorry to bother you with this, but any suggestions?
Thanks in advance!
Best Regards, Dave

@DRNadler
Copy link
Author

DRNadler commented Jul 23, 2024

Update: Using cmake GUI, the demo and library build just fine.
Looks like a problem with Visual Studio's cmake handling.
Let me know if you'd like me to submit a pull request updating the documentation to save the next guy grief...
Thanks!

@DRNadler DRNadler changed the title cmake fails (Windows, Visual Studio 2022) Visual Studio cmake fails (Windows, Visual Studio 2022) Jul 23, 2024
@Blake-Madden
Copy link
Owner

A PR would be great, thanks.

@DRNadler
Copy link
Author

Just done...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants