diff --git a/cmake_support/Deployment.cmake b/cmake_support/Deployment.cmake index 8f59a7dd4f229a4484050af8728363ffedc83f15..c8acd43f014c998c567819e799cbad3f7863b84b 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 e46d6f53ca1474b85366ba2def8ef28a518c55c5..9d928f6c946de5ce7a3c3f1d64991a98b2392d02 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()