On Jan 5, 2008 7:43 PM, Rodolfo Lima wrote:
> Miguel A. Figueroa-Villanueva escreveu:
>
> > I believe the idea is to ensure that the wx-config used is the one
> > from the target platform. I would like to enlist the help of those
> > more experienced cross-compiling to affirm that this is the right
> > course of action. I am concerned that maybe the
> > CMAKE_FIND_ROOT_PATH_MODE_PROGRAM should be set before the
> > FIND_PACKAGE call. Would people be setting this differently for
> > different programs, so that I need to ensure that only the
> > cross-compiling directories are searched for to find wx-config? Or can
> > I count on the user to have set this mode correctly for his platform?
>
> 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. Now, is this also needed for the
following line:

# Resource file compiler.
FIND_PROGRAM(wxWidgets_wxrc_EXECUTABLE wxrc
  ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw
  )

I guess not, since in this case any resource compiler that is found
should do, right?

--Miguel
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to