diff --git a/CMakeLists.txt b/CMakeLists.txt index f920c843d..575d146de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/ConfigTest.cpp b/ConfigTest.cpp index 1d596c861..ea3fbedb5 100644 --- a/ConfigTest.cpp +++ b/ConfigTest.cpp @@ -8,6 +8,8 @@ #include #include +#include "svnversion.h" + #include "GetUserId.hpp" #include "TraceFile.hpp" #include "TestConfiguration.hpp" diff --git a/TestConfiguration.cpp b/TestConfiguration.cpp index da41cbd27..150f289bd 100644 --- a/TestConfiguration.cpp +++ b/TestConfiguration.cpp @@ -12,6 +12,8 @@ #include #include +#include "svnversion.h" + #include "Bands.hpp" #include "FrequencyList.hpp" #include "Configuration.hpp" diff --git a/main.cpp b/main.cpp index 6e5c2cb70..5eaa1f5bd 100644 --- a/main.cpp +++ b/main.cpp @@ -19,6 +19,8 @@ #include #include +#include "svnversion.h" + #include "SettingsGroup.hpp" #include "TraceFile.hpp" #include "mainwindow.h" diff --git a/mainwindow.cpp b/mainwindow.cpp index ba6a362e2..630e77472 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -12,6 +12,8 @@ #include #endif +#include "svnversion.h" + #include "soundout.h" #include "plotter.h" #include "about.h" diff --git a/svnversion.h b/svnversion.h new file mode 100644 index 000000000..c68c6b102 --- /dev/null +++ b/svnversion.h @@ -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 */