From 1c4ba722986dbb4d122dd31ad0823c0e28c8d1af Mon Sep 17 00:00:00 2001 From: gangatp Date: Wed, 6 Dec 2023 23:51:47 +0530 Subject: [PATCH] libzip unix compile options --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6be6fe59f..8ac710731 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,6 +149,13 @@ if (USE_INCLUDED_LIBZIP) endif() target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/libzip) + if (UNIX OR MINGW) + target_compile_options(${PROJECT_NAME} PRIVATE "-DHAVE_FSEEKO") + target_compile_options(${PROJECT_NAME} PRIVATE "-DHAVE_FTELLO") + target_compile_options(${PROJECT_NAME} PRIVATE "-DHAVE_STRCASECMP") + target_compile_options(${PROJECT_NAME} PRIVATE "-DHAVE_UNISTD_H") + endif() + else() find_package(PkgConfig REQUIRED) pkg_check_modules(LIBZIP REQUIRED libzip)