Merge pull request #826 from yegorich/cmake-dll

CMake: enable dynamic-link library for libavrdude
This commit is contained in:
Jörg Wunsch 2022-01-11 15:40:58 +01:00 committed by GitHub
commit 4e1bbf07ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,7 @@ option(HAVE_PARPORT "Enable parallel port support" OFF)
option(USE_EXTERNAL "Use external libraries from AVRDUDE GitHub repositories" OFF) option(USE_EXTERNAL "Use external libraries from AVRDUDE GitHub repositories" OFF)
option(USE_LIBUSBWIN32 "Prefer libusb-win32 over libusb" OFF) option(USE_LIBUSBWIN32 "Prefer libusb-win32 over libusb" OFF)
option(DEBUG_CMAKE "Enable debugging output for this CMake project" OFF) option(DEBUG_CMAKE "Enable debugging output for this CMake project" OFF)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
include(CheckIncludeFile) include(CheckIncludeFile)
include(CheckSymbolExists) include(CheckSymbolExists)
@ -476,7 +477,7 @@ endif()
# Project # Project
# ===================================== # =====================================
add_library(libavrdude STATIC add_library(libavrdude
ac_cfg.h ac_cfg.h
arduino.h arduino.h
arduino.c arduino.c
@ -585,6 +586,8 @@ add_library(libavrdude STATIC
${BISON_Parser_OUTPUTS} ${BISON_Parser_OUTPUTS}
) )
set_target_properties(libavrdude PROPERTIES PREFIX "")
target_include_directories(libavrdude target_include_directories(libavrdude
PUBLIC PUBLIC
"${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}"