[CMake] MSYS + MINGW + wx-config.sh

Peter Visser pervulgo at gmail.com
Wed Feb 14 14:23:34 EST 2007


Hi,

Instead of trying to call wx-config directly, you can (should) use
"FIND_PACKAGE(wxWidgets)", this will call the wx-config shell script and set
the necessary/required variables.

for example the wx_minimal sample:
###
PROJECT(wx_minimal)

FIND_PACKAGE(wxWidgets)

IF(wxWidgets_FOUND)
        INCLUDE(${wxWidgets_USE_FILE})
ENDIF(wxWidgets_FOUND)

INCLUDE_DIRECTORIES( ${wxWidgets_INCLUDE_DIRS} )
LINK_DIRECTORIES( ${wxWidgets_LIBRARIES} )
ADD_EXECUTABLE(minimal minimal.cpp)
TARGET_LINK_LIBRARIES(minimal ${wxWidgets_LIBRARIES})
###


Cheers,

Peter.

On 2/14/07, klaas.holwerda <kholwerd at xs4all.nl> wrote:
>
> Hi,
>
> I like to use Cmake for wxWidgets using MSYS + Mingw.
> And for that i need the output of wx-config, which is a shell script.
>
> But the return from the following is, that it is not a windows executable.
> How can i tell Cmake that i am using MSYS as a shell, and therefore that
> it can call shell shell script?
> Or is there a way to call msys its shell directly from cmake, using
> something like "sh -c wx-config".
> So in fact msys would run the shell script, but Cmake call a normal
> executable
> I understand that cmake.exe and CmakeSetup.exe do not know of the
> existence of MSYS, but don't understand how to get around this.
>
>         EXECUTE_PROCESS(
>             COMMAND "wx-config" "--selected_config"
>             OUTPUT_VARIABLE wxWidgets_SELECTED_CONFIG
>             RESULT_VARIABLE wxWidgets_WANTED_AVAILABLE
>         )
>
> Thanks for any advice,
>
> Klaas
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070214/a6c1035a/attachment.htm


More information about the CMake mailing list