I compiled wxWidgets 3.0.3
on Windows using MinGW64 7.2
mingw32-make -j4 -f makefile.gcc BUILD=debug SHARED=0 UNICODE=1
I then created a sample project "Hello world" with CLion 2017.3
, and compiled using CMake.
cmake_minimum_required(VERSION 3.9)
project(wx_widgets_hello_world)
set(CMAKE_CXX_STANDARD 11)
set(wxWidgets_ROOT_DIR "C:/wx_widgets_3_0_3")
set(wxWidgets_CONFIGURATION mswud)
find_package(wxWidgets COMPONENTS adv core base REQUIRED)
include(${wxWidgets_USE_FILE})
add_executable(wx_widgets_hello_world main.cpp)
target_link_libraries(wx_widgets_hello_world ${wxWidgets_LIBRARIES})
Included headers are
#include <wx/wx.h>
#include <wx/grid.h>
adv
is there because I'm experimenting the wxGrid
class.
I check the produced .exe and it is 90MB. Sure I'm doing something wrong. Any thought?
I'm not an expert with CMake (never used before), but maybe its because I'm linking all the libraries (adv base core
) with
target_link_libraries(wx_widgets_hello_world ${wxWidgets_LIBRARIES})