Clean up legacy code

This commit is contained in:
Marius Greuel
2022-01-07 13:15:55 +01:00
parent fe6f08d48f
commit fc54ef5e59
32 changed files with 91 additions and 360 deletions

View File

@@ -35,7 +35,6 @@ option(USE_LIBUSBWIN32 "Prefer libusb-win32 over libusb" OFF)
option(DEBUG_CMAKE "Enable debugging output for this CMake project" OFF)
include(CheckIncludeFile)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(FetchContent)
include(FindPackageMessage)
@@ -126,24 +125,6 @@ else()
endif()
endif()
# =====================================
# Detect headers
# =====================================
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stdlib.h HAVE_STDLIB_H)
check_include_file(inttypes.h HAVE_INTTYPES_H)
check_include_file(netinet/in.h HAVE_NETINET_IN_H)
# =====================================
# Detect functions
# =====================================
check_function_exists(usleep HAVE_USLEEP)
check_function_exists(getaddrinfo HAVE_GETADDRINFO)
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
check_function_exists(strcasecmp HAVE_STRCASECMP)
# =====================================
# Detect installed libraries
# =====================================
@@ -274,7 +255,7 @@ if(USE_EXTERNAL)
FetchContent_Declare(libftdi
GIT_REPOSITORY https://github.com/avrdudes/libftdi.git
GIT_TAG facd9b16336539b68e8e824ece994d3d3eb2f091
GIT_TAG f3a54da710002a7d25a32a69e667a69ef84cc120
)
message(STATUS "Fetching external libraries, please wait...")
@@ -313,10 +294,8 @@ endif()
add_compile_definitions(CONFIG_DIR=\"${CONFIG_DIR}\")
if(WIN32)
set(HAVE_LIBWS2_32 1)
set(EXTRA_WINDOWS_SOURCES "${PROJECT_BINARY_DIR}/windows.rc")
set(EXTRA_WINDOWS_LIBRARIES setupapi ws2_32)
add_compile_definitions(WIN32NATIVE=1)
endif()
if(NOT WIN32)
@@ -325,11 +304,6 @@ if(NOT WIN32)
endif()
if(MSVC)
# The following functions are implemented in the MSVC compatibility layer
set(HAVE_USLEEP 1)
set(HAVE_GETTIMEOFDAY 1)
set(HAVE_STRCASECMP 1)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS=1)
add_compile_definitions(_CRT_NONSTDC_NO_WARNINGS=1)
add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS=1)
@@ -395,7 +369,6 @@ if (DEBUG_CMAKE)
message(STATUS "HAVE_LIBFTDI: ${HAVE_LIBFTDI}")
message(STATUS "HAVE_LIBFTDI1: ${HAVE_LIBFTDI1}")
message(STATUS "HAVE_LIBREADLINE: ${HAVE_LIBREADLINE}")
message(STATUS "HAVE_LIBWS2_32: ${HAVE_LIBWS2_32}")
message(STATUS "HAVE_LIBELF_H: ${HAVE_LIBELF_H}")
message(STATUS "HAVE_LIBELF_LIBELF_H: ${HAVE_LIBELF_LIBELF_H}")
message(STATUS "HAVE_USB_H: ${HAVE_USB_H}")
@@ -555,7 +528,6 @@ add_library(libavrdude STATIC
lists.c
micronucleus.c
micronucleus.h
my_ddk_hidsdi.h
par.c
par.h
pgm.c