DRTVWR-418: Set AUTOBUILD_ADDRSIZE for packages-formatter.py.

This handles the case of building within an IDE, in which AUTOBUILD_ADDRSIZE
isn't already set.
master
Nat Goodspeed 2016-12-06 11:48:43 -05:00
parent e6b9174bba
commit bae76ec8df
1 changed files with 8 additions and 1 deletions

View File

@ -2,9 +2,16 @@
# Construct the version and copyright information based on package data.
include(Python)
# packages-formatter.py runs autobuild install --versions, which needs to know
# the build_directory, which (on Windows) depends on AUTOBUILD_ADDRSIZE.
# Within an autobuild build, AUTOBUILD_ADDRSIZE is already set. But when
# building in an IDE, it probably isn't. Set it explicitly using
# run_build_test.py.
add_custom_command(OUTPUT packages-info.txt
COMMENT Generating packages-info.txt for the about box
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml
DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py > packages-info.txt
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE}
${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py > packages-info.txt
)