Reducing the number of files dependent on svnversion.h without

compromising qmake builds. Now it is required to directly include
svnversion.h to get the SVNVERSION macro defined.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3955 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2014-03-29 02:51:07 +00:00
parent 654571e23c
commit 4537ac471d
6 changed files with 18 additions and 8 deletions

View File

@ -8,14 +8,6 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMake/Modules)
include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake)
# creates svnversion.h using cmake script
add_custom_target (revisiontag
COMMAND ${CMAKE_COMMAND} -D SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -D OUTPUT_DIR=${PROJECT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/getsvn.cmake
COMMENT "Generating Subversion revision information"
VERBATIM
)
include_directories ("${PROJECT_BINARY_DIR}")
#
# Options & features
@ -645,10 +637,17 @@ add_custom_target (uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
# creates svnversion.h using cmake script
add_custom_target (revisiontag
COMMAND ${CMAKE_COMMAND} -D SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -D OUTPUT_DIR=${PROJECT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/getsvn.cmake
COMMENT "Generating Subversion revision information"
VERBATIM
)
# explicitly say that the executable depends on custom target, this is
# done indirectly so that the revisiontag target gets built exactly
# once per build
add_dependencies(wsjt revisiontag)
add_dependencies(wsjt_qt revisiontag)
add_dependencies(jt9 revisiontag)
add_dependencies(wsjtx revisiontag)
@ -660,6 +659,7 @@ configure_file (
"${PROJECT_SOURCE_DIR}/wsjtx_config.h.in"
"${PROJECT_BINARY_DIR}/wsjtx_config.h"
)
include_directories ("${PROJECT_BINARY_DIR}")
if (NOT WIN32 AND NOT APPLE)

View File

@ -8,6 +8,8 @@
#include <QDir>
#include <QDebug>
#include "svnversion.h"
#include "GetUserId.hpp"
#include "TraceFile.hpp"
#include "TestConfiguration.hpp"

View File

@ -12,6 +12,8 @@
#include <QDebug>
#include <QSortFilterProxyModel>
#include "svnversion.h"
#include "Bands.hpp"
#include "FrequencyList.hpp"
#include "Configuration.hpp"

View File

@ -19,6 +19,8 @@
#include <QDir>
#include <QStandardPaths>
#include "svnversion.h"
#include "SettingsGroup.hpp"
#include "TraceFile.hpp"
#include "mainwindow.h"

View File

@ -12,6 +12,8 @@
#include <QtConcurrent/QtConcurrentRun>
#endif
#include "svnversion.h"
#include "soundout.h"
#include "plotter.h"
#include "about.h"

2
svnversion.h Normal file
View File

@ -0,0 +1,2 @@
/* empty file for qmake compatibility with CMake which generates one
of these in the build tree that gets picked up in preference */