# SDL\_rtf: cmake+autotools: fix prefix of sdl2\_ttf-config.cmake

**URL:** <https://discourse.libsdl.org/t/sdl-rtf-cmake-autotools-fix-prefix-of-sdl2-ttf-config-cmake/45779>\
**Category:** SDL Commits\
**Created:** [August 28, 2023, 4:40pm UTC](https://discourse.libsdl.org/t/sdl-rtf-cmake-autotools-fix-prefix-of-sdl2-ttf-config-cmake/45779 "2023-08-28T16:40:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [August 28, 2023, 4:40pm UTC](https://discourse.libsdl.org/t/sdl-rtf-cmake-autotools-fix-prefix-of-sdl2-ttf-config-cmake/45779/1 "2023-08-28T16:40:02Z")

</div>

> <https://github.com/libsdl-org/SDL_rtf/commit/cf0a7bfd8ee7c9b0b88d4551141b259cf0fe4ef4>
>
> There was an issue when /usr/lib64 was symlinked into e.g. /lib and cmake was co…nfigured
> with -DCMAKE\_PREFIX\_PATH=/

```diff
From cf0a7bfd8ee7c9b0b88d4551141b259cf0fe4ef4 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Mon, 28 Aug 2023 18:39:34 +0200
Subject: [PATCH] cmake+autotools: fix prefix of sdl2_ttf-config.cmake

There was an issue when /usr/lib64 was symlinked into e.g. /lib and cmake was configured
with -DCMAKE_PREFIX_PATH=/
---
 sdl2_rtf-config.cmake.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sdl2_rtf-config.cmake.in b/sdl2_rtf-config.cmake.in
index 1e587e6..86ec0b1 100644
--- a/sdl2_rtf-config.cmake.in
+++ b/sdl2_rtf-config.cmake.in
@@ -8,6 +8,7 @@ set_package_properties(SDL2_rtf PROPERTIES
 
 set(SDL2_rtf_FOUND TRUE)
 
+get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_DIR} REALPATH)
 get_filename_component(prefix "${CMAKE_CURRENT_LIST_DIR}@cmake_prefix_relpath@" ABSOLUTE)
 set(exec_prefix "@exec_prefix@")
 set(bindir "@bindir@")

```
