webOS: pre-create SDL include dirs for configure check

This commit is contained in:
kekko committed 2026-10-05 13:33:14 +02:00
1 parent 9b2496d025
commit 2bc80a179b
1 file changed
+5 -3
+5 -3
View File
@@ -49,10 +49,12 @@ endif ()
ExternalProject_Get_Property(ext_sdl2_backport INSTALL_DIR)
# Created now: CMake validates IMPORTED INTERFACE paths at configure time,
# but the tarball only lands at build time. An empty dir satisfies the
# check; the download fills it before any compile (add_dependencies below).
file(MAKE_DIRECTORY ${INSTALL_DIR}/include/SDL2 ${INSTALL_DIR}/include)
add_library(ext_sdl2_backport_target SHARED IMPORTED GLOBAL)
set_target_properties(ext_sdl2_backport_target PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIB_FILENAME})
target_include_directories(ext_sdl2_backport_target INTERFACE ${INSTALL_DIR}/include/SDL2 ${INSTALL_DIR}/include)
target_compile_definitions(ext_sdl2_backport_target INTERFACE __WEBOS__)
add_library(SDL2::SDL2 ALIAS ext_sdl2_backport_target)