[CMake] Can't find wxWidgets

Bob Bachman bob_bachman at intercept.com
Mon Jul 13 14:38:15 EDT 2015


Richard Shaw <hobbes1069 at ...> writes:

> 
> On Thu, Jul 9, 2015 at 3:09 PM, Bob Bachman <bob_bachman-
JXEU3b3ms+Tby3iVrkZq2A at public.gmane.org> wrote:
> It's defined in the CMakeLists.txt file and stored in the CMakeCache.txt
> file.
> //Path to a program.
> 
wxWidgets_CONFIG_EXECUTABLE:FILEPATH=/home/mzx_bldr/mozaix_svn/engineering/c
> ommon_src/src/wxWidgets-3.0.2/buildgtk/wx-config
> 
> Ok, useful information to have...
> 
> Only thing I can think of at this point is to start adding some debug 
tests such as after the above line try:
> 
> if(EXISTS ${ wxWidgetsCONFIG_EXECUTABLE})
>   message("Found wx-config")
> else()
>   message("wx-config not found")
> 
> Thanks,
> Richard
> 
> 

Hello Richard.

I'm wondering if you can explain what's happening below.
The first line is in our CMakeLists.txt file. It calls
"find_package" with the required libs.

1. find_package( wxWidgets REQUIRED base core xrc net adv xml html qa aui )

The second line is in the file FindwxWidgets.cmake and calls the
routine FindPackageHandleStandardArgs with three operands but no
libs (i.e base core ... etc).

2. FIND_PACKAGE_HANDLE_STANDARD_ARGS(wxWidgets DEFAULT_MSG wxWidgets_FOUND)

The final line is function definition and is in the file 
FindPackageHandleStandardArgs.cmake
and is where the process fails.

3. FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)

When I placed the line
message(STATUS ${_FIRST_ARG}) in this function and run it. I see  "DEFAULT_MSG".

It seems that line 2 should be calling a different version of this
routine, one that contains the list of lib names.

Any idea of what is going on here.

Thanks,
Bob




More information about the CMake mailing list