vs ide PATH issue solved (no .bat files needed)

Paulo Moura Guedes moura at kdewebdev.org
Tue Apr 25 17:52:47 CEST 2006


On Tuesday 25 April 2006 16:49, William A. Hoffman wrote:
> At 09:41 AM 4/25/2006, Bill Hoffman wrote:
> >I came up with a solution for the VS IDE PATH problem.
> >CMake will look for the environment variable CMAKE_MSVCIDE_RUN_PATH.
> >If it is set, then it will add its value to the PATH for each
> >custom command in the project.   So, you can use this environment
> >variable to put stuff in the PATH for the VS IDE from the
> >shell that you run cmake in.  So, for building KDE with vs IDE,
> >you will have two choices:
> >
> >1. change the environment for vs IDE from the IDE menus and
> >add the path to perl, and the path to the qt dlls.
> >
> >2. set CMAKE_MSVCIDE_RUN_PATH=c:\path\to\perl;c:\path\to\qt\bin
> >
> >Then run cmake.
> >
> >I have checked this into CVS CMake, and it will be in CMake 2.4.1.
> >I have tested, and it seems to work.
>
> One thing we could do with this option is add the following to
> the cmakelist file in kde:
>
> # for visual studio IDE set the path correctly for custom commands
> if(MSVC_IDE)
>   find_program(PERL_PATH perl)
>   get_filename_component(PERL_LOCATION "${PERL_PATH}" PATH)
>   file(TO_NATIVE_PATH "${PERL_LOCATION}" PERL_PATH_WINDOWS)
>   file(TO_NATIVE_PATH "${QT_BINARY_DIR}" QT_BIN_DIR_WINDOWS)
>   set(CMAKE_MSVCIDE_RUN_PATH "${PERL_PATH_WINDOWS}\;${QT_BIN_DIR_WINDOWS}"
>     CACHE STATIC "MSVC IDE Run path" FORCE)
> endif(MSVC_IDE)
>
> It should be safe to put that into the top level cmakelist.txt file
> right now, as it will only set a variable that won't be used until
> the 2.4.1 comes out.   This should allow IDE builds to be done with
> no extra setup.

Thanks a lot Bill, I will try it on friday.

Paulo


More information about the Kde-buildsystem mailing list