make: allows to build in source tree by filtering subdirs 92/34492/1 sandbox/pcoval/tizen tizen submit/contrib_common/20150129.084750
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>
Thu, 15 Jan 2015 17:24:52 +0000 (18:24 +0100)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Wed, 28 Jan 2015 09:13:57 +0000 (10:13 +0100)
Without it FTBFS and displays this error message :

  cmake . && make
  (...)
  The source directory
  (...) src/CMakeFiles
  does not contain a CMakeLists.txt file.

Change-Id: I08efc4667d1004a5d19575dd4464dcd89d03fb28
Bug: https://github.com/intel-iot-devkit/upm/pull/75
Origin: https://github.com/intel-iot-devkit/upm/pull/75
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
src/CMakeLists.txt

index 758291b..36f749c 100644 (file)
@@ -125,5 +125,7 @@ endmacro(upm_module_init)
 
 subdirlist(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR})
 foreach(subdir ${SUBDIRS})
-    add_subdirectory(${subdir})
+    if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt)
+        add_subdirectory(${subdir})
+    endif()
 endforeach()