Commit f568a20b authored by Bastien Jacquet's avatar Bastien Jacquet
Browse files

Make Superbuild use git version

parent 4960b3b6
......@@ -12,9 +12,9 @@ include(CMakeDependentOption)
include(CheckTypeSize)
check_type_size(void* VOID_PTR_SIZE BUILTIN_TYPES_ONLY)
if (VOID_PTR_SIZE EQUAL 8)
set (64bit_build TRUE)
set(VV_BUILD_ARCHITECTURE "64")
else ()
set (64bit_build FALSE)
set(VV_BUILD_ARCHITECTURE "32")
endif()
set (platform)
......@@ -30,12 +30,7 @@ endif()
# Set suffix to be used for generating archives. This ensures that the package
# files have decent names that we can directly upload to the website.
set (package_suffix "${CMAKE_SYSTEM_NAME}")
if (64bit_build)
set (package_suffix "${package_suffix}-64bit")
else ()
set (package_suffix "${package_suffix}-32bit")
endif()
set (package_suffix "${CMAKE_SYSTEM_NAME}-${VV_BUILD_ARCHITECTURE}bit")
#-----------------------------------------------------------------------------
# Setup CMAKE_MODULE_PATH so that platform specific configurations are processed
......@@ -46,6 +41,7 @@ set (CMAKE_MODULE_PATH
"${SuperBuild_PROJECTS_DIR}"
"${SuperBuild_CMAKE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/../CMake"
${CMAKE_MODULE_PATH})
#-----------------------------------------------------------------------------
......
......@@ -3,6 +3,6 @@ add_external_project_or_use_system(boost
CONFIGURE_COMMAND
<SOURCE_DIR>/bootstrap.sh --prefix=<INSTALL_DIR>
--with-libraries=date_time,thread,regex,system,program_options,filesystem,iostreams
BUILD_COMMAND <SOURCE_DIR>/bjam address-model=64 threading=multi
INSTALL_COMMAND <SOURCE_DIR>/bjam address-model=64 threading=multi --prefix=<INSTALL_DIR> install
BUILD_COMMAND <SOURCE_DIR>/bjam address-model=${VV_BUILD_ARCHITECTURE} threading=multi
INSTALL_COMMAND <SOURCE_DIR>/bjam address-model=${VV_BUILD_ARCHITECTURE} threading=multi --prefix=<INSTALL_DIR> install
)
......@@ -72,7 +72,7 @@ add_external_project_or_use_system(
${patch_command}
)
if ((NOT 64bit_build) AND UNIX AND (NOT APPLE))
if ((VV_BUILD_ARCHITECTURE EQUAL 32) AND UNIX AND (NOT APPLE))
# on 32-bit builds, we are incorrectly ending with QT_POINTER_SIZE chosen as
# 8 (instead of 4) with GCC4.1 toolchain on old debians. This patch overcomes
# that.
......
# Sets VV_VERSION_{MAJOR,MINOR,PATCH}
include(${VeloViewSuperBuild_SOURCE_DIR}/../CMake/version.cmake)
set(VV_VERSION "${VV_VERSION_MAJOR}.${VV_VERSION_MINOR}")
set(VV_VERSION_SUFFIX)
# Include CMake scripts for geting the version from Git
include(Git)
include(ParaViewDetermineVersion)
# Sets VV_VERSION_{MAJOR,MINOR,PATCH} for git
file(STRINGS ${VeloViewSuperBuild_SOURCE_DIR}/../version.txt version_txt)
extract_version_components("${version_txt}" "VV")
determine_version(${VeloViewSuperBuild_SOURCE_DIR} ${GIT_EXECUTABLE} "VV")
# Sets GD_YEAR, GD_MONTH, GD_DAY
include(${VeloViewSuperBuild_SOURCE_DIR}/Projects/getdate.cmake)
......@@ -16,16 +17,13 @@ set(CPACK_PACKAGE_NAME "VeloView")
set(CPACK_PACKAGE_VENDOR "Velodyne Lidar")
set(CPACK_PACKAGE_VERSION_MAJOR ${VV_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VV_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VV_VERSION_PATCH})
if (VV_VERSION_SUFFIX)
set(CPACK_PACKAGE_VERSION_PATCH ${VV_VERSION_PATCH}-${VV_VERSION_SUFFIX})
set(CPACK_PACKAGE_VERSION_PATCH ${VV_VERSION_PATCH}-${VV_VERSION_PATCH_EXTRA})
else()
set(CPACK_PACKAGE_VERSION_PATCH ${VV_VERSION_PATCH})
endif()
set(CPACK_RESOURCE_FILE_LICENSE "${VeloViewSuperBuild_SOURCE_DIR}/LICENSE")
#set(CPACK_PACKAGE_FILE_NAME
# "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${package_suffix}")
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${PACKAGE_TIMESTAMP}-${package_suffix}")
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_FULL}-${PACKAGE_TIMESTAMP}-${package_suffix}")
set(boost_address_model 32)
if (64bit_build)
set(boost_address_model 64)
endif()
add_external_project_or_use_system(boost
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND
<SOURCE_DIR>/bootstrap.bat
BUILD_COMMAND <SOURCE_DIR>/b2
address-model=${boost_address_model} --prefix=<INSTALL_DIR> --with-regex --with-system --with-date_time --with-program_options --with-iostreams --with-filesystem --with-thread install
address-model=${VV_BUILD_ARCHITECTURE} --prefix=<INSTALL_DIR> --with-regex --with-system --with-date_time --with-program_options --with-iostreams --with-filesystem --with-thread install
INSTALL_COMMAND ""
)
......@@ -64,7 +64,7 @@ install(FILES "${VeloViewSuperBuild_SOURCE_DIR}/../Documentation/VeloView_Develo
#------------------------------------------------------------------------------
set (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_LIST_DIR}/InstallerIcon.ico")
if (64bit_build)
if (VV_BUILD_ARCHITECTURE EQUAL 64)
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
endif()
......
......@@ -9,7 +9,7 @@
# endif()
if (WIN32)
if (64bit_build)
if (VV_BUILD_ARCHITECTURE EQUAL 64)
add_revision(python
URL "http://www.paraview.org/files/dependencies/python+deps.tar.bz2"
URL_MD5 "4318b8f771eda5606d9ce7f0be9f82e1")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment