diff --git a/tools/libraries/CMakeLists.txt b/tools/libraries/CMakeLists.txt index 31470c3..df57293 100644 --- a/tools/libraries/CMakeLists.txt +++ b/tools/libraries/CMakeLists.txt @@ -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")