Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang warning suppressions, warning fixes and CI #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
SDL2: fix SDL2 custom target on ubuntu 20.04 for clang
  • Loading branch information
ptheywood committed Jan 15, 2024
commit b8e875208c1799916e8f2d826a05eb98ef8273ff
4 changes: 2 additions & 2 deletions cmake/dependencies/sdl2.cmake
Original file line number Diff line number Diff line change
@@ -11,15 +11,15 @@ if(UNIX)
# Tested on ubuntu 20.04 / libsdl2-dev 2.0.10+dfsg1-3
if (NOT TARGET SDL2::SDL2)
# If we have a ${libdir} from the above find_package sdl2, use that.
if(${libdir})
if(libdir)
set(SDL2_LIBDIR ${libdir})
endif()
add_library(SDL2::SDL2 SHARED IMPORTED)
set_target_properties(SDL2::SDL2 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${SDL2_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2${CMAKE_SHARED_LIBRARY_SUFFIX}")
endif()
endif()
endif()
elseif(WIN32)
# On windows, always download manually. There are issues with find_package and multi-config generators where a release library will be found, but no debug library, which can break things.