diff --git a/CMakeLists.txt b/CMakeLists.txt index 455e1095f..494c7240e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ ######################################################################## if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) - message(FATAL_ERROR "Prevented in-tree build. This is bad practice.") + message(FATAL_ERROR "Prevented in-tree build. This is bad practice. Try 'cd build && cmake ../' ") endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) ######################################################################## @@ -119,9 +119,6 @@ if(NOT GNURADIO_CORE_FOUND) message(FATAL_ERROR "Please install GNU Radio and all its dependencies. Visit http://gnuradio.org") endif(NOT GNURADIO_CORE_FOUND) - - - find_package(Gruel) if(NOT GRUEL_FOUND) message(FATAL_ERROR "Gruel required to build gnss-sdr") @@ -129,10 +126,6 @@ endif() link_libraries(gruel) include_directories(${GRUEL_INCLUDE_DIRS}) - - - - find_package(UHD) if(NOT UHD_FOUND) message(FATAL_ERROR "UHD required to build gnss-sdr") @@ -481,6 +474,8 @@ endif( CMAKE_SIZEOF_VOID_P EQUAL 8 ) list(APPEND CMAKE_CXX_FLAGS ${MY_CXX_FLAGS}) +add_definitions( -DGNSS_SDR_VERSION="${VERSION}" ) + ######################################################################## # Add subdirectories (in order of deps) ######################################################################## diff --git a/src/main/main.cc b/src/main/main.cc index b34ed8fb0..a4f7ac5ad 100644 --- a/src/main/main.cc +++ b/src/main/main.cc @@ -8,7 +8,7 @@ * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2012 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2013 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver @@ -30,6 +30,9 @@ * * ------------------------------------------------------------------------- */ +#ifndef GNSS_SDR_VERSION +#define GNSS_SDR_VERSION "0.0.1" +#endif #include #include @@ -73,7 +76,7 @@ int main(int argc, char** argv) google::SetUsageMessage(intro_help); - google::SetVersionString("0.1"); + google::SetVersionString(GNSS_SDR_VERSION); google::ParseCommandLineFlags(&argc, &argv, true); std::cout << "Initializing GNSS-SDR... Please wait." << std::endl;