fritz-tools: Find zlib.h header file
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 19 Apr 2017 00:13:47 +0000 (17:13 -0700)
committerFlorian Fainelli <f.fainelli@gmail.com>
Thu, 11 May 2017 20:42:39 +0000 (13:42 -0700)
Add the necessary changes to CMakeLists.txt to search zlib.h. Fixes
build issues with external toolchains that don't have STAGING_DIR in the
default search path.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
package/utils/fritz-tools/src/CMakeLists.txt

index 116bca9dc04ece33c485d526f796c0a2ab1dded2..021dc7733a36e9347f35bbaf2832f3f0fc212c52 100644 (file)
@@ -5,6 +5,9 @@ ADD_DEFINITIONS(-Wall -Werror --std=gnu99 -Wmissing-declarations)
 
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 
+FIND_PATH(zlib_include_dir zlib.h)
+INCLUDE_DIRECTORIES(${zlib_include_dir})
+
 ADD_EXECUTABLE(fritz_tffs_read fritz_tffs_read.c)
 ADD_EXECUTABLE(fritz_cal_extract fritz_cal_extract.c)
 TARGET_LINK_LIBRARIES(fritz_cal_extract z)