1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Fix building with openembedded

This commit is contained in:
Carles Fernandez 2016-12-20 03:02:43 +01:00
parent 4a02a1d294
commit 5279c2410e

View File

@ -39,7 +39,9 @@ if(NOT ${GTEST_DIR_LOCAL})
# if GTEST_DIR is not defined, we download and build it
set(gtest_RELEASE 1.8.0)
set(TOOLCHAIN_ARG "")
set(GTEST_COMPILER "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
set(GTEST_COMPILER "")
set(TOOLCHAIN_ARG -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/Toolchains/oe-sdk_cross.cmake)
endif(EXISTS $ENV{OECORE_TARGET_SYSROOT})
ExternalProject_Add(
@ -48,7 +50,7 @@ if(NOT ${GTEST_DIR_LOCAL})
GIT_TAG release-${gtest_RELEASE}
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${gtest_RELEASE}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${gtest_RELEASE}
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_GTEST=ON -DBUILD_GMOCK=OFF ${TOOLCHAIN_ARG}
CMAKE_ARGS ${GTEST_COMPILER} -DBUILD_GTEST=ON -DBUILD_GMOCK=OFF ${TOOLCHAIN_ARG}
UPDATE_COMMAND ""
PATCH_COMMAND ""
INSTALL_COMMAND ""