All pastes #996798 Raw Edit

D-Font

public text v1 · immutable
#996798 ·published 2008-04-25 06:25 UTC
rendered paste body
deifante@deifante-w5f:~/cmake-examples/example01$ ls
CMakeLists.txt  GameObject.h       Prebuild.exe  Program.cs  runprebuild.sh
GameObject.cpp  NativeTimeModel.h  prebuild.xml  readme      SwigGameObject.i
deifante@deifante-w5f:~/cmake-examples/example01$ clear
deifante@deifante-w5f:~/cmake-examples/example01$ cmake .
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Configuring done
-- Generating done
-- Build files have been written to: /home/deifante/cmake-examples/example01
deifante@deifante-w5f:~/cmake-examples/example01$ make
Scanning dependencies of target GameObjectLibraryNative
[ 25%] Building CXX object CMakeFiles/GameObjectLibraryNative.dir/GameObject.o
Linking CXX shared library lib/libGameObjectLibraryNative.so
[ 25%] Built target GameObjectLibraryNative
[ 50%] Swig source
Scanning dependencies of target GameObjectLibrarySwig
[ 75%] Building CXX object CMakeFiles/GameObjectLibrarySwig.dir/SwigGameObjectC++_wrap.o
[100%] Building CXX object CMakeFiles/GameObjectLibrarySwig.dir/GameObject.o
Linking CXX shared module lib/GameObjectLibrarySwig.so
[100%] Built target GameObjectLibrarySwig
deifante@deifante-w5f:~/cmake-examples/example01$ ls
CMakeCache.txt       GameObject.cpp            GameObjectLibrarySwigPINVOKE.cs  NativeTimeModel.h  readme
CMakeFiles           GameObject.cs             lib                              Prebuild.exe       runprebuild.sh
cmake_install.cmake  GameObject.h              Makefile                         prebuild.xml       SwigGameObjectC++_wrap.cxx
CMakeLists.txt       GameObjectLibrarySwig.cs  NativeTimeModel.cs               Program.cs         SwigGameObject.i
deifante@deifante-w5f:~/cmake-examples/example01$ cd lib
deifante@deifante-w5f:~/cmake-examples/example01/lib$ ls
GameObjectLibrarySwig.so  libGameObjectLibraryNative.so
deifante@deifante-w5f:~/cmake-examples/example01/lib$ cd ..
deifante@deifante-w5f:~/cmake-examples/example01$ ./runprebuild.sh
Prebuild v2.0.3
Copyright (c) 2004-2008
Matthew Holmes (matthew@wildfiregames.com),
Dan Moorehead (dan05a@gmail.com),
David Hudson (jendave@yahoo.com),
Rob Loach (http://www.robloach.net),
C.J. Adams-Collier (cjac@colliertech.org),
See 'prebuild /usage' for help

Creating NAnt build files
...Creating project: GameObjectCSharpProject

deifante@deifante-w5f:~/cmake-examples/example01$ nant -t:mono-1.0 -buildtarget:GameObjectCSharp
GameObjectCSharpProject.exe.build  GameObjectCSharpSolution.build
deifante@deifante-w5f:~/cmake-examples/example01$ nant -t:mono-1.0 -buildtarget:GameObjectCSharpSolution.build
NAnt 0.85 (Build 0.85.2478.0; release; 14/10/2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net

Unknown argument '-buildtarget:GameObjectCSharpSolution.build'

Try 'nant -help' for more information
deifante@deifante-w5f:~/cmake-examples/example01$ nant -t:mono-1.0 -buildfile:GameObjectCSharpSolution.build
NAnt 0.85 (Build 0.85.2478.0; release; 14/10/2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///home/deifante/cmake-examples/example01/GameObjectCSharpSolution.build
Target framework: Mono 1.0 Profile
Target(s) specified: build

     [echo] Using 'mono-1.0' Framework

init:


Debug:

     [echo] Platform unix

build:

     [nant] /home/deifante/cmake-examples/example01/GameObjectCSharpProject.exe.build build
            Buildfile: file:///home/deifante/cmake-examples/example01/GameObjectCSharpProject.exe.build
            Target framework: Mono 1.0 Profile
            Target(s) specified: build


            build:

                 [echo] Build Directory is /home/deifante/cmake-examples/example01/bin/Debug
                [mkdir] Creating directory '/home/deifante/cmake-examples/example01/bin/Debug'.
                  [csc] Compiling 5 files to '/home/deifante/cmake-examples/example01/bin/Debug/GameObjectCSharpProject.exe'.
                 [echo] Copying from [/home/deifante/cmake-examples/example01/bin/Debug/] to [/home/deifante/cmake-examples/example01/bin/
                 [copy] Copying 2 files to '/home/deifante/cmake-examples/example01/bin/'.

            BUILD SUCCEEDED

            Total time: 0.9 seconds.


BUILD SUCCEEDED

Total time: 1 seconds.

deifante@deifante-w5f:~/cmake-examples/example01$ ls
bin                  GameObject.cpp                     GameObjectLibrarySwig.cs         NativeTimeModel.h  runprebuild.sh
CMakeCache.txt       GameObject.cs                      GameObjectLibrarySwigPINVOKE.cs  Prebuild.exe       SwigGameObjectC++_wrap.cxx
CMakeFiles           GameObjectCSharpProject.exe.build  lib                              prebuild.xml       SwigGameObject.i
cmake_install.cmake  GameObjectCSharpSolution.build     Makefile                         Program.cs
CMakeLists.txt       GameObject.h                       NativeTimeModel.cs               readme
deifante@deifante-w5f:~/cmake-examples/example01$ cd lib
deifante@deifante-w5f:~/cmake-examples/example01/lib$ ls
GameObjectLibrarySwig.so  libGameObjectLibraryNative.so
deifante@deifante-w5f:~/cmake-examples/example01/lib$ cp GameObjectLibrarySwig.so ../bin/libGameObjectLibrarySwig.so
deifante@deifante-w5f:~/cmake-examples/example01/lib$ cd ../bin
deifante@deifante-w5f:~/cmake-examples/example01/bin$ ls
Debug  GameObjectCSharpProject.exe  GameObjectCSharpProject.exe.mdb  libGameObjectLibrarySwig.so
deifante@deifante-w5f:~/cmake-examples/example01/bin$ ./GameObjectCSharpProject.exe
Distance from origin:4.582576
Distance from origin:56014.68
done
deifante@deifante-w5f:~/cmake-examples/example01/bin$