blob: c911110c448f59f4bb8a0d9205b061e4f1cf2b0f [file] [log] [blame]
check_function_exists(getopt HAVE_GETOPT)
if(NOT HAVE_GETOPT)
set(SRC_EXTRA_FILES getopt.c)
endif(NOT HAVE_GETOPT)
foreach(PROGRAM zipcmp zipmerge ziptool)
add_executable(${PROGRAM} ${PROGRAM}.c ${SRC_EXTRA_FILES})
target_link_libraries(${PROGRAM} zip)
target_include_directories(${PROGRAM} BEFORE PRIVATE ${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR})
if(LIBZIP_DO_INSTALL)
install(TARGETS ${PROGRAM} EXPORT ${PROJECT_NAME}-targets RUNTIME DESTINATION bin)
endif()
endforeach()
target_link_libraries(zipcmp ${FTS_LIB} ${ZLIB_LIBRARIES})