AnsweredAssumed Answered

compiling musescore for uCLinux with QT and cmake

Question asked by willrobot on Feb 22, 2012
Latest reply on May 24, 2012 by Aaronwu

Hi,

 

I've try few things but I still have this erroe when trying to cmake for blackfin:

 

CMake Error at CMakeLists.txt:116 (message):

  Fatal error: QT (version >= 4.5.0) required.  Cmake tries to detect QT4 by

  searching for 'qmake' in your PATH.If you have QT4 installed, make sure

  qmake is found in your PATH.  If you compiled QT4 yourself make sure your

  new qmake ist found _first_ in your PATH.

 

 

I'm trying to compile the source of musescore 0.9.5 to keep it compatible with the existing version of QT in uClinux options

 

What I did is to compile the uClinux kernel with QT lib so I can have the suitable embedded QT.

 

then I modified the Makefile of musescore to build with uclinux compilers. I've try different things so I show here the latest trial:

 

bfin:

        mkdir build;

        mkdir install;                               \

        cd build;

        cmake -DCMAKE_TOOLCHAIN_FILE=bfin.cmake -DCMAKE_VERBOSE_MAKEFILE=TRUE -\

DQT_QMAKE_EXECUTABLE=/home/william/Development_new/Music_Recognition/code/uCLin\

ux/rev2011R1/uclinux-dist/lib/qt-embedded/build-qt-embedded-linux-opensource-sr\

c-4.5.1/bin         -libdir=/home/william/Development_new/Music_Recognition/cod\

e/uCLinux/rev2011R1/uclinux-dist/lib/qt-embedded/build-qt-embedded-linux-openso\

urce-src-4.5.1/lib    \

              -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
               mscore;

 

 

in the CMakeLists.txt I did add:

 

link_directories(/home/william/Development_new/Music_Recognition/code/uCLinux/r\

ev2011R1/uclinux-dist/lib/qt-embedded/build-qt-embedded-linux-opensource-src-4.\

5.1/bin)

 

SET(CMAKE_MODULE_PATH /home/william/Development_new/Music_Recognition/code/uCLi\

nux/rev2011R1/uclinux-dist/lib/qt-embedded/build-qt-embedded-linux-opensource-s\

rc-4.5.1/bin)

 

SET(CMAKE_PREFIX_PATH /home/william/Development_new/Music_Recognition/code/uCLi\

nux/rev2011R1/uclinux-dist/lib/qt-embedded/build-qt-embedded-linux-opensource-s\

rc-4.5.1/bin)

 

SET(QT_QMAKE_EXECUTABLE /home/william/Development_new/Music_Recognition/code/uC\

Linux/rev2011R1/uclinux-dist/lib/qt-embedded/build-qt-embedded-linux-opensource\

-src-4.5.1/bin)

 

my bfin.cmake look like that:

 

# this one is important                                                   

SET(CMAKE_SYSTEM_NAME Linux)

#this one not so much                                                     

SET(CMAKE_SYSTEM_VERSION 1)

 

#                                                                         

SET (BFIN "/opt/uClinux/bfin-uclinux")

 

# specify the cross compiler                                              
SET(CMAKE_C_COMPILER ${BFIN}/bin/bfin-uclinux-gcc)

SET(CMAKE_CXX_COMPILER   ${BFIN}/bin/bfin-uclinux-g++)

SET(CMAKE_LINKER     ${BFIN}/bin/bfin-uclinux-ld)

 

#/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib                   

LINK_DIRECTORIES("${BFIN}/usr/lib")

 

SET(CMAKE_FIND_ROOT_PATH

  /opt/uClinux/bfin-uclinux/bfin-uclinux

  /opt/uClinux/bfin-linux-uclibc

  /opt/uClinux/bfin-linux-uclibc/bfin-linux-uclibc/runtime)

 

# search for programs in the build host directories                       

SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

# for libraries and headers in the target directories                     

SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

 

 

Thanks in advance for the help,

 

 

William

Outcomes