diff options
Diffstat (limited to 'cmake/cmake.d/01-variables.cmake')
-rw-r--r-- | cmake/cmake.d/01-variables.cmake | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/cmake/cmake.d/01-variables.cmake b/cmake/cmake.d/01-variables.cmake index 570cb4a..8ee4dff 100644 --- a/cmake/cmake.d/01-variables.cmake +++ b/cmake/cmake.d/01-variables.cmake @@ -45,6 +45,9 @@ if(NOT WIN32) set(BoldWhite "${Esc}[1;37m") endif() +# (BUG!!!) as PKG_CONFIG_PATH does not work [should be en env variable] +set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON CACHE BOOLEAN "Flag for using prefix path") + # Native packaging name set(NPKG_PROJECT_NAME agl-${PROJECT_NAME}) @@ -55,7 +58,7 @@ set(CMP0048 1) # Get the os type # Used to package .deb if(EXISTS "/etc/os-release") - execute_process(COMMAND grep ID_LIKE /etc/os-release + execute_process(COMMAND grep -E "^ID(=|_LIKE=)" /etc/os-release OUTPUT_VARIABLE TMP_OSRELEASE ) if (NOT TMP_OSRELEASE STREQUAL "") @@ -77,6 +80,9 @@ set(PROJECT_RESOURCES "${CMAKE_SOURCE_DIR}/data" CACHE PATH "Subpath to data") set(AFB_TOKEN "" CACHE PATH "Default AFB_TOKEN") set(AFB_REMPORT "1234" CACHE PATH "Default AFB_TOKEN") +# Project path variables +# ---------------------- + # If no install dir try to guess some smart default if(BINDINGS_INSTALL_PREFIX) set(BINDINGS_INSTALL_DIR ${BINDINGS_INSTALL_PREFIX}/${PROJECT_NAME} CACHE PATH "Where the binding will be installed in your system") @@ -93,6 +99,7 @@ else() set(PROJECT_PKG_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/${PKGOUT_DIR} CACHE PATH "Application contents to be packaged") endif() +# Paths to templates files set (PKG_TEMPLATE_PREFIX ${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR} CACHE PATH "Default Package Templates Directory") set(SSH_TEMPLATE_DIR "${PKG_TEMPLATE_PREFIX}/ssh" CACHE PATH "Subpath to a directory where are stored needed files to launch on remote target to debuging purposes") set(GDB_TEMPLATE_DIR "${PKG_TEMPLATE_PREFIX}/gdb" CACHE PATH "Subpath to a directory where are stored needed files to launch debuging server on a remote target. Use gdbserver.") @@ -106,13 +113,17 @@ set(DEB_TEMPLATE_DIR "${PKG_TEMPLATE_PREFIX}/deb" CACHE PATH "Subpath to a direc string(REGEX REPLACE "^(.*)/.*$" "\\1" ENTRY_POINT "${PKG_TEMPLATE_PREFIX}") set(PROJECT_PKG_ENTRY_POINT ${ENTRY_POINT}/packaging CACHE PATH "Where package build files, like rpm.spec file or config.xml, are write.") +# Path to autobuild template +set(PROJECT_TEMPLATE_AGL_AUTOBUILD_DIR ${CMAKE_SOURCE_DIR}/conf.d/autobuild/agl CACHE PATH "Subpath to a directory where are stored autobuild script") +set(PROJECT_TEMPLATE_LINUX_AUTOBUILD_DIR ${CMAKE_SOURCE_DIR}/conf.d/autobuild/linux CACHE PATH "Subpath to a directory where are stored autobuild script") + # Archive target variables set(ARCHIVE_OUTPUT_ARCHIVE ${PROJECT_PKG_ENTRY_POINT}/${NPKG_PROJECT_NAME}_${PROJECT_VERSION}.orig.tar) 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") +if(OSRELEASE MATCHES "debian" AND NOT DEFINED $ENV{SDKTARGETSYSROOT}) # 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) @@ -120,4 +131,4 @@ if(OSRELEASE MATCHES "debian") 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")
\ No newline at end of file +endif(OSRELEASE MATCHES "debian" AND NOT DEFINED $ENV{SDKTARGETSYSROOT})
\ No newline at end of file |