aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-11-23 19:40:35 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-11-23 19:40:35 +0100
commite40a8546ddf015c03f93f06873b8975467bc1168 (patch)
tree379bce2bdd1ad92a2ca55911d691615e127982df
parent0487d4437607155c619bcb662aac3fd32a101824 (diff)
CMake doesn't path protection.
Keep using a classic CMake variable not escape with quote for path PKG_TEMPLATE_PREFIX else path isn't correct for internal cmake usage. Change-Id: I9ebff240e28c5cc8922ff6bbc5e6c14a62997f65 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--cmake/cmake.d/01-build_options.cmake2
-rw-r--r--cmake/cmake.d/02-variables.cmake6
2 files changed, 5 insertions, 3 deletions
diff --git a/cmake/cmake.d/01-build_options.cmake b/cmake/cmake.d/01-build_options.cmake
index 602cc58..b55df59 100644
--- a/cmake/cmake.d/01-build_options.cmake
+++ b/cmake/cmake.d/01-build_options.cmake
@@ -100,6 +100,8 @@ INCLUDE_DIRECTORIES(${EXTRA_INCLUDE_DIRS})
# Default Linkflag
set(PKG_TEMPLATE_PREFIX "\"${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}\"" CACHE PATH "Default Package Templates Directory")
+set(BARE_PKG_TEMPLATE_PREFIX "${CMAKE_SOURCE_DIR}/${PROJECT_APP_TEMPLATES_DIR}" CACHE PATH "Default Package Templates Directory")
+
if(NOT BINDINGS_LINK_FLAG)
set(BINDINGS_LINK_FLAG "-Wl,--version-script=${PKG_TEMPLATE_PREFIX}/cmake/export.map")
endif()
diff --git a/cmake/cmake.d/02-variables.cmake b/cmake/cmake.d/02-variables.cmake
index b906152..f01114d 100644
--- a/cmake/cmake.d/02-variables.cmake
+++ b/cmake/cmake.d/02-variables.cmake
@@ -62,7 +62,7 @@ execute_process(COMMAND git describe --abbrev=0
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(COMMAND git describe --abbrev=0
- WORKING_DIRECTORY ${PKG_TEMPLATE_PREFIX}
+ WORKING_DIRECTORY ${BARE_PKG_TEMPLATE_PREFIX}
OUTPUT_VARIABLE APP_TEMPLATES_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
@@ -133,9 +133,9 @@ else()
endif()
# Paths to templates files
-set(TEMPLATE_DIR "${PKG_TEMPLATE_PREFIX}/template.d" CACHE PATH "Subpath to a directory where are stored needed files to launch on remote target to debuging purposes")
+set(TEMPLATE_DIR "${BARE_PKG_TEMPLATE_PREFIX}/template.d" CACHE PATH "Subpath to a directory where are stored needed files to launch on remote target to debuging purposes")
-string(REGEX REPLACE "^(.*)/.*$" "\\1" ENTRY_POINT "${PKG_TEMPLATE_PREFIX}")
+string(REGEX REPLACE "^(.*)/.*$" "\\1" ENTRY_POINT "${BARE_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.")
set(WIDGET_ICON "${ENTRY_POINT}/wgt/${PROJECT_ICON}" CACHE PATH "Path to the widget icon")