summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum2011-07-28 13:12:38 -0700
committerJosh Blum2011-09-11 23:39:32 -0700
commitefaa238cb8b27e079b254150f1cfd9c163b509fd (patch)
treedc281ef5704d49b8d2790ed02129c1cc183561fb /CMakeLists.txt
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 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2536a9731..ddd51f8d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,18 @@ LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
INCLUDE(GrVersion) #setup version info
########################################################################
+# Import executables from a native build (for cross compiling)
+# http://www.vtk.org/Wiki/CMake_Cross_Compiling#Using_executables_in_the_build_created_during_the_build
+########################################################################
+IF(IMPORT_EXECUTABLES)
+ INCLUDE(${IMPORT_EXECUTABLES})
+ENDIF(IMPORT_EXECUTABLES)
+
+#set file that the native build will fill with exports
+SET(EXPORT_FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake)
+FILE(WRITE ${EXPORT_FILE}) #blank the file (subdirs will append)
+
+########################################################################
# Compiler specific setup
########################################################################
IF(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)