I am working on Clion(C++ 23), I got the SDL files to load perfectly but now I am struggling with SDL_image. Essentially the FindSDL_image.cmake file would not work so I read through the finder code and just directly connected to the Directory and Library. The relevant cmake file code is listed below:
set(SDL2_IMAGE_INCLUDE_DIRS “${PROJECT_SOURCE_DIR}/SDL2_image/i686-w64-mingw32/include/SDL2”)
set(SDL2_IMAGE_LIBRARY “${PROJECT_SOURCE_DIR}/SDL2_image/i686-w64-mingw32/lib/cmake/SDL2_image/sdl2_image-config.cmake”)
INCLUDE_DIRECTORIES(${SDL2_IMAGE_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${SDL2_IMAGE_LIBRARY})
This works, but unfortunately it keeps giving the errors below and I really don’t know how to even begin tackling them.
C:\Program Files\JetBrains\CLion 2023.2.1\bin\mingw\bin/ld.exe:C:/Users/thero/CLionProjects/F_Game/SDL2_image/i686-w64-mingw32/lib/cmake/SDL2_image/sdl2_image-config.cmake: file format not recognized; treating as linker script
C:\Program Files\JetBrains\CLion 2023.2.1\bin\mingw\bin/ld.exe:C:/Users/thero/CLionProjects/F_Game/SDL2_image/i686-w64-mingw32/lib/cmake/SDL2_image/sdl2_image-config.cmake:3: syntax error
collect2.exe: error: ld returned 1 exit status