|
@@ -196,6 +196,7 @@ endif()
|
|
|
|
|
|
|
|
option(PHYSFS_PLATFORM_SDL3 "Enable building for the SDL3 file system" FALSE)
|
|
option(PHYSFS_PLATFORM_SDL3 "Enable building for the SDL3 file system" FALSE)
|
|
|
if(PHYSFS_PLATFORM_SDL3)
|
|
if(PHYSFS_PLATFORM_SDL3)
|
|
|
|
|
+ find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
|
|
|
add_definitions(-DPHYSFS_PLATFORM_SDL3=1)
|
|
add_definitions(-DPHYSFS_PLATFORM_SDL3=1)
|
|
|
endif()
|
|
endif()
|
|
|
|
|
|
|
@@ -228,6 +229,9 @@ if(PHYSFS_BUILD_STATIC)
|
|
|
# no dll exports from the static library
|
|
# no dll exports from the static library
|
|
|
target_compile_definitions(physfs-static PRIVATE "PHYSFS_STATIC")
|
|
target_compile_definitions(physfs-static PRIVATE "PHYSFS_STATIC")
|
|
|
endif()
|
|
endif()
|
|
|
|
|
+ if(PHYSFS_PLATFORM_SDL3)
|
|
|
|
|
+ target_link_libraries(physfs-static PUBLIC SDL3::Headers)
|
|
|
|
|
+ endif()
|
|
|
target_include_directories(physfs-static PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>")
|
|
target_include_directories(physfs-static PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>")
|
|
|
target_link_libraries(physfs-static PRIVATE ${OPTIONAL_LIBRARY_LIBS} ${OTHER_LDFLAGS})
|
|
target_link_libraries(physfs-static PRIVATE ${OPTIONAL_LIBRARY_LIBS} ${OTHER_LDFLAGS})
|
|
|
list(APPEND PHYSFS_INSTALL_TARGETS "physfs-static")
|
|
list(APPEND PHYSFS_INSTALL_TARGETS "physfs-static")
|
|
@@ -255,6 +259,9 @@ if(PHYSFS_BUILD_SHARED)
|
|
|
if(WINRT)
|
|
if(WINRT)
|
|
|
set_property(TARGET physfs-shared PROPERTY VS_WINRT_COMPONENT TRUE)
|
|
set_property(TARGET physfs-shared PROPERTY VS_WINRT_COMPONENT TRUE)
|
|
|
endif()
|
|
endif()
|
|
|
|
|
+ if(PHYSFS_PLATFORM_SDL3)
|
|
|
|
|
+ target_link_libraries(physfs-shared PUBLIC SDL3::SDL3-shared)
|
|
|
|
|
+ endif()
|
|
|
target_include_directories(physfs-shared PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>")
|
|
target_include_directories(physfs-shared PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>")
|
|
|
target_link_libraries(physfs-shared PRIVATE ${OPTIONAL_LIBRARY_LIBS} ${OTHER_LDFLAGS})
|
|
target_link_libraries(physfs-shared PRIVATE ${OPTIONAL_LIBRARY_LIBS} ${OTHER_LDFLAGS})
|
|
|
list(APPEND PHYSFS_INSTALL_TARGETS "physfs-shared")
|
|
list(APPEND PHYSFS_INSTALL_TARGETS "physfs-shared")
|
|
@@ -276,6 +283,9 @@ if(PHYSFS_BUILD_TEST)
|
|
|
add_executable(test_physfs test/test_physfs.c)
|
|
add_executable(test_physfs test/test_physfs.c)
|
|
|
target_link_libraries(test_physfs PRIVATE PhysFS::PhysFS)
|
|
target_link_libraries(test_physfs PRIVATE PhysFS::PhysFS)
|
|
|
sdl_add_warning_options(test_physfs WARNING_AS_ERROR ${PHYSFS_WERROR})
|
|
sdl_add_warning_options(test_physfs WARNING_AS_ERROR ${PHYSFS_WERROR})
|
|
|
|
|
+ if(PHYSFS_PLATFORM_SDL3)
|
|
|
|
|
+ target_link_libraries(test_physfs PRIVATE SDL3::SDL3)
|
|
|
|
|
+ endif()
|
|
|
if(DOS)
|
|
if(DOS)
|
|
|
set_target_properties(test_physfs PROPERTIES OUTPUT_NAME "TESTPHYS") # 8.3 file names!
|
|
set_target_properties(test_physfs PROPERTIES OUTPUT_NAME "TESTPHYS") # 8.3 file names!
|
|
|
endif()
|
|
endif()
|
|
@@ -295,6 +305,9 @@ if(PHYSFS_BUILD_TEST)
|
|
|
if(UNIX)
|
|
if(UNIX)
|
|
|
add_executable(physfshttpd extras/physfshttpd.c)
|
|
add_executable(physfshttpd extras/physfshttpd.c)
|
|
|
target_link_libraries(physfshttpd PRIVATE PhysFS::PhysFS)
|
|
target_link_libraries(physfshttpd PRIVATE PhysFS::PhysFS)
|
|
|
|
|
+ if(PHYSFS_PLATFORM_SDL3)
|
|
|
|
|
+ target_link_libraries(physfshttpd PRIVATE SDL3::SDL3)
|
|
|
|
|
+ endif()
|
|
|
sdl_add_warning_options(physfshttpd WARNING_AS_ERROR ${PHYSFS_WERROR})
|
|
sdl_add_warning_options(physfshttpd WARNING_AS_ERROR ${PHYSFS_WERROR})
|
|
|
endif()
|
|
endif()
|
|
|
endif()
|
|
endif()
|