Skip to content

Instantly share code, notes, and snippets.

@xboard
Created June 16, 2019 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xboard/b2badf2690a4fc4cce99f320d0ad4bd9 to your computer and use it in GitHub Desktop.
Save xboard/b2badf2690a4fc4cce99f320d0ad4bd9 to your computer and use it in GitHub Desktop.
CMake project configuration to use wxWidget static libraries in MinGW.
cmake_minimum_required(VERSION 3.14)
project(HelloWorld)
set(wxWidgets_ROOT_DIR D:\\Projetos\\MinGW_Projects\\wxWidgets-3.0.4)
set(wxWidgets_LIB_DIR D:\\Projetos\\MinGW_Projects\\wxWidgets-3.0.4\\lib\\gcc_lib)
find_package(wxWidgets REQUIRED COMPONENTS net core base)
include(${wxWidgets_USE_FILE})
set(CMAKE_CXX_STANDARD 17)
add_executable(HelloWorld main.cpp)
target_link_libraries(HelloWorld ${wxWidgets_LIBRARIES})
@xboard
Copy link
Author

xboard commented Jun 16, 2019

To test, you can use the wxWidget Hello World example : https://docs.wxwidgets.org/stable/overview_helloworld.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment