space-game001/thirdparty/libzip-1.11.3/src/CMakeLists.txt
2025-03-28 16:37:05 +06:00

15 lines
587 B
CMake

check_function_exists(getopt HAVE_GETOPT)
foreach(PROGRAM zipcmp zipmerge ziptool)
add_executable(${PROGRAM} ${PROGRAM}.c)
target_link_libraries(${PROGRAM} zip)
target_include_directories(${PROGRAM} PRIVATE BEFORE ${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR})
if(LIBZIP_DO_INSTALL)
install(TARGETS ${PROGRAM} EXPORT ${PROJECT_NAME}-targets DESTINATION bin)
endif()
if(NOT HAVE_GETOPT)
target_sources(${PROGRAM} PRIVATE getopt.c)
endif(NOT HAVE_GETOPT)
endforeach()
target_sources(zipcmp PRIVATE diff_output.c)
target_link_libraries(zipcmp ${FTS_LIB} ZLIB::ZLIB)