Skip to content

Commit b8e8752

Browse files
committed
SDL2: fix SDL2 custom target on ubuntu 20.04 for clang
1 parent 54ba6cf commit b8e8752

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmake/dependencies/sdl2.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ if(UNIX)
1111
# Tested on ubuntu 20.04 / libsdl2-dev 2.0.10+dfsg1-3
1212
if (NOT TARGET SDL2::SDL2)
1313
# If we have a ${libdir} from the above find_package sdl2, use that.
14-
if(${libdir})
14+
if(libdir)
1515
set(SDL2_LIBDIR ${libdir})
1616
endif()
1717
add_library(SDL2::SDL2 SHARED IMPORTED)
1818
set_target_properties(SDL2::SDL2 PROPERTIES
1919
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
2020
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
2121
IMPORTED_LOCATION "${SDL2_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2${CMAKE_SHARED_LIBRARY_SUFFIX}")
22-
endif()
22+
endif()
2323
endif()
2424
elseif(WIN32)
2525
# 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.

0 commit comments

Comments
 (0)