build: cmake cross-compilation fixes
Type: fix
Change-Id: I40337c208375b74b4dc3c35102c5e66a6e4568e8
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/cmake/CMakeLists.txt b/src/cmake/CMakeLists.txt
index fdee40c..74cd385 100644
--- a/src/cmake/CMakeLists.txt
+++ b/src/cmake/CMakeLists.txt
@@ -21,7 +21,7 @@
VPPConfig.cmake
DESTINATION
- lib/cmake/vpp
+ ${VPP_LIBRARY_DIR}/cmake/vpp
COMPONENT vpp-dev
)
diff --git a/src/pkg/CMakeLists.txt b/src/pkg/CMakeLists.txt
index a5a0ffe..0e4b6db 100644
--- a/src/pkg/CMakeLists.txt
+++ b/src/pkg/CMakeLists.txt
@@ -11,6 +11,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+if(CMAKE_CROSSCOMPILING)
+ return()
+endif()
+
get_cmake_property(VPP_COMPONENTS COMPONENTS)
string(REPLACE ";" " " VPP_COMPONENTS "${VPP_COMPONENTS}")