[Jderobot-admin] jderobot-r1143 - trunk
rocapal en jderobot.org
rocapal en jderobot.org
Sab Ene 11 10:32:36 CET 2014
Author: rocapal
Date: 2014-01-11 10:32:36 +0100 (Sat, 11 Jan 2014)
New Revision: 1143
Modified:
trunk/CMakeLists.txt
Log:
#21 ready to build debian package
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2014-01-11 09:25:03 UTC (rev 1142)
+++ trunk/CMakeLists.txt 2014-01-11 09:32:36 UTC (rev 1143)
@@ -18,6 +18,24 @@
set(list_of_dirs "")
foreach(dir ${sub-dir})
if(IS_DIRECTORY ${curdir}/${dir})
+ if (${return_relative})
+ if (NOT ${dir} MATCHES "CMakeFiles" AND NOT ${dir} MATCHES ".svn")
+ set(list_of_dirs ${list_of_dirs} ${dir})
+ endif()
+ else()
+ set(list_of_dirs ${list_of_dirs} ${curdir}/${dir})
+ endif()
+ endif()
+ endforeach()
+ set(${retval} ${list_of_dirs})
+endmacro()
+
+# MACRO to get the list subdir of other path distinct to current path
+macro(list_subdirectories2 retval curdir return_relative)
+ file(GLOB sub-dir RELATIVE ${curdir} ${curdir}*)
+ set(list_of_dirs "")
+ foreach(dir ${sub-dir})
+ if(IS_DIRECTORY ${curdir}/${dir})
if (${return_relative})
if (NOT ${dir} MATCHES "CMakeFiles" AND NOT ${dir} MATCHES ".svn")
set(list_of_dirs ${list_of_dirs} ${dir})
@@ -136,11 +154,13 @@
ENDFOREACH(currentSourceFile)
# Install Executables
-FOREACH (currentBin ${COMPONENTS})
+list_subdirectories2( LIST_COMPONENTS ${CMAKE_CURRENT_SOURCE_DIR}/src/stable/components/ 1)
+
+FOREACH (currentBin ${LIST_COMPONENTS})
#SET(EXIST EXIST-NOTFOUND)
- #find_file(EXIST NAMES ${currentBin} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/src/components/${currentBin})
+ find_file(EXIST NAMES ${currentBin} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/src/components/${currentBin})
#IF (EXIST)
- INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/stable/components/${currentBin}/${currentBin} DESTINATION /usr/local/bin OPTIONAL PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
+ INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/stable/components/${currentBin}/${currentBin} DESTINATION /usr/local/bin OPTIONAL PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
#ENDIF(EXIST)
#MESSAGE("${EXIST}")
ENDFOREACH(currentBin)
@@ -227,11 +247,10 @@
SET (CPACK_DEBIAN_PACKAGE_PRIORITY "extra")
SET (CPACK_DEBIAN_PACKAGE_SECTION "net")
-#SET (CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
dpkg_arch(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+#MESSAGE("Dependencias: ${DEPS}")
-MESSAGE("Dependencias: ${DEPS}")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${DEPS}")
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
More information about the Jderobot-admin
mailing list