1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-02-04 13:19:19 +00:00

Now the gnss_block_factory catches 'cmake .. -DRTLSDR_DRIVER=1' and/or 'cmake .. -DGN3S_DRIVER=1'

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@387 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Carles Fernandez 2013-07-13 11:25:48 +00:00
parent 482eabeeb2
commit f79c5685c4
2 changed files with 20 additions and 8 deletions

View File

@ -421,8 +421,12 @@ if( $ENV{GN3S_DRIVER} )
# copy firmware to install folder # copy firmware to install folder
# Build project gr-gn3s # Build project gr-gn3s
else( $ENV{GN3S_DRIVER} ) else( $ENV{GN3S_DRIVER} )
message( "GN3S_DRIVER is not defined." ) if( GN3S_DRIVER )
message( "Define it with 'export GN3S_DRIVER=1' to add support for the GN3S dongle." ) 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} ) endif($ENV{GN3S_DRIVER} )
if( $ENV{RTLSDR_DRIVER} ) if( $ENV{RTLSDR_DRIVER} )

View File

@ -61,17 +61,25 @@ include_directories(
) )
#Enable GN3S module if the driver is present #Enable GN3S module if the flag is present
if( ($ENV{GN3S_DRIVER} EQUAL 1) OR (${GN3S_DRIVER} EQUAL 1) ) if( $ENV{GN3S_DRIVER} )
message( "Support for RF front-end GN3S v2 enabled" ) message( "Support for RF front-end GN3S v2 enabled" )
add_definitions(-DGN3S_DRIVER=1) 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 #Enable RTL-SDR module if the flag is present
if( ($ENV{RTLSDR_DRIVER} EQUAL 1) OR (${RTLSDR_DRIVER} EQUAL 1) ) if( $ENV{RTLSDR_DRIVER} )
message( "Support for RF front-end based on RTL dongle enabled" ) message( "Support for RF front-end based on RTL dongle enabled" )
add_definitions(-DRTLSDR_DRIVER=1) 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}) 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} target_link_libraries(gnss_rx ${Boost_LIBRARIES} ${ARMADILLO_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}