discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Example CMakeLists for dial_tone.cc


From: Louis Brown
Subject: Re: [Discuss-gnuradio] Example CMakeLists for dial_tone.cc
Date: Sun, 29 May 2016 01:31:30 +0000 (GMT)

Thanks!  Worked great.  At least this got me reading up on how cmake goes through the sub-directories.  Starting to make some sense.
Thanks,
Lou

On May 28, 2016, at 06:55 PM, Johnathan Corgan <address@hidden> wrote:

On Sat, May 28, 2016 at 3:35 PM, Louis Brown <address@hidden> wrote:
 
Does anyone have an example CMakeLists.txt to build something very simple like dial_tone.cc?  I DON'T want to do this in the GR source tree, rather just have simple ~/dial_tone containing the single *.cc and CmakeLists.txt.  I have learned enough c++ now to work through the guided tutorials, but the build environment is still somewhat overwhelming, so I want to start basic and work my way up.

Your question made me realize it has been an embarrassingly long time since I've written a CMakeLists.txt file from scratch.  Below is the minimum one that would work to compile dial_tone.cc into an executable:

cmake_minimum_required(VERSION 2.6)
project(dialtone CXX)

find_package(Boost "1.35" COMPONENTS system)
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG AUDIO)
find_package(Gnuradio "3.7.2" REQUIRED)

include_directories(${GNURADIO_ALL_INCLUDE_DIRS})

add_executable(dialtone dial_tone.cc)
target_link_libraries(dialtone ${Boost_LIBRARIES} ${GNURADIO_ALL_LIBRARIES})
  
-Johnathan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]