diff options
author | Marcus Müller <marcus@hostalia.de> | 2014-02-12 11:05:13 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2014-02-12 08:40:39 -0800 |
commit | 9fb5487a8958e26744ee24dced92d2635fc17136 (patch) | |
tree | 67328a4fea653ed6831f3ee8dd33b6c580432afe /gr-utils/python/modtool/gr-newmod | |
parent | 69323c1dd31941174ea6a33f0027955807cd89bb (diff) |
modtool: added skipping of lib/ and swig/ if sources list is empty
Diffstat (limited to 'gr-utils/python/modtool/gr-newmod')
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt | 6 | ||||
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt index 312594149c..a535ead0fd 100644 --- a/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt +++ b/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt @@ -28,6 +28,12 @@ link_directories(${Boost_LIBRARY_DIRS}) list(APPEND howto_sources ) +set(howto_sources "${howto_sources}" PARENT_SCOPE) +if(NOT howto_sources) + MESSAGE(STATUS "No C++ sources... skipping lib/") + return() +endif(NOT howto_sources) + add_library(gnuradio-howto SHARED ${howto_sources}) target_link_libraries(gnuradio-howto ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}) set_target_properties(gnuradio-howto PROPERTIES DEFINE_SYMBOL "gnuradio_howto_EXPORTS") diff --git a/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt index 9aa1c51818..5810b6c1ea 100644 --- a/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt +++ b/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt @@ -18,6 +18,14 @@ # Boston, MA 02110-1301, USA. ######################################################################## +# Check if there is C++ code at all +######################################################################## +if(NOT howto_sources) + MESSAGE(STATUS "No C++ sources... skipping swig/") + return() +endif(NOT howto_sources) + +######################################################################## # Include swig generation macros ######################################################################## find_package(SWIG) |