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

wxWidgets example #523

Closed
idotta opened this issue Nov 27, 2023 · 2 comments
Closed

wxWidgets example #523

idotta opened this issue Nov 27, 2023 · 2 comments

Comments

@idotta
Copy link

idotta commented Nov 27, 2023

Hi there! Would someone please show me an example on how to use CPM to build a project using wxWidgets?

I couldn't make it work and I'm not experienced with CMake. I know there's something missing, but I can't figure out what. I'm trying to do it simply by using:

CPMAddPackage("gh:wxWidgets/wxWidgets@3.2.4")
include(${wxWidgets_USE_FILE})
add_executable(app main.cpp)
target_link_libraries(app PRIVATE ${wxWidgets_LIBRARIES})
@jolz
Copy link

jolz commented May 31, 2024

Hi. you missed to give some error message...

The following snippet works for me (linux, all required -dev-Packages installed).

cmake_minimum_required(VERSION 3.24)

include(${CMAKE_SOURCE_DIR}/cmake/CPM.cmake)
CPMAddPackage("gh:wxWidgets/wxWidgets@3.2.5")

project(hello CXX)
add_executable(${PROJECT_NAME} WIN32 hello.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE wx::core)

@idotta
Copy link
Author

idotta commented May 31, 2024

Hi there! Thank you so much for taking the time for a complete example!

@idotta idotta closed this as completed May 31, 2024
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