diff options
author | Josh Blum | 2011-10-08 17:11:12 -0700 |
---|---|---|
committer | Josh Blum | 2011-10-08 17:11:12 -0700 |
commit | 71c0f14a46f85027b95f2f5f6d3d219cc9e3783e (patch) | |
tree | 046d89555243ede65bfc7bc0a6cbfc7f870ff4cb /gr-audio | |
parent | 63b87bf4e6e9a2f1112c17c57796b69b3b8a2b3e (diff) | |
download | gnuradio-71c0f14a46f85027b95f2f5f6d3d219cc9e3783e.tar.gz gnuradio-71c0f14a46f85027b95f2f5f6d3d219cc9e3783e.tar.bz2 gnuradio-71c0f14a46f85027b95f2f5f6d3d219cc9e3783e.zip |
gr: the CMakeLists.txt took a chill pill
Diffstat (limited to 'gr-audio')
-rw-r--r-- | gr-audio/CMakeLists.txt | 30 | ||||
-rw-r--r-- | gr-audio/examples/c++/CMakeLists.txt | 8 | ||||
-rw-r--r-- | gr-audio/examples/python/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-audio/grc/CMakeLists.txt | 4 | ||||
-rw-r--r-- | gr-audio/include/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-audio/lib/CMakeLists.txt | 104 | ||||
-rw-r--r-- | gr-audio/swig/CMakeLists.txt | 10 |
7 files changed, 80 insertions, 80 deletions
diff --git a/gr-audio/CMakeLists.txt b/gr-audio/CMakeLists.txt index c78a9cc38..839f4a49e 100644 --- a/gr-audio/CMakeLists.txt +++ b/gr-audio/CMakeLists.txt @@ -20,12 +20,12 @@ ######################################################################## # Setup dependencies ######################################################################## -INCLUDE(GrBoost) +include(GrBoost) ######################################################################## # Register component ######################################################################## -INCLUDE(GrComponent) +include(GrComponent) GR_REGISTER_COMPONENT("gr-audio" ENABLE_GR_AUDIO Boost_FOUND ENABLE_GR_CORE_ @@ -36,12 +36,12 @@ GR_SET_GLOBAL(GR_AUDIO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include) ######################################################################## # Begin conditional configuration ######################################################################## -IF(ENABLE_GR_AUDIO) +if(ENABLE_GR_AUDIO) ######################################################################## # Setup CPack components ######################################################################## -INCLUDE(GrPackage) +include(GrPackage) CPACK_SET(CPACK_COMPONENT_GROUP_AUDIO_DESCRIPTION "GNU Radio Audio Blocks") CPACK_COMPONENT("audio_runtime" @@ -75,27 +75,27 @@ CPACK_COMPONENT("audio_swig" ######################################################################## # Add subdirectories ######################################################################## -ADD_SUBDIRECTORY(include) -ADD_SUBDIRECTORY(lib) -ADD_SUBDIRECTORY(examples/c++) -IF(ENABLE_PYTHON) - ADD_SUBDIRECTORY(swig) - ADD_SUBDIRECTORY(grc) - ADD_SUBDIRECTORY(examples/python) -ENDIF(ENABLE_PYTHON) +add_subdirectory(include) +add_subdirectory(lib) +add_subdirectory(examples/c++) +if(ENABLE_PYTHON) + add_subdirectory(swig) + add_subdirectory(grc) + add_subdirectory(examples/python) +endif(ENABLE_PYTHON) ######################################################################## # Create Pkg Config File ######################################################################## -CONFIGURE_FILE( +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-audio.pc.in ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-audio.pc @ONLY) -INSTALL( +install( FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-audio.pc DESTINATION ${GR_LIBRARY_DIR}/pkgconfig COMPONENT "audio_devel" ) -ENDIF(ENABLE_GR_AUDIO) +endif(ENABLE_GR_AUDIO) diff --git a/gr-audio/examples/c++/CMakeLists.txt b/gr-audio/examples/c++/CMakeLists.txt index 07b5426de..38490cce8 100644 --- a/gr-audio/examples/c++/CMakeLists.txt +++ b/gr-audio/examples/c++/CMakeLists.txt @@ -17,7 +17,7 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -INCLUDE_DIRECTORIES(${GR_AUDIO_INCLUDE_DIRS}) -INCLUDE_DIRECTORIES(${GNURADIO_CORE_INCLUDE_DIRS}) -ADD_EXECUTABLE(dial_tone dial_tone.cc) -TARGET_LINK_LIBRARIES(dial_tone gnuradio-audio) +include_directories(${GR_AUDIO_INCLUDE_DIRS}) +include_directories(${GNURADIO_CORE_INCLUDE_DIRS}) +add_executable(dial_tone dial_tone.cc) +target_link_libraries(dial_tone gnuradio-audio) diff --git a/gr-audio/examples/python/CMakeLists.txt b/gr-audio/examples/python/CMakeLists.txt index c5ca2bba0..86ba86ac0 100644 --- a/gr-audio/examples/python/CMakeLists.txt +++ b/gr-audio/examples/python/CMakeLists.txt @@ -17,7 +17,7 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -INCLUDE(GrPython) +include(GrPython) GR_PYTHON_INSTALL(PROGRAMS audio_copy.py diff --git a/gr-audio/grc/CMakeLists.txt b/gr-audio/grc/CMakeLists.txt index 067761fed..a077f7fb4 100644 --- a/gr-audio/grc/CMakeLists.txt +++ b/gr-audio/grc/CMakeLists.txt @@ -18,5 +18,5 @@ # Boston, MA 02110-1301, USA. ######################################################################## -FILE(GLOB xml_files "*.xml") -INSTALL(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "audio_python") +file(GLOB xml_files "*.xml") +install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "audio_python") diff --git a/gr-audio/include/CMakeLists.txt b/gr-audio/include/CMakeLists.txt index 9b7ed46c9..6db55e92c 100644 --- a/gr-audio/include/CMakeLists.txt +++ b/gr-audio/include/CMakeLists.txt @@ -20,7 +20,7 @@ ######################################################################## # Install header files ######################################################################## -INSTALL(FILES +install(FILES gr_audio_api.h gr_audio_source.h gr_audio_sink.h diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt index f9f3ffec1..214f045be 100644 --- a/gr-audio/lib/CMakeLists.txt +++ b/gr-audio/lib/CMakeLists.txt @@ -20,141 +20,141 @@ ######################################################################## # Setup the include and linker paths ######################################################################## -INCLUDE_DIRECTORIES( +include_directories( ${GNURADIO_CORE_INCLUDE_DIRS} ${GR_AUDIO_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ) -INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) -LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) +include_directories(${Boost_INCLUDE_DIRS}) +link_directories(${Boost_LIBRARY_DIRS}) -LIST(APPEND gr_audio_libs gnuradio-core ${Boost_LIBRARIES}) -LIST(APPEND gr_audio_sources gr_audio_registry.cc) -LIST(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/gr-audio.conf) +list(APPEND gr_audio_libs gnuradio-core ${Boost_LIBRARIES}) +list(APPEND gr_audio_sources gr_audio_registry.cc) +list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/gr-audio.conf) ######################################################################## ## ALSA Support ######################################################################## -FIND_PACKAGE(ALSA) +find_package(ALSA) -IF(ALSA_FOUND) +if(ALSA_FOUND) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/alsa ${ALSA_INCLUDE_DIRS}) - LIST(APPEND gr_audio_libs ${ALSA_LIBRARIES}) - LIST(APPEND gr_audio_sources + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/alsa ${ALSA_INCLUDE_DIRS}) + list(APPEND gr_audio_libs ${ALSA_LIBRARIES}) + list(APPEND gr_audio_sources ${CMAKE_CURRENT_SOURCE_DIR}/alsa/gri_alsa.cc ${CMAKE_CURRENT_SOURCE_DIR}/alsa/audio_alsa_source.cc ${CMAKE_CURRENT_SOURCE_DIR}/alsa/audio_alsa_sink.cc ) - LIST(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/alsa/gr-audio-alsa.conf) + list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/alsa/gr-audio-alsa.conf) -ENDIF(ALSA_FOUND) +endif(ALSA_FOUND) ######################################################################## ## OSS Support ######################################################################## -FIND_PACKAGE(OSS) +find_package(OSS) -IF(OSS_FOUND) +if(OSS_FOUND) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/oss ${OSS_INCLUDE_DIRS}) - LIST(APPEND gr_audio_sources + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/oss ${OSS_INCLUDE_DIRS}) + list(APPEND gr_audio_sources ${CMAKE_CURRENT_SOURCE_DIR}/oss/audio_oss_source.cc ${CMAKE_CURRENT_SOURCE_DIR}/oss/audio_oss_sink.cc ) - LIST(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/oss/gr-audio-oss.conf) + list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/oss/gr-audio-oss.conf) -ENDIF(OSS_FOUND) +endif(OSS_FOUND) ######################################################################## ## Jack Support ######################################################################## -FIND_PACKAGE(Jack) +find_package(Jack) -IF(JACK_FOUND) +if(JACK_FOUND) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/jack ${JACK_INCLUDE_DIRS}) - LIST(APPEND gr_audio_libs ${JACK_LIBRARIES}) - ADD_DEFINITIONS(${JACK_DEFINITIONS}) - LIST(APPEND gr_audio_sources + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/jack ${JACK_INCLUDE_DIRS}) + list(APPEND gr_audio_libs ${JACK_LIBRARIES}) + add_definitions(${JACK_DEFINITIONS}) + list(APPEND gr_audio_sources ${CMAKE_CURRENT_SOURCE_DIR}/jack/gri_jack.cc ${CMAKE_CURRENT_SOURCE_DIR}/jack/audio_jack_source.cc ${CMAKE_CURRENT_SOURCE_DIR}/jack/audio_jack_sink.cc ) - LIST(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/jack/gr-audio-jack.conf) + list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/jack/gr-audio-jack.conf) -ENDIF(JACK_FOUND) +endif(JACK_FOUND) ######################################################################## ## OSX Support ######################################################################## -INCLUDE(CheckIncludeFileCXX) +include(CheckIncludeFileCXX) CHECK_INCLUDE_FILE_CXX(AudioUnit/AudioUnit.h AUDIO_UNIT_H) CHECK_INCLUDE_FILE_CXX(AudioToolbox/AudioToolbox.h AUDIO_TOOLBOX_H) -IF(AUDIO_UNIT_H AND AUDIO_TOOLBOX_H) +if(AUDIO_UNIT_H AND AUDIO_TOOLBOX_H) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/osx) - LIST(APPEND gr_audio_libs + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/osx) + list(APPEND gr_audio_libs "-framework AudioUnit" "-framework CoreAudio" "-framework AudioToolbox" "-framework Carbon" ) - LIST(APPEND gr_audio_sources + list(APPEND gr_audio_sources ${CMAKE_CURRENT_SOURCE_DIR}/osx/audio_osx_source.cc ${CMAKE_CURRENT_SOURCE_DIR}/osx/audio_osx_sink.cc ) -ENDIF(AUDIO_UNIT_H AND AUDIO_TOOLBOX_H) +endif(AUDIO_UNIT_H AND AUDIO_TOOLBOX_H) ######################################################################## ## PortAudio Support ######################################################################## -FIND_PACKAGE(Portaudio) +find_package(Portaudio) -IF(PORTAUDIO_FOUND) +if(PORTAUDIO_FOUND) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/portaudio ${PORTAUDIO_INCLUDE_DIRS}) - LIST(APPEND gr_audio_libs ${PORTAUDIO_LIBRARIES}) - ADD_DEFINITIONS(${PORTAUDIO_DEFINITIONS}) - LIST(APPEND gr_audio_sources + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/portaudio ${PORTAUDIO_INCLUDE_DIRS}) + list(APPEND gr_audio_libs ${PORTAUDIO_LIBRARIES}) + add_definitions(${PORTAUDIO_DEFINITIONS}) + list(APPEND gr_audio_sources ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/gri_portaudio.cc ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/audio_portaudio_source.cc ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/audio_portaudio_sink.cc ) - LIST(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/gr-audio-portaudio.conf) + list(APPEND gr_audio_confs ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/gr-audio-portaudio.conf) -ENDIF(PORTAUDIO_FOUND) +endif(PORTAUDIO_FOUND) ######################################################################## ## Windows Support ######################################################################## -IF(WIN32) +if(WIN32) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/windows) - LIST(APPEND gr_audio_libs winmm.lib) - LIST(APPEND gr_audio_sources + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/windows) + list(APPEND gr_audio_libs winmm.lib) + list(APPEND gr_audio_sources ${CMAKE_CURRENT_SOURCE_DIR}/windows/audio_windows_source.cc ${CMAKE_CURRENT_SOURCE_DIR}/windows/audio_windows_sink.cc ) -ENDIF(WIN32) +endif(WIN32) ######################################################################## # Setup library ######################################################################## -ADD_LIBRARY(gnuradio-audio SHARED ${gr_audio_sources}) -TARGET_LINK_LIBRARIES(gnuradio-audio ${gr_audio_libs}) -SET_TARGET_PROPERTIES(gnuradio-audio PROPERTIES DEFINE_SYMBOL "gnuradio_audio_EXPORTS") -SET_TARGET_PROPERTIES(gnuradio-audio PROPERTIES SOVERSION ${LIBVER}) +add_library(gnuradio-audio SHARED ${gr_audio_sources}) +target_link_libraries(gnuradio-audio ${gr_audio_libs}) +set_target_properties(gnuradio-audio PROPERTIES DEFINE_SYMBOL "gnuradio_audio_EXPORTS") +set_target_properties(gnuradio-audio PROPERTIES SOVERSION ${LIBVER}) -INSTALL(TARGETS gnuradio-audio +install(TARGETS gnuradio-audio LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "audio_runtime" # .so/.dylib file ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "audio_devel" # .lib file RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "audio_runtime" # .dll file ) -INSTALL(FILES ${gr_audio_confs} DESTINATION ${GR_PKG_CONF_DIR} COMPONENT "audio_runtime") +install(FILES ${gr_audio_confs} DESTINATION ${GR_PKG_CONF_DIR} COMPONENT "audio_runtime") diff --git a/gr-audio/swig/CMakeLists.txt b/gr-audio/swig/CMakeLists.txt index a113239e9..3e7b7f861 100644 --- a/gr-audio/swig/CMakeLists.txt +++ b/gr-audio/swig/CMakeLists.txt @@ -20,15 +20,15 @@ ######################################################################## # Setup swig generation ######################################################################## -INCLUDE(GrPython) -INCLUDE(GrSwig) +include(GrPython) +include(GrSwig) -SET(GR_SWIG_INCLUDE_DIRS +set(GR_SWIG_INCLUDE_DIRS ${GR_AUDIO_INCLUDE_DIRS} ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} ) -SET(GR_SWIG_LIBRARIES gnuradio-audio) +set(GR_SWIG_LIBRARIES gnuradio-audio) GR_SWIG_MAKE(audio_swig audio_swig.i) @@ -38,7 +38,7 @@ GR_SWIG_INSTALL( COMPONENT "audio_python" ) -INSTALL( +install( FILES audio_swig.i DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig COMPONENT "audio_swig" |