Diff of /CMakeLists.txt [b5f9fb] .. [86f397]  Maximize  Restore

Switch to side-by-side view

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,21 +8,29 @@
 
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules )
 
-set(ARCH_TRIPLET)
-if(UNIX)
-  FIND_PROGRAM(DPKG_ARCHITECTURE_EXECUTABLE dpkg-architecture)
-  if(DPKG_ARCHITECTURE_EXECUTABLE)
-    EXECUTE_PROCESS(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
-      OUTPUT_VARIABLE ARCH_TRIPLET
-      ERROR_VARIABLE ERROR_ARCH_TRIPLET
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
+##
+## Cleaner Debian Packaging (disable by -DDISABLE_DPKG=ON)
+##
+OPTION (DISABLE_DPKG "Do not use debian scripts to get package dependences" OFF)
+
+
+IF(NOT DISABLE_DPKG)
+  set(ARCH_TRIPLET)
+  if(UNIX)
+    FIND_PROGRAM(DPKG_ARCHITECTURE_EXECUTABLE dpkg-architecture)
+    if(DPKG_ARCHITECTURE_EXECUTABLE)
+      EXECUTE_PROCESS(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
+        OUTPUT_VARIABLE ARCH_TRIPLET
+        ERROR_VARIABLE ERROR_ARCH_TRIPLET
+        OUTPUT_STRIP_TRAILING_WHITESPACE)
+    endif()
   endif()
-endif()
-if(ARCH_TRIPLET)
-  set(SYSTEM_LIB_DIRS /usr/lib /usr/lib/${ARCH_TRIPLET} /usr/local/lib)
-else()
-  set(SYSTEM_LIB_DIRS /usr/lib /usr/local/lib)
-endif()
+  if(ARCH_TRIPLET)
+    set(SYSTEM_LIB_DIRS /usr/lib /usr/lib/${ARCH_TRIPLET} /usr/local/lib)
+  else()
+    set(SYSTEM_LIB_DIRS /usr/lib /usr/local/lib)
+  endif()
+ENDIF()
 
 include(HuginMacros)
 include(CheckIncludeFiles)
@@ -32,7 +40,7 @@
 
 # version
 set(V_MAJOR 2011)
-set(V_MINOR 2)
+set(V_MINOR 3)
 set(V_PATCH 0)
 
 #
@@ -544,7 +552,13 @@
 
 SET(CPACK_PACKAGE_VERSION_MAJOR "${V_MAJOR}")
 SET(CPACK_PACKAGE_VERSION_MINOR "${V_MINOR}")
-SET(CPACK_PACKAGE_VERSION_PATCH "${V_PATCH}.${CPACK_PACKAGE_VERSION_PATCH}")
+
+IF(NOT DISABLE_DPKG)
+  SET(CPACK_PACKAGE_VERSION_PATCH "${V_PATCH}.${CPACK_PACKAGE_VERSION_PATCH}")
+ELSE()
+  SET(CPACK_PACKAGE_VERSION_PATCH "${V_PATCH}.${CPACK_PACKAGE_VERSION_PATCH}.local")
+ENDIF()
+
 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${V_MAJOR}.${V_MINOR}")
 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "hugin-${V_MAJOR}.${V_MINOR}.${V_PATCH}")
 SET(CPACK_SOURCE_GENERATOR "TGZ;TBZ2")
@@ -610,8 +624,14 @@
 "/\\\\.hg/"
  )
 
-# Use dpkg-shlibdeps to get the needed dependences
-SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
+IF(NOT DISABLE_DPKG)
+  # Use dpkg-shlibdeps to get the needed dependences
+  SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
+ELSE()
+  # incomplete manually set dependencies but we don't really care since this package is not for distribution
+  # and whoever use the DISABLE_DPKG option knows what they are doing
+  SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpano13(>=2.9.17)")
+ENDIF()
 
 SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/Debian/postinst")
 INCLUDE(CPack)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks