Try fix zlib includes.

This commit is contained in:
James Benton 2018-06-15 08:08:46 +01:00
parent 26af965373
commit 4c780f47e3

View File

@ -1,3 +1,5 @@
include(CheckTypeSize)
# excmd
add_library(excmd INTERFACE)
target_include_directories(excmd INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/excmd/src")
@ -14,6 +16,16 @@ if(NOT ZLIB_FOUND)
set(BUILD_SHARED_LIBS OFF)
add_subdirectory(zlib)
# Fix zlib tool / example includes
target_include_directories(example PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/zlib")
target_include_directories(minigzip PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/zlib")
check_type_size(off64_t OFF64_T)
if(HAVE_OFF64_T)
target_include_directories(example64 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/zlib")
target_include_directories(minigzip64 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/zlib")
endif()
target_include_directories(zlibstatic INTERFACE
"${CMAKE_CURRENT_SOURCE_DIR}/zlib"
"${CMAKE_CURRENT_BINARY_DIR}/zlib")