ZynqMP_R5: Add support to out of repo libxil
authorWendy Liang <jliang@xilinx.com>
Fri, 27 May 2016 20:33:49 +0000 (13:33 -0700)
committerWendy Liang <jliang@xilinx.com>
Thu, 13 Oct 2016 05:01:41 +0000 (22:01 -0700)
Allow CMake to search for libxil and its header files.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
apps/system/generic/machine/zynqmp_r5/CMakeLists.txt
lib/system/generic/machine/zynqmp_r5/CMakeLists.txt

index bfecb875782a9bc9b7445970382b0e6b3dacffe1..210ac56935d3e91f34fd9ae2e9630cd6b4923b5d 100644 (file)
@@ -7,3 +7,7 @@ else (WITH_REMOTEPROC_MASTER)
 endif (WITH_REMOTEPROC_MASTER)
 
 set_property (GLOBAL PROPERTY APP_LINKER_SCRIPT "${_linker_script}")
+
+find_library(LIBXIL_LIB NAMES xil PATHS ${CMAKE_FIND_ROOT_PATH})
+get_filename_component(LIBXIL_LIB_DIR ${LIBXIL_LIB} DIRECTORY)
+collect(PROJECT_LIB_DIRS ${LIBXIL_LIB_DIR})
index 5558ac47df497d0395024baa6a1f29dfdacb276e..b28b31f3df233ed1606ed00cc5b82a7b635b7043 100644 (file)
@@ -1,2 +1,6 @@
 
 collect (PROJECT_LIB_SOURCES machine_system.c)
+
+# FIX ME: CMAKE_FIND_ROOT_PATH doesn't work
+find_path (LIBXIL_INCLUDE_DIR NAMES xparameters.h PATHS ${CMAKE_FIND_ROOT_PATH})
+collect (PROJECT_INC_DIRS ${LIBXIL_INCLUDE_DIR})