From 77ed2738215938d2e777756d019a8072f2bf8aaf Mon Sep 17 00:00:00 2001 From: hikerstk Date: Sun, 17 Nov 2013 01:04:48 +0000 Subject: [PATCH] Fixed VS compilation of font tool. The font_toop option is now also marked as advanced. I also tried to fix linux compilation, but that's untested (r14459 on 0.8.1). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14460 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- tools/font_tool/CMakeLists.txt | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/tools/font_tool/CMakeLists.txt b/tools/font_tool/CMakeLists.txt index 691dbe458..a0e58f792 100644 --- a/tools/font_tool/CMakeLists.txt +++ b/tools/font_tool/CMakeLists.txt @@ -1,20 +1,27 @@ -option(FONT_TOOL "Compile font tool" OFF) +option(FONT_TOOL "Compile font tool (only useful for developers)" OFF) +mark_as_advanced(FONT_TOOL) + if(FONT_TOOL) - find_package(Freetype) - find_package(X11) - find_library(FONTCONFIG_LIBRARY fontconfig) - - if(FREETYPE_FOUND) - include_directories(${FREETYPE_INCLUDE_DIRS}) + if(MSVC) add_executable(font_tool CFontTool.cpp main.cpp) - 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 ${IRRLICHT_LIBRARIES}) - target_link_libraries(font_tool ${FONTCONFIG_LIBRARY}) + target_link_libraries(font_tool stkirrlicht) else() - message(STATUS "Freetype was not found, the font tool won't be built (only useful for developers)") + find_package(Freetype) + find_package(X11) + find_library(FONTCONFIG_LIBRARY fontconfig) + + if(FREETYPE_FOUND) + include_directories(${FREETYPE_INCLUDE_DIRS}) + add_executable(font_tool CFontTool.cpp main.cpp) + 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 stkirrlicht) + target_link_libraries(font_tool ${FONTCONFIG_LIBRARY}) + else() + message(STATUS "Freetype was not found, the font tool won't be built (only useful for developers)") + endif() endif() else() message(STATUS "Font tool deactivated, the font tool won't be built (only useful for developers)")