Merge pull request #1992 from leyyin/font_tool
Fix font_tool build for Linux
This commit is contained in:
commit
dd7eb2cf68
@ -1,24 +1,33 @@
|
||||
option(FONT_TOOL "Compile font tool (only useful for developers)" OFF)
|
||||
mark_as_advanced(FONT_TOOL)
|
||||
|
||||
|
||||
if(FONT_TOOL)
|
||||
if(MSVC)
|
||||
add_executable(font_tool CFontTool.cpp main.cpp)
|
||||
target_link_libraries(font_tool stkirrlicht)
|
||||
else()
|
||||
find_package(Freetype)
|
||||
find_package(X11)
|
||||
find_library(FONTCONFIG_LIBRARY fontconfig)
|
||||
if(UNIX AND NOT APPLE)
|
||||
find_package(Xrandr REQUIRED)
|
||||
find_package(X11 REQUIRED)
|
||||
if(NOT XRANDR_FOUND)
|
||||
message(STATUS "XRANDR not found.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FREETYPE_FOUND)
|
||||
include_directories(${FREETYPE_INCLUDE_DIRS})
|
||||
add_executable(font_tool CFontTool.cpp main.cpp)
|
||||
|
||||
target_link_libraries(font_tool stkirrlicht)
|
||||
target_link_libraries(font_tool ${FREETYPE_LIBRARIES})
|
||||
target_link_libraries(font_tool ${X11_Xft_LIB} Xxf86vm)
|
||||
target_link_libraries(font_tool ${OPENGL_LIBRARIES})
|
||||
target_link_libraries(font_tool ${FONTCONFIG_LIBRARY})
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_link_libraries(font_tool ${XRANDR_LIBRARIES})
|
||||
target_link_libraries(font_tool ${X11_Xft_LIB} Xxf86vm)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Freetype was not found, the font tool won't be built (only useful for developers)")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user