Is your feature request related to a problem? Please describe.
CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0048 NEW)
project(pp VERSION 0.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
file(DOWNLOAD https://raw.githubusercontent.com/wxWidgets/wxWidgets/c034a78/samples/widgets/button.cpp src/main.cpp
EXPECTED_HASH SHA256=c94699427f8b4a90c7ae3e075210bc44ae80098b5303a564f11d3991c620328f)
file(DOWNLOAD https://raw.githubusercontent.com/wxWidgets/wxWidgets/WX_3_0_BRANCH/samples/widgets/icons/button.xpm icons/button.xpm
EXPECTED_HASH SHA256=c7f7bf9a4b678376a20af95adc213a467450a71040710dacc168fa6885a1ad0f)
set(src ${CMAKE_CURRENT_BINARY_DIR}/src/main.cpp)
find_package(wxWidgets REQUIRED)
add_executable(${PROJECT_NAME} ${src})
target_include_directories(${PROJECT_NAME} PRIVATE ${wxWidgets_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PRIVATE ${wxWidgets_LIBRARIES})
shell
$ [path]/vcpkg install wxwidgets
$ mkdir build && cd $_
$ cmake -DCMAKE_TOOLCHAIN_FILE=[root]/vcpkg/scripts/buildsystems/vcpkg.cmake ..
$ cmake --build .
[ 50%] Building CXX object CMakeFiles/pp.dir/src/main.cpp.o
In file included from /tmp/a/build/src/main.cpp:20:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/wxprec.h:12:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/defs.h:62:13: error: "No Target! You should use wx-config program for compilation flags!"
# error "No Target! You should use wx-config program for compilation flags!"
^
In file included from /tmp/a/build/src/main.cpp:28:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/app.h:19:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/event.h:22:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/cursor.h:108:26: error: calling 'GetBusyCursor' with incomplete return type 'const wxCursor'
wxSetCursor( wxBusyCursor::GetBusyCursor() );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/utils.h:770:27: note: 'GetBusyCursor' declared here
static const wxCursor GetBusyCursor();
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:32:28: note: forward declaration of 'wxCursor'
class WXDLLIMPEXP_FWD_CORE wxCursor;
^
In file included from /tmp/a/build/src/main.cpp:28:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/app.h:19:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/event.h:1921:14: error: field has incomplete type 'wxCursor'
wxCursor m_cursor;
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:32:28: note: forward declaration of 'wxCursor'
class WXDLLIMPEXP_FWD_CORE wxCursor;
^
In file included from /tmp/a/build/src/main.cpp:28:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/app.h:19:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/event.h:1904:11: error: no matching constructor for initialization of 'wxEvent'
: wxEvent(event),
^ ~~~~~
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/event.h:964:5: note: candidate constructor not viable: no known conversion from 'const wxSetCursorEvent' to 'int' for 1st argument
wxEvent(int winid = 0, wxEventType commandType = wxEVT_NULL );
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/event.h:1116:5: note: candidate constructor not viable: no known conversion from 'const wxSetCursorEvent' to 'const wxEvent' for 1st argument
wxEvent(const wxEvent&); // for implementing Clone()
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/event.h:1917:56: error: cannot initialize return object of type 'wxEvent *' with an rvalue of type 'wxSetCursorEvent *'
virtual wxEvent *Clone() const wxOVERRIDE { return new wxSetCursorEvent(*this); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/a/build/src/main.cpp:28:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/app.h:798:11: error: use of undeclared identifier 'wxApp'
{ wxApp::SetInitializerFunction(fn); }
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:44:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bitmap.h:304:1: error: incomplete type 'wxBitmap' named in nested name specifier
wxBitmap::
^~~~~~~~~~
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:29:28: note: forward declaration of 'wxBitmap'
class WXDLLIMPEXP_FWD_CORE wxBitmap;
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:45:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/control.h:22:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:25:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/region.h:239:24: error: 'wxRegion' is an incomplete type
return DoIntersect(wxRegion(rect));
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:37:28: note: forward declaration of 'wxRegion'
class WXDLLIMPEXP_FWD_CORE wxRegion;
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:45:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/control.h:22:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:25:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/region.h:244:23: error: 'wxRegion' is an incomplete type
return DoSubtract(wxRegion(rect));
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:37:28: note: forward declaration of 'wxRegion'
class WXDLLIMPEXP_FWD_CORE wxRegion;
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:45:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/control.h:22:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:25:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/region.h:249:18: error: 'wxRegion' is an incomplete type
return DoXor(wxRegion(rect));
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:37:28: note: forward declaration of 'wxRegion'
class WXDLLIMPEXP_FWD_CORE wxRegion;
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:45:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/control.h:22:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:80:12: error: field has incomplete type 'wxFont'
wxFont font;
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:33:28: note: forward declaration of 'wxFont'
class WXDLLIMPEXP_FWD_CORE wxFont;
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:45:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/control.h:22:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:83:14: error: field has incomplete type 'wxColour'
wxColour colFg;
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:31:28: note: forward declaration of 'wxColour'
class WXDLLIMPEXP_FWD_CORE wxColour;
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:45:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/control.h:22:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:87:14: error: field has incomplete type 'wxColour'
wxColour colBg;
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:31:28: note: forward declaration of 'wxColour'
class WXDLLIMPEXP_FWD_CORE wxColour;
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:45:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/control.h:22:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:1537:13: error: unknown type name 'WXWidget'
virtual WXWidget GetHandle() const = 0;
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:1539:34: error: unknown type name 'WXWidget'
virtual void AssociateHandle(WXWidget WXUNUSED(handle)) { }
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:1690:26: error: field has incomplete type 'wxCursor'
wxCursor m_cursor;
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:32:28: note: forward declaration of 'wxCursor'
class WXDLLIMPEXP_FWD_CORE wxCursor;
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:45:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/control.h:22:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:1691:26: error: field has incomplete type 'wxFont'
wxFont m_font; // see m_hasFont
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:33:28: note: forward declaration of 'wxFont'
class WXDLLIMPEXP_FWD_CORE wxFont;
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:45:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/control.h:22:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:1692:26: error: field has incomplete type 'wxColour'
wxColour m_backgroundColour, // m_hasBgCol
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:31:28: note: forward declaration of 'wxColour'
class WXDLLIMPEXP_FWD_CORE wxColour;
^
In file included from /tmp/a/build/src/main.cpp:31:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/bmpbuttn.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/button.h:18:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/anybutton.h:45:
In file included from vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/control.h:22:
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/window.h:1693:26: error: field has incomplete type 'wxColour'
m_foregroundColour; // m_hasFgCol
^
vcpkg/packages/wxwidgets_x64-osx/include/wx-3.1/wx/gdicmn.h:31:28: note: forward declaration of 'wxColour'
class WXDLLIMPEXP_FWD_CORE wxColour;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/pp.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/pp.dir/all] Error 2
make: *** [all] Error 2
Proposed solution
Describe alternatives you've considered
I'm trying other cross-platform GUI frameworks that vcpkg 'supports', e.g., see the trackbacks at #17052
Is your feature request related to a problem? Please describe.
CMakeLists.txtshellProposed solution
Describe alternatives you've considered
I'm trying other cross-platform GUI frameworks that vcpkg 'supports', e.g., see the trackbacks at #17052