diff --git a/CMakeLists.txt b/CMakeLists.txt index d1f48e914..a3207b2e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -421,8 +421,12 @@ if( $ENV{GN3S_DRIVER} ) # copy firmware to install folder # Build project gr-gn3s else( $ENV{GN3S_DRIVER} ) - message( "GN3S_DRIVER is not defined." ) - message( "Define it with 'export GN3S_DRIVER=1' to add support for the GN3S dongle." ) + if( GN3S_DRIVER ) + message("GN3S driver will be compiled") + else( GNSS_DRIVER ) + message( "GN3S_DRIVER is not defined." ) + message( "Define it with 'export GN3S_DRIVER=1' to add support for the GN3S dongle." ) + endif( GN3S_DRIVER ) endif($ENV{GN3S_DRIVER} ) if( $ENV{RTLSDR_DRIVER} ) diff --git a/src/core/receiver/CMakeLists.txt b/src/core/receiver/CMakeLists.txt index 97ba51ec1..17421162e 100644 --- a/src/core/receiver/CMakeLists.txt +++ b/src/core/receiver/CMakeLists.txt @@ -61,17 +61,25 @@ include_directories( ) -#Enable GN3S module if the driver is present -if( ($ENV{GN3S_DRIVER} EQUAL 1) OR (${GN3S_DRIVER} EQUAL 1) ) +#Enable GN3S module if the flag is present +if( $ENV{GN3S_DRIVER} ) message( "Support for RF front-end GN3S v2 enabled" ) add_definitions(-DGN3S_DRIVER=1) -endif( ($ENV{GN3S_DRIVER} EQUAL 1) OR (${GN3S_DRIVER} EQUAL 1) ) +endif( $ENV{GN3S_DRIVER} ) +if( GN3S_DRIVER ) + message( "Support for RF front-end GN3S v2 enabled" ) + add_definitions(-DGN3S_DRIVER=1) +endif( GN3S_DRIVER ) -#Enable RTL-SDR module if the driver is present -if( ($ENV{RTLSDR_DRIVER} EQUAL 1) OR (${RTLSDR_DRIVER} EQUAL 1) ) +#Enable RTL-SDR module if the flag is present +if( $ENV{RTLSDR_DRIVER} ) message( "Support for RF front-end based on RTL dongle enabled" ) add_definitions(-DRTLSDR_DRIVER=1) -endif( ($ENV{RTLSDR_DRIVER} EQUAL 1) OR (${RTLSDR_DRIVER} EQUAL 1) ) +endif( $ENV{RTLSDR_DRIVER} ) +if( RTLSDR_DRIVER ) + message( "Support for RF front-end based on RTL dongle enabled" ) + add_definitions(-DRTLSDR_DRIVER=1) +endif( RTLSDR_DRIVER ) add_library(gnss_rx ${GNSS_RECEIVER_SOURCES}) target_link_libraries(gnss_rx ${Boost_LIBRARIES} ${ARMADILLO_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}