diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2011-05-08 17:45:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-11 16:09:56 +0100 |
commit | ee98c2b095b991901b6c2125b2428985c873b4bd (patch) | |
tree | 561ec216073fbffb7665e61d9d9169aafe27a7bf /meta/classes/cmake.bbclass | |
parent | 701a725d118c1a2edd1e54798d85e864b45e19a2 (diff) | |
download | openembedded-core-ee98c2b095b991901b6c2125b2428985c873b4bd.tar.gz openembedded-core-ee98c2b095b991901b6c2125b2428985c873b4bd.tar.bz2 openembedded-core-ee98c2b095b991901b6c2125b2428985c873b4bd.zip |
cmake.bbclass: fix qmake and rpath issues
Sync with OE at 3b7d83362027fde4f6850533ab83277d95dda961 however
without changing the way of generating the toolchain file and making
it branding agnostic.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'meta/classes/cmake.bbclass')
-rw-r--r-- | meta/classes/cmake.bbclass | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass index a4b0c126a2..011c2324c8 100644 --- a/meta/classes/cmake.bbclass +++ b/meta/classes/cmake.bbclass @@ -24,15 +24,18 @@ OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${TARGET_CPPFLAGS} -f OECMAKE_C_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} -DNDEBUG" OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} -DNDEBUG" +OECMAKE_RPATH ?= "" + cmake_do_generate_toolchain_file() { cat > ${WORKDIR}/toolchain.cmake <<EOF # CMake system name must be something like "Linux". # This is important for cross-compiling. set( CMAKE_SYSTEM_NAME `echo ${SDK_OS} | sed 's/^./\u&/'` ) +set( CMAKE_SYSTEM_PROCESSOR ${TARGET_ARCH} ) set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} ) set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} ) -set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "poky CFLAGS" ) -set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "poky CXXFLAGS" ) +set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" ) +set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" ) set( CMAKE_C_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "CFLAGS for release" ) set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLAGS for release" ) @@ -43,6 +46,13 @@ set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) +# Use qt.conf settings +set( ENV{QT_CONF_PATH} ${WORKDIR}/qt.conf ) + +# We need to set the rpath to the correct directory as cmake does not provide any +# directory as rpath by default +set( CMAKE_INSTALL_RPATH ${OECMAKE_RPATH} ) + # Use native cmake modules set( CMAKE_MODULE_PATH ${STAGING_DATADIR}/cmake/Modules/ ) EOF |