Debian Codegraph @

build/Linux+BSD/portable/ARM/jessie-crosscompile-armhf.cmake

raw
1 #Cross toolchain file for building QT project (specifically MuseScore)
2 #For use in Debian x86-64 + armhf with cross compiler
3
4 SET(CMAKE_SYSTEM_NAME Linux)
5 SET(CMAKE_SYSTEM_VERSION 1)
6 SET(ARCH armhf) # AppImage directory's name will include this string
7
8 # specify the cross compiler
9 SET(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
10 SET(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)
11 SET(ENV{PKG_CONFIG_PATH} /usr/lib/arm-linux-gnueabihf/pkgconfig)
12
13 # don't set CMAKE_STRIP, because doing so somehow causes CMakeCache to report nothing for CMAKE_STRIP:FILEPATH
14 #SET(CMAKE_STRIP /usr/bin/arm-linux-gnueabihf-strip)
15
16 # where is the target environment
17 SET(CMAKE_FIND_ROOT_PATH /lib/arm-linux-gnueabihf /usr/lib/arm-linux-gnueabihf /usr/include/arm-linux-gnueabihf)
18 SET(CMAKE_LIBRARY_PATH /usr/include/arm-linux-gnueabihf)
19
20 # Qt include directories
21 SET(QT_INCLUDE_DIR /usr/include/arm-linux-gnu)
22 SET(QT_QT_INCLUDE_DIR ${QT_INCLUDE_DIR}/qt5)
23 SET(QT_QTCORE_INCLUDE_DIR ${QT_QT_INCLUDE_DIR}/QtCore)
24 SET(QT_QTXML_INCLUDE_DIR ${QT_QT_INCLUDE_DIR}/QtXml)
25 SET(QT_QTGUI_INCLUDE_DIR ${QT_QT_INCLUDE_DIR}/QtGui)
26 SET(QT_QTNETWORK_INCLUDE_DIR ${QT_QT_INCLUDE_DIR}/QtNetwork)
27 SET(QT_QTUITOOLS_INCLUDE_DIR ${QT_QT_INCLUDE_DIR}/QtUiTools)
28 SET(QT_QTSCRIPT_INCLUDE_DIR ${QT_QT_INCLUDE_DIR}/QtScript)
29 SET(QT_QTWEBKIT_INCLUDE_DIR ${QT_QT_INCLUDE_DIR}/QtWebkit)
30 SET(QT_INCLUDES ${QT_INCLUDE_DIR} ${QT_QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTXML_INCLUDE_DIR} ${QT_GUI_INCLUDE_DIR} ${QT_QTNETWORK_INCLUDE_DIR} ${QT_QTWEBKIT_INCLUDE_DIR} )
31
32 # Qt libraries
33 SET(QT_LIBRARY_DIR ${CMAKE_LIBRARY_PATH})
34 SET(QT_CROSS_LIBRARIES QtSvg5 QtGui5 QtCore5 QtXml5 QtNetwork5 QtWebKit5 QtXmlPatterns5 QtDeclarative5)
35
36 # Qt binaries
37 SET(QT_BINARY_DIR /usr/lib/arm-linux-gnueabihf/qt5/bin)
38 SET(QT_MOC_EXECUTABLE ${QT_BINARY_DIR}/moc)
39 SET(QT_UIC_EXECUTABLE ${QT_BINARY_DIR}/uic)
40 SET(QT_QMAKE_EXECUTABLE ${QT_BINARY_DIR}/qmake)
41 SET(QT_RCC_EXECUTABLE ${QT_BINARY_DIR}/rcc)
42 SET(QT_LRELEASE_EXECUTABLE ${QT_BINARY_DIR}/lrelease)
43
44 # search for programs in the build host directories
45 SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
46
47 # for libraries and headers in the target directories
48 SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
49 SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
50
51 # Audio library include dirs (not usre this is being used)
52 SET(LAME_INCLUDE_DIR /usr/include/lame)