Protect path with space in it.
authorRomain Forlot <romain.forlot@iot.bzh>
Thu, 23 Nov 2017 08:55:21 +0000 (09:55 +0100)
committerRomain Forlot <romain.forlot@iot.bzh>
Thu, 23 Nov 2017 08:55:21 +0000 (09:55 +0100)
Bug-AGL: SPEC-1117

Change-Id: I36ba8047c3dc722c6c99ecbd90e14d5d717cb808
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
cmake/cmake.d/01-build_options.cmake
cmake/cmake.d/02-variables.cmake
samples.d/config.cmake.sample

index 04c53c7..602cc58 100644 (file)
@@ -75,17 +75,6 @@ foreach(option ${RELEASE_COMPILE_OPTIONS})
        add_compile_options($<$<CONFIG:PROFILING>:${option}>)
 endforeach()
 
-# Env variable overload default
-# Disabled by default now. Tell me if you need really it
-# but you should not have needs for that since you can
-# set CMAKE_INSTALL_PREFIX in your config.cmake.
-#if(DEFINED ENV{INSTALL_PREFIX})
-#      set(INSTALL_PREFIX $ENV{INSTALL_PREFIX} CACHE PATH "The path where to install")
-#else()
-#      set(INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/Install" CACHE PATH "The path where to install")
-#endif()
-#set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX} CACHE PATH "Installation Prefix")
-
 # Loop on required package and add options
 foreach (PKG_CONFIG ${PKG_REQUIRED_LIST})
        string(REGEX REPLACE "[<>]?=.*$" "" XPREFIX ${PKG_CONFIG})
@@ -110,7 +99,7 @@ ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG AND USE_EFENCE)
 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(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()
index ac5c05e..b906152 100644 (file)
@@ -86,8 +86,8 @@ if(NOT ${DIRTY_FLAG})
 set(PROJECT_VERSION "${PROJECT_VERSION}-dirty")
 endif()
 
-set(PROJECT_LIBDIR "${CMAKE_SOURCE_DIR}/libs" CACHE PATH "Subpath to libraries")
-set(PROJECT_RESOURCES "${CMAKE_SOURCE_DIR}/data" CACHE PATH "Subpath to data")
+set(PROJECT_LIBDIR "\"${CMAKE_SOURCE_DIR}/libs\"" CACHE PATH "Subpath to libraries")
+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")
index 5c2b440..7444a7c 100644 (file)
@@ -132,8 +132,8 @@ set(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib)
 
 # Optional location for config.xml.in
 # -----------------------------------
-#set(WIDGET_ICON conf.d/wgt/${PROJECT_ICON} CACHE PATH "Path to the widget icon")
-#set(WIDGET_CONFIG_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/conf.d/wgt/config.xml.in CACHE PATH "Path to widget config file template (config.xml.in)")
+#set(WIDGET_ICON "\"conf.d/wgt/${PROJECT_ICON}\"" CACHE PATH "Path to the widget icon")
+#set(WIDGET_CONFIG_TEMPLATE "\"${CMAKE_CURRENT_SOURCE_DIR}/conf.d/wgt/config.xml.in\"" CACHE PATH "Path to widget config file template (config.xml.in)")
 
 # Mandatory widget Mimetype specification of the main unit
 # --------------------------------------------------------------------------