summaryrefslogtreecommitdiff
path: root/gr-vocoder/lib
diff options
context:
space:
mode:
authorJosh Blum2011-07-28 13:12:38 -0700
committerJosh Blum2011-09-11 23:39:32 -0700
commitefaa238cb8b27e079b254150f1cfd9c163b509fd (patch)
treedc281ef5704d49b8d2790ed02129c1cc183561fb /gr-vocoder/lib
parent5f7e76b4fd89fbaf4c0cf72ff53c7c91381ccfad (diff)
downloadgnuradio-efaa238cb8b27e079b254150f1cfd9c163b509fd.tar.gz
gnuradio-efaa238cb8b27e079b254150f1cfd9c163b509fd.tar.bz2
gnuradio-efaa238cb8b27e079b254150f1cfd9c163b509fd.zip
cmake: support for importing executables when doing cross build
Diffstat (limited to 'gr-vocoder/lib')
-rw-r--r--gr-vocoder/lib/codec2/CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/gr-vocoder/lib/codec2/CMakeLists.txt b/gr-vocoder/lib/codec2/CMakeLists.txt
index 2b8273d16..3a666fb59 100644
--- a/gr-vocoder/lib/codec2/CMakeLists.txt
+++ b/gr-vocoder/lib/codec2/CMakeLists.txt
@@ -19,10 +19,14 @@
########################################################################
# Create executable to generate other sources
+# http://www.vtk.org/Wiki/CMake_Cross_Compiling#Using_executables_in_the_build_created_during_the_build
########################################################################
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-ADD_EXECUTABLE(generate_codebook ${CMAKE_CURRENT_SOURCE_DIR}/generate_codebook.c)
-TARGET_LINK_LIBRARIES(generate_codebook -lm)
+IF(NOT CMAKE_CROSSCOMPILING)
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+ ADD_EXECUTABLE(generate_codebook ${CMAKE_CURRENT_SOURCE_DIR}/generate_codebook.c)
+ TARGET_LINK_LIBRARIES(generate_codebook -lm)
+ EXPORT(TARGETS generate_codebook APPEND FILE ${EXPORT_FILE})
+ENDIF()
########################################################################
# Create codebook