[CMake] Re: FindwxWidgets and Cross-compiling

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Sat Jan 5 20:32:22 EST 2008


On Jan 5, 2008 9:23 PM, Miguel A. Figueroa-Villanueva wrote:
> On Jan 5, 2008 7:43 PM, Rodolfo Lima wrote:
> > Normally during a cross compilation, CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
> > should be set to NEVER because the programs installed in
> > ${CMAKE_FIND_ROOT_PATH} usually only runs in the target platform. If my
> > script needs 'sed', for instance, I want the one that runs in the build
> > platform, which is installed in /usr/bin.
> >
> > The problem is that the wx-config that returns the correct information
> > for the target platform is installed in ${CMAKE_FIND_ROOT_PATH}. If
> > CMAKE_FIND_ROOT_PATH_MODE_PROGRAM remains set to NEVER, the host's
> > wx-config will be used, and it'll return wrong information. Therefore
> > the only way (that I know of) to select the correct wx-config is setting
> > explicitly CMAKE_FIND_ROOT_PATH_MODE_PROGRAM to ONLY as I did in my
> > patch. This solution works well in my installation (Gentoo).
>
> Fair enough, I'll commit the patch.

After reading the find_program help message of current cmake cvs, it
seems that the following switch should work the same:

    FIND_PROGRAM(wxWidgets_CONFIG_EXECUTABLE wx-config
      ONLY_CMAKE_FIND_ROOT_PATH
      )

Could you confirm this Rodolfo?

--Miguel


More information about the CMake mailing list