From 6777484a825818be8f33e33f253a7d8f5ad6ef07 Mon Sep 17 00:00:00 2001 From: marco <marco@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Tue, 13 Jul 2010 08:07:35 +0000 Subject: [PATCH] silence warning about not being an svn checkout git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2556 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- cmake_support/Deployment.cmake | 9 ++++++--- cmake_support/OST.cmake | 14 +++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/cmake_support/Deployment.cmake b/cmake_support/Deployment.cmake index 8f59a7dd4..c8acd43f0 100644 --- a/cmake_support/Deployment.cmake +++ b/cmake_support/Deployment.cmake @@ -7,14 +7,17 @@ set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/ReadMe.txt") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt") set(CPACK_PACKAGE_VERSION_MAJOR "1") set(CPACK_PACKAGE_VERSION_MINOR "0") -set(CPACK_PACKAGE_VERSION_PATCH "0a1_${OST_REV}") +if (OST_REV) + set(CPACK_PACKAGE_VERSION_PATCH "0a1_${OST_REV}") +else() + set(CPACK_PACKAGE_VERSION_PATCH "0a1") +endif() set(OST_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") -message("building OST version: ${OST_VERSION}") set(CPACK_PACKAGE_INSTALL_DIRECTORY "openstructure ${OST_VERSION}" ) IF(WIN32 AND NOT UNIX) # There is a bug in NSI that does not handle full unix paths properly. Make -# sure there is at least one set of four (4) backlasshes. +# sure there is at least one set of four (4) backlashes. set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/graphics/\\\\icon_32.png") #set(CPACK_NSIS_INSTALLED_ICON_NAME "bin/\\\\gosty.exe") set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") diff --git a/cmake_support/OST.cmake b/cmake_support/OST.cmake index e46d6f53c..9d928f6c9 100644 --- a/cmake_support/OST.cmake +++ b/cmake_support/OST.cmake @@ -629,10 +629,12 @@ endmacro() macro(get_ost_rev) if (NOT OST_REV) if (NOT WIN32) - exec_program("svn" - ARGS "info |grep Revision|awk '{print $2}'" - OUTPUT_VARIABLE OST_REV - ) + if (EXISTS .svn) + exec_program("svn" + ARGS "info |grep Revision|awk '{print $2}'" + OUTPUT_VARIABLE OST_REV + ) + endif() else() exec_program("svnversion.exe" ARGS "" @@ -642,5 +644,7 @@ macro(get_ost_rev) string(REGEX REPLACE "[A-Za-z]" "" OST_REV ${OST_REV}) endif() endif() - message("Revision: ${OST_REV}") + if (OST_REV) + message("Revision: ${OST_REV}") + endif() endmacro() -- GitLab