commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 04/07: cmake and build: fixes for cross-com


From: git
Subject: [Commit-gnuradio] [gnuradio] 04/07: cmake and build: fixes for cross-compiling to enable ControlPort with ICE.
Date: Mon, 21 Apr 2014 15:00:51 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit fec067d6f303a8be3aa8bbecb92232a430a1b455
Author: Tom Rondeau <address@hidden>
Date:   Sun Apr 20 12:29:28 2014 -0400

    cmake and build: fixes for cross-compiling to enable ControlPort with ICE.
---
 cmake/Modules/FindICE-3.5.cmake     | 36 ++++++++++++++++++++++++++----------
 cmake/Toolchains/oe-sdk_cross.cmake |  2 +-
 gnuradio-runtime/lib/block.cc       |  1 +
 3 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/cmake/Modules/FindICE-3.5.cmake b/cmake/Modules/FindICE-3.5.cmake
index 7ac53c9..d4421ab 100644
--- a/cmake/Modules/FindICE-3.5.cmake
+++ b/cmake/Modules/FindICE-3.5.cmake
@@ -90,17 +90,33 @@ if(ICE_ICE AND ICE_ICEUTIL)
     ${ICE_ICEUTIL}
     )
 
-  FIND_PROGRAM(ICE_SLICE2CPP slice2cpp
-    HINTS ${CMAKE_INSTALL_PREFIX}/bin ${ICE_MANUAL_INSTALL_PATH}/bin/)
-  FIND_PROGRAM(ICE_SLICE2PY slice2py
-    HINTS ${CMAKE_INSTALL_PREFIX}/bin ${ICE_MANUAL_INSTALL_PATH}/bin/)
-
-  # Check that the ICE Python package is installed
-  include(GrPython)
-  GR_PYTHON_CHECK_MODULE("Ice >= 3.5" Ice "Ice.stringVersion() >= '3.5.0'" 
PYTHON_ICE_FOUND)
-  if(PYTHON_ICE_FOUND)
+  if(CMAKE_CROSSCOMPILING)
+    # When cross-compiling, we set up the environment/toolchain to put
+    # the right slice2cpp/py in the path. We just need to grab that here.
+    FIND_PROGRAM(ICE_SLICE2CPP slice2cpp)
+    FIND_PROGRAM(ICE_SLICE2PY slice2py)
+
+    # We also don't need to look for Python in this case, so just
+    # force this to TRUE here.
     set(ICE_FOUND TRUE)
-  endif(PYTHON_ICE_FOUND)
+
+  else(CMAKE_CROSSCOMPILING)
+
+    FIND_PROGRAM(ICE_SLICE2CPP slice2cpp
+      HINTS ${CMAKE_INSTALL_PREFIX}/bin ${ICE_MANUAL_INSTALL_PATH}/bin/)
+    FIND_PROGRAM(ICE_SLICE2PY slice2py
+      HINTS ${CMAKE_INSTALL_PREFIX}/bin ${ICE_MANUAL_INSTALL_PATH}/bin/)
+
+    # Check that the ICE Python package is installed
+    include(GrPython)
+    GR_PYTHON_CHECK_MODULE("Ice >= 3.5" Ice "Ice.stringVersion() >= '3.5.0'" 
PYTHON_ICE_FOUND)
+    if(PYTHON_ICE_FOUND)
+      set(ICE_FOUND TRUE)
+    endif(PYTHON_ICE_FOUND)
+  endif(CMAKE_CROSSCOMPILING)
+
+  message(STATUS "  SLICE2CPP: ${ICE_SLICE2CPP}")
+  message(STATUS "  SLICE2PY: ${ICE_SLICE2PY}")
 
   if(ICE_FOUND)
     message(STATUS "Ice-3.5 found")
diff --git a/cmake/Toolchains/oe-sdk_cross.cmake 
b/cmake/Toolchains/oe-sdk_cross.cmake
index ea77815..2a01d8f 100644
--- a/cmake/Toolchains/oe-sdk_cross.cmake
+++ b/cmake/Toolchains/oe-sdk_cross.cmake
@@ -5,7 +5,7 @@ set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS}  CACHE STRING "" FORCE )
 set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE ) #same flags for C 
sources
 set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE ) #same 
flags for C sources
 set( CMAKE_LIBRARY_PATH ${OECORE_TARGET_SYSROOT}/usr/lib )
-set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_NATIVE_SYSROOT} 
$ENV{OECORE_TARGET_SYSROOT} )
+set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} 
$ENV{OECORE_NATIVE_SYSROOT} )
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
 set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
 set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
diff --git a/gnuradio-runtime/lib/block.cc b/gnuradio-runtime/lib/block.cc
index 7a1364d..c8cb5f9 100644
--- a/gnuradio-runtime/lib/block.cc
+++ b/gnuradio-runtime/lib/block.cc
@@ -30,6 +30,7 @@
 #include <gnuradio/buffer.h>
 #include <gnuradio/prefs.h>
 #include <gnuradio/config.h>
+#include <gnuradio/rpcregisterhelpers.h>
 #include <stdexcept>
 #include <iostream>
 



reply via email to

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