[CMake] cross compilation suffixes

Matevž Jekovec matevz.jekovec at gmail.com
Mon Apr 16 17:18:37 EDT 2007


Dear list,

I'm trying to setup a Linux box which generates daily builds of our
music score application for various platforms. I'm using mingw for
Windows builds. Our project uses Qt4, swig, python and cmake as a build
tool and currently I managed to get cmake compile the source files, but
not link them. The problem is IMO how to define the generated and
searched for suffixes (.dll, .obj, .exe for Windows and .so, .o, none
for Linux - cmake actually runs on Linux but should use the Windows
nomenclature when searching the libs).

I'm sending the terminal output below. I've already read the wiki
through, but didn't find anything useful. Any ideas and hacks welcome.


Best wishes!
Matevž Jekovec
Canorus development team
http://www.canorus.org


Configuration & Compilation output:
matevz at mamazver:/data/canorusNightlyBuildSystem/trunk$ cmake -D
CMAKE_CXX_COMPILER=/usr/bin/i586-mingw32msvc-g++ -D
CMAKE_C_COMPILER=/usr/bin/i586-mingw32msvc-gcc -D
CMAKE_INCLUDE_PATH=/usr/i586-mingw32msvc/include -D
QT_LIBRARY_DIR=/home/matevz/.wine/drive_c/Qt/4.2.3/lib -D
QT_INCLUDE_DIR=/home/matevz/.wine/drive_c/Qt/4.2.3/include -D
PYTHON_LIBRARIES=/home/matevz/.wine/drive_c/Python25/libs/ -D
PYTHON_INCLUDE_PATH=/home/matevz/.wine/drive_c/Python25/include/ -D
CMAKE_INSTALL_PREFIX=windows/canorus .
-- Check for working C compiler: /usr/bin/i586-mingw32msvc-gcc
-- Check for working C compiler: /usr/bin/i586-mingw32msvc-gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/i586-mingw32msvc-g++
-- Check for working CXX compiler: /usr/bin/i586-mingw32msvc-g++ -- works
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - found
-- Found Qt-Version 4.2.0
-- Looking for pthread.h
-- Looking for pthread.h - not found
SWIG found, using scripting extensions.
Ruby Library and Development files *not* found. Ruby extensions disabled!
Python Library and Development files found. Python extensions enabled.
-- Configuring done
-- Generating done
-- Build files have been written to: /data/canorusNightlyBuildSystem/trunk
matevz at mamazver:/data/canorusNightlyBuildSystem/trunk$ make
[  1%] Swig source
Scanning dependencies of target _CanorusPython
[  1%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/scripting/canoruspythonPYTHON_wrap.o
/data/canorusNightlyBuildSystem/trunk/src/scripting/canoruspythonPYTHON_wrap.cxx:1:
warning: -fPIC ignored for target (all code is position independent)
[  2%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/document.o
/data/canorusNightlyBuildSystem/trunk/src/core/document.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[  3%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/sheet.o
/data/canorusNightlyBuildSystem/trunk/src/core/sheet.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[  4%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/context.o
/data/canorusNightlyBuildSystem/trunk/src/core/context.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[  5%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/staff.o
/data/canorusNightlyBuildSystem/trunk/src/core/staff.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[  6%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/core/lyricscontext.o
/data/canorusNightlyBuildSystem/trunk/src/core/lyricscontext.cpp:1:
warning: -fPIC ignored for target (all code is position independent)
[  7%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/core/functionmarkingcontext.o
/data/canorusNightlyBuildSystem/trunk/src/core/functionmarkingcontext.cpp:1:
warning: -fPIC ignored for target (all code is position independent)
[  8%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/core/muselement.o
/data/canorusNightlyBuildSystem/trunk/src/core/muselement.cpp:1:
warning: -fPIC ignored for target (all code is position independent)
[  8%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/core/muselementfactory.o
/data/canorusNightlyBuildSystem/trunk/src/core/muselementfactory.cpp:1:
warning: -fPIC ignored for target (all code is position independent)
[  9%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/voice.o
/data/canorusNightlyBuildSystem/trunk/src/core/voice.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[ 10%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/barline.o
/data/canorusNightlyBuildSystem/trunk/src/core/barline.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[ 11%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/clef.o
/data/canorusNightlyBuildSystem/trunk/src/core/clef.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[ 12%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/core/keysignature.o
/data/canorusNightlyBuildSystem/trunk/src/core/keysignature.cpp:1:
warning: -fPIC ignored for target (all code is position independent)
[ 13%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/core/timesignature.o
/data/canorusNightlyBuildSystem/trunk/src/core/timesignature.cpp:1:
warning: -fPIC ignored for target (all code is position independent)
[ 14%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/playable.o
/data/canorusNightlyBuildSystem/trunk/src/core/playable.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[ 15%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/note.o
/data/canorusNightlyBuildSystem/trunk/src/core/note.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[ 15%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/slur.o
/data/canorusNightlyBuildSystem/trunk/src/core/slur.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[ 16%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/rest.o
/data/canorusNightlyBuildSystem/trunk/src/core/rest.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[ 17%] Building CXX object src/CMakeFiles/_CanorusPython.dir/core/syllable.o
/data/canorusNightlyBuildSystem/trunk/src/core/syllable.cpp:1: warning:
-fPIC ignored for target (all code is position independent)
[ 18%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/core/functionmarking.o
/data/canorusNightlyBuildSystem/trunk/src/core/functionmarking.cpp:1:
warning: -fPIC ignored for target (all code is position independent)
[ 19%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/drawable/drawablestaff.o
/data/canorusNightlyBuildSystem/trunk/src/drawable/drawablestaff.cpp:1:
warning: -fPIC ignored for target (all code is position independent)
[ 20%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/drawable/drawablecontext.o
/data/canorusNightlyBuildSystem/trunk/src/drawable/drawablecontext.cpp:1:
warning: -fPIC ignored for target (all code is position independent)
[ 21%] Building CXX object
src/CMakeFiles/_CanorusPython.dir/drawable/drawable.o
/data/canorusNightlyBuildSystem/trunk/src/drawable/drawable.cpp:1:
warning: -fPIC ignored for target (all code is position independent)
Linking CXX shared module _CanorusPython.so
/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/bin/ld:
cannot find -ldl
collect2: ld returned 1 exit status
make[2]: *** [src/_CanorusPython.so] Error 1
make[1]: *** [src/CMakeFiles/_CanorusPython.dir/all] Error 2
make: *** [all] Error 2


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20070416/c2adf14b/signature.pgp


More information about the CMake mailing list