Re: Using wxWidgets from vcpkg in XCode

Maarten Bent <[email protected]> Tue, 30 Dec 2025 13:49:39 +0100
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
Hi,

I'm not familiar with vcpkg on macOS with Xcode, but in general CMake 
will take care of creating the Xcode project and setting the correct 
compiler and linker flags. It needs the following two lines to find and 
link with wxWidgets (copied from vcpkg/ports/wxwidgets/usage):

find_package(wxWidgets CONFIG REQUIRED)
target_link_libraries(main PRIVATE wx::core wx::base)

And to make sure vcpkg is correctly initialized, I think you can check 
if the CMake variable VCPKG_TOOLCHAIN is set.


On 30 Dec 2025 10:55, Tim Burgess wrote:
>
> Hi,
>
> I’m working on an XCode project that was originally created to use 
> wxWidgets from downloaded source. One of the goals is to use vcpkg for 
> all of our libraries, so I installed the x64-osx and x64-osx-dynamic 
> triplets then attempted to build the project.
>
> The build fails, indicating that Xcode can’t find wx.h, even though I 
> issued the ./vcpkg integrate install command. I suppose my questions are:
>
> 1 – What’s my best strategy for integrating wxWidgets from VCPKG into 
> an Xcode project
>
> 2 – What do I do about the compiler and linker flags in my build settings?
>
> Thanks for any advice.
>
> Tim
>
> -- 
> Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
> ---
> You received this message because you are subscribed to the Google 
> Groups "wx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected].
> To view this discussion visit 
> https://groups.google.com/d/msgid/wx-users/014901dc7972%2475adf680%246109e380%24%40raisedbar.net 
> <https://groups.google.com/d/msgid/wx-users/014901dc7972%2475adf680%246109e380%24%40raisedbar.net?utm_medium=email&utm_source=footer>.

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/214203c8-3384-4830-86fd-aea403a3d654%40gmail.com.