Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
d2fc98e4
Commit
d2fc98e4
authored
9 years ago
by
Dmitry Marakasov
Committed by
kwolekr
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix freetype detection
Don't reinvent freetype detection, use working one from cmake.
parent
0df73617
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/CMakeLists.txt
+23
-16
23 additions, 16 deletions
src/CMakeLists.txt
with
23 additions
and
16 deletions
src/CMakeLists.txt
+
23
−
16
View file @
d2fc98e4
...
...
@@ -111,23 +111,30 @@ option(ENABLE_FREETYPE "Enable FreeType2 (TrueType fonts and basic unicode suppo
set
(
USE_FREETYPE FALSE
)
if
(
ENABLE_FREETYPE
)
if
(
UNIX
)
include
(
FindPkgConfig
)
if
(
PKG_CONFIG_FOUND
)
pkg_check_modules
(
FREETYPE QUIET freetype2
)
if
(
FREETYPE_FOUND
)
SET
(
FREETYPE_PKGCONFIG_FOUND TRUE
)
SET
(
FREETYPE_LIBRARY
${
FREETYPE_LIBRARIES
}
)
# Because CMake is idiotic
string
(
REPLACE
";"
" "
FREETYPE_CFLAGS_STR
${
FREETYPE_CFLAGS
}
)
string
(
REPLACE
";"
" "
FREETYPE_LDFLAGS_STR
${
FREETYPE_LDFLAGS
}
)
endif
(
FREETYPE_FOUND
)
endif
(
PKG_CONFIG_FOUND
)
endif
(
UNIX
)
if
(
NOT FREETYPE_FOUND
)
find_package
(
Freetype
)
endif
()
##
## Note: FindFreetype.cmake seems to have been fixed in recent versions of
## CMake. If issues persist, re-enable this workaround specificially for the
## failing platforms.
##
# if(UNIX)
# include(FindPkgConfig)
# if(PKG_CONFIG_FOUND)
# pkg_check_modules(FREETYPE QUIET freetype2)
# if(FREETYPE_FOUND)
# SET(FREETYPE_PKGCONFIG_FOUND TRUE)
# SET(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES})
# # Because CMake is idiotic
# string(REPLACE ";" " " FREETYPE_CFLAGS_STR ${FREETYPE_CFLAGS})
# string(REPLACE ";" " " FREETYPE_LDFLAGS_STR ${FREETYPE_LDFLAGS})
# endif(FREETYPE_FOUND)
# endif(PKG_CONFIG_FOUND)
# endif(UNIX)
# if(NOT FREETYPE_FOUND)
# find_package(Freetype)
# endif()
find_package
(
Freetype
)
if
(
FREETYPE_FOUND
)
message
(
STATUS
"Freetype enabled."
)
set
(
USE_FREETYPE TRUE
)
set
(
CGUITTFONT_INCLUDE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cguittfont"
)
set
(
CGUITTFONT_LIBRARY cguittfont
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment