summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/cmake.d/01-variables.cmake6
-rw-r--r--cmake/cmake.d/03-extra_targets.cmake6
2 files changed, 5 insertions, 7 deletions
diff --git a/cmake/cmake.d/01-variables.cmake b/cmake/cmake.d/01-variables.cmake
index 356ffb8..1bba5ce 100644
--- a/cmake/cmake.d/01-variables.cmake
+++ b/cmake/cmake.d/01-variables.cmake
@@ -50,8 +50,6 @@ set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON CACHE BOOLEAN "Flag for using prefix pat
# Native packaging name
set(NPKG_PROJECT_NAME agl-${PROJECT_NAME})
-#No upercase in deb packaging name
-string(TOLOWER ${NPKG_PROJECT_NAME} NPKG_PROJECT_NAME)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "the type of build")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@@ -125,7 +123,7 @@ set(ARCHIVE_OUTPUT ${ARCHIVE_OUTPUT_ARCHIVE}.gz)
set(TMP_ARCHIVE_SUBMODULE ${PROJECT_PKG_ENTRY_POINT}/${NPKG_PROJECT_NAME}-sub)
set(CMD_ARCHIVE_SUBMODULE \'git archive --verbose --prefix=${NPKG_PROJECT_NAME}-${PROJECT_VERSION}/$$path/ --format tar HEAD --output ${TMP_ARCHIVE_SUBMODULE}-$$sha1.tar\' )
-if(OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT})
+if(OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
# build deb spec file from template
set(PACKAGING_DEB_OUTPUT_DSC ${PROJECT_PKG_ENTRY_POINT}/${NPKG_PROJECT_NAME}.dsc)
set(PACKAGING_DEB_OUTPUT_INSTALL ${PROJECT_PKG_ENTRY_POINT}/debian.${NPKG_PROJECT_NAME}.install)
@@ -133,4 +131,4 @@ if(OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT})
set(PACKAGING_DEB_OUTPUT_COMPAT ${PROJECT_PKG_ENTRY_POINT}/debian.compat)
set(PACKAGING_DEB_OUTPUT_CONTROL ${PROJECT_PKG_ENTRY_POINT}/debian.control)
set(PACKAGING_DEB_OUTPUT_RULES ${PROJECT_PKG_ENTRY_POINT}/debian.rules)
-endif(OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT})
+endif()
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()