Fixed string() when no SDL

This commit is contained in:
smallmodel 2023-08-19 23:10:48 +02:00
parent 2929bd82a5
commit 261b15851f
No known key found for this signature in database
GPG key ID: A96F163ED4891440

View file

@ -54,7 +54,9 @@ if(WIN32)
elseif(UNIX)
find_package(SDL2 REQUIRED)
string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES)
target_include_directories(omohsdl PUBLIC ${SDL2_INCLUDE_DIRS})
target_link_libraries(omohsdl PRIVATE ${SDL2_LIBRARIES})
if (SDL2_FOUND)
string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES)
target_include_directories(omohsdl PUBLIC ${SDL2_INCLUDE_DIRS})
target_link_libraries(omohsdl PRIVATE ${SDL2_LIBRARIES})
endif()
endif()