libsdl-org / SDL_ttf

Support for TrueType (.ttf) font files with Simple Directmedia Layer.
zlib License
402 stars 131 forks source link

there is No Docs, No install guide... #427

Open juanpc2018 opened 3 weeks ago

juanpc2018 commented 3 weeks ago

https://github.com/libsdl-org/SDL_ttf/releases/tag/release-2.22.0 No Docs folder, API call list html should be included in installers, i know its in another repo and having another repo makes sense from a web developer POV, but from a student pov, makes more sense having the manual with the product.

No install guide... on wiki https://wiki.libsdl.org/SDL2_ttf/FrontPage

Project Page https://www.libsdl.org/projects/SDL_ttf/ moved here... cmake error:

does not appear to contain CMakeLists.txt.

make error:

make: Nothing to be done

$ whereis SDL

SDL: /usr/include/SDL /usr/include/SDL/SDL_main.h /usr/include/SDL2/SDL_main.h /usr/local/include/SDL2/SDL_main.h

$ cmake ~/Downloads/SDL/SDL_ttf/SDL2_ttf-2.22.0
CMake Error at CMakeLists.txt:15 (message):
  Prevented in-tree built.  Please create a build directory outside of the
  SDL_ttf source code and call cmake from there

creating a /build folder inside or outside does Not work like any other build.

~/Downloads/SDL/SDL_ttf/SDL2_ttf-2.22.0/build FAIL ~/Downloads/SDL/SDL_ttf/build FAIL ~/Downloads/SDL/build FAIL ~/Downloads/build FAIL

crazy.

madebr commented 3 weeks ago
juanpc2018 commented 3 weeks ago
  • The CMake scrips of the SDL2 libraries disallow in-tree builds. If you accidentally created an in-tree build, CMake created a CMakeCache.txt file and CMakeFiles directory. Because of these, you cannot do an out-of-tree builds. After removing those, you should be able to do an out-of-tree build. SDL2_ttf is entering maintenance mode. I just made it possible for SDL3_ttf to do in-tree builds.

    • Documentation of SDL3 improved a lot. Since the wiki and the headers are synchronized, I don't think it's useful to add those to development packages.

but the software i want to compile, developer is moving from SDL1 to SDL2, if i install SDL3 would add another layer of issues.

madebr commented 3 weeks ago

I didn't know about your particular situation. You should definitely port to SDL2 first.

I don't think we're not going to put lots of effort in improving SDL2_ttf's documentation, so I'd suggest to combine SDL2_ttf's headers and https://wiki.libsdl.org/SDL2_ttf/CategoryAPI . I think there is some syncing done.

If you still have problems, consider posting at https://discourse.libsdl.org/

TheZitroX commented 2 weeks ago

Just worked fine for SDL3 project with add_dependency I still have this error on Missing FreeType library in cmake

-- Configuring SDL3_ttf 3.0.0
-- Performing Test HAVE_WL_NO_UNDEFINED
-- Performing Test HAVE_WL_NO_UNDEFINED - Success
-- SDL3_ttf: Using system freetype library
CMake Error at C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
-- Configuring incomplete, errors occurred!
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.30/Modules/FindFreetype.cmake:165 (find_package_handle_standard_args)
  vendor/SDL_ttf/CMakeLists.txt:265 (find_package)

Error: Process completed with exit code 1.
8Observer8 commented 5 hours ago

Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)

I've solved it by installing FreeType library and adding these variables to the config commands, in my case:

-DFREETYPE_INCLUDE_DIRS=E:/libs/freetype-2-13-3-prefix/win/include
-DFREETYPE_LIBRARY=E:/libs/freetype-2-13-3-prefix/win/lib/libfreetype.a