summaryrefslogtreecommitdiffstats
path: root/cmake/cmake.d/03-extra_targets.cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-29 15:13:21 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commit797a196cdcfaac621e9b1bb75e39b8788acb356a (patch)
treee5e3d3d8b2500f48a2b16d132515babcac258ccb /cmake/cmake.d/03-extra_targets.cmake
parentcede676724399dc755e9b8b984166cc48f0b35ca (diff)
Adding detection of a Yocto build environment
Change-Id: Id6a94153ada5b98a4a6d564859da8617ac636704 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh> # Conflicts: # cmake/cmake.d/01-variables.cmake
Diffstat (limited to 'cmake/cmake.d/03-extra_targets.cmake')
-rw-r--r--cmake/cmake.d/03-extra_targets.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/cmake.d/03-extra_targets.cmake b/cmake/cmake.d/03-extra_targets.cmake
index a90238c..7804c8b 100644
--- a/cmake/cmake.d/03-extra_targets.cmake
+++ b/cmake/cmake.d/03-extra_targets.cmake
@@ -85,7 +85,7 @@ foreach (PKG_CONFIG ${PKG_REQUIRED_LIST})
# package providing the pkg-cong file ${XPREFIX}.pc, we need
# to test the OS release package type
# Only doable within a native environment not under SDK
- if( OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT})
+ if( OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
execute_process(
COMMAND dpkg -S *${XPREFIX}.pc
OUTPUT_VARIABLE TMP_PKG_BIN
@@ -110,7 +110,7 @@ add_custom_command(OUTPUT ${PACKAGING_SPEC_OUTPUT}
# package providing the pkg-cong file ${XPREFIX}.pc, we need
# to test the OS release package type
# Only doable within a native environment not under SDK
-if(OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT})
+if(OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
add_custom_command(OUTPUT ${PACKAGING_DEB_OUTPUT_DSC}
${PACKAGING_DEB_OUTPUT_INSTALL}
${PACKAGING_DEB_OUTPUT_CHANGELOG}
@@ -145,7 +145,7 @@ add_dependencies(packaging packaging_rpm)
if(TARGET packaging_wgt)
add_dependencies(packaging packaging_wgt)
endif()
-if(OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT})
+if(OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
# Target to add dependencies indirectly to "packaging" target.
add_dependencies(packaging packaging_deb)
endif()