CMake : Improve error message when font tool is disabled, and add make dist target

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9765 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-09-06 00:15:06 +00:00
parent c4fc2a2bf7
commit 1aa2f7c57e

View File

@ -13,6 +13,7 @@ project(SuperTuxKart)
set(STK_SOURCE_DIR "src")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "bin")
set(PROJECT_VERSION "0.7.3")
# Tweakable values
if(CMAKE_BUILD_TYPE MATCHES "Debug")
@ -147,7 +148,8 @@ endif()
find_package(Freetype)
if(FREETYPE_FOUND AND FONT_TOOL)
if(FONT_TOOL)
if(FREETYPE_FOUND)
message("-- Freetype found")
find_package(X11)
include_directories(${FREETYPE_INCLUDE_DIRS})
@ -162,7 +164,10 @@ if(FREETYPE_FOUND AND FONT_TOOL)
target_link_libraries(font_tool ${OPENGL_LIBRARIES})
target_link_libraries(font_tool Irrlicht)
else()
message("-- Font tool deactivated/freetype not found, the font tool won't be built (only useful for developers)")
message("-- Freetype was not found, the font tool won't be built (only useful for developers)")
endif()
else()
message("-- Font tool deactivated, the font tool won't be built (only useful for developers)")
endif()
set( SRCS ${SRCS} src/main.cpp
@ -704,3 +709,16 @@ elseif(APPLE)
target_link_libraries(supertuxkart /System/Library/Frameworks/Cocoa.framework)
target_link_libraries(supertuxkart /System/Library/Frameworks/OpenGL.framework)
endif()
# Make dist target
add_custom_target(dist
COMMAND rm -rf ${CMAKE_BINARY_DIR}/SuperTuxKart-${PROJECT_VERSION} && rm -f ${CMAKE_BINARY_DIR}/SuperTuxKart-${PROJECT_VERSION}.tar.bz2
&& echo "Exporting..."
&& svn export ${PROJECT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/SuperTuxKart-${PROJECT_VERSION}
&& echo "Compressing..."
&& cd ${CMAKE_BINARY_DIR}
&& tar -cjf ${CMAKE_BINARY_DIR}/SuperTuxKart-${PROJECT_VERSION}.tar.bz2 ./SuperTuxKart-${PROJECT_VERSION}
&& echo "Done, cleaning up"
&& rm -rf ${CMAKE_BINARY_DIR}/SuperTuxKart-${PROJECT_VERSION}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})