mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-23 04:59:10 +00:00
cmake: avoid modifying CMAKE_C_FLAGS
This commit is contained in:
parent
8fc445c730
commit
053c37583c
2 changed files with 11 additions and 24 deletions
|
@ -1033,7 +1033,7 @@ macro(CheckHIDAPI)
|
|||
check_include_file(libusb.h HAVE_LIBUSB_H ${PKG_LIBUSB_CFLAGS})
|
||||
if(HAVE_LIBUSB_H)
|
||||
set(HAVE_LIBUSB TRUE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PKG_LIBUSB_CFLAGS}")
|
||||
target_compile_options(sdl-build-options INTERFACE ${PKG_LIBUSB_CFLAGS})
|
||||
if(HIDAPI_ONLY_LIBUSB)
|
||||
list(APPEND EXTRA_LIBS ${PKG_LIBUSB_LIBRARIES})
|
||||
else()
|
||||
|
@ -1108,8 +1108,7 @@ macro(CheckRPI)
|
|||
file(GLOB VIDEO_RPI_SOURCES ${SDL3_SOURCE_DIR}/src/video/raspberry/*.c)
|
||||
list(APPEND SOURCE_FILES ${VIDEO_RPI_SOURCES})
|
||||
list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBRARIES})
|
||||
# !!! FIXME: shouldn't be using CMAKE_C_FLAGS, right?
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
|
||||
target_compile_options(sdl-build-options INTERFACE ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS})
|
||||
list(APPEND EXTRA_LDFLAGS ${VIDEO_RPI_LDFLAGS})
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue