[CMake] need help with modified helloworld
Alexander Neundorf
a.neundorf-work at gmx.net
Wed Jul 25 08:38:11 EDT 2007
On Wednesday 25 July 2007 00:19, Andy Dingfelder wrote:
> I'm wondering if someone could help me with a simple change to the
> helloworld example
>
> I have gotten the helloworld to work with either windows output or
> linux output, by changing the base CMakeLists.txt file but am struggling
> on how to build both
>
> the current example is set up as follows:
>
> CMakeExample/Hello
> CMakeExample/Demo
> CMakeExample/Build
> CMakeExample/CmakeLists.txt
>
> My goal is to set up my system something like this:
>
> CMakeExample/src/Hello
> CMakeExample/src/Demo
> CMakeExample/lib <-- not sure if I need this?
> CMakeExample/linuxBuild/CmakeLists.txt
> CMakeExample/windowsBuild/CmakeLists.txt
>
> It seems that the only difference between the CmakeLists.txt file for
You don't need CMakeLists.txt files in linuxBuild/ and windowsBuild/. Just run
cmake in these directories:
$ cd linuxBuild
$ cmake ..
$ make
$ cd ../windowsBuild
$ cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-mingw32.cmake ..
$ make
This should do it.
You need cmake cvs and follow the instructions on the cross compiling wiki
page.
Bye
Alex
More information about the CMake
mailing list