Switch CMake build system to use internal irrlicht on Linux. Probably breaks OSX, more to come

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11868 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2012-11-06 01:18:10 +00:00
parent 0e014a10b1
commit 6487c5220c

View File

@ -48,10 +48,6 @@ if(MSVC)
set(ENV{OPENALDIR} ${PROJECT_SOURCE_DIR}/dependencies)
endif()
# Irrlicht
find_package(Irrlicht 1.8 REQUIRED)
include_directories(${IRRLICHT_INCLUDE_DIRS})
# OpenAL
find_package(OpenAL REQUIRED)
include_directories(${OPENAL_INCLUDE_DIR})
@ -77,6 +73,18 @@ if(USE_FRIBIDI)
endif()
# OpenGL
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
if(UNIX AND NOT APPLE)
find_library(IRRLICHT_XF86VM_LIBRARY Xxf86vm)
mark_as_advanced(IRRLICHT_XF86VM_LIBRARY)
else()
set(IRRLICHT_XF86VM_LIBRARY "")
endif()
# Set some compiler options
if(UNIX)
add_definitions(-Wall)
@ -153,6 +161,21 @@ else()
target_link_libraries(supertuxkart ${PTHREAD_LIBRARY})
endif()
# To invoke irrlicht makefile. Just a few things must be checked before it can be uncommented :
# 1) make it pass NDEBUG=1
# 2) make the stdout output visible
#add_custom_target(
# stkirrlicht
# COMMAND make
# WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/irrlicht/source/Irrlicht
#)
#add_dependencies(supertuxkart stkirrlicht)
include_directories(${PROJECT_SOURCE_DIR}/lib/irrlicht/include)
# Common library dependencies
target_link_libraries(supertuxkart
bulletdynamics
@ -162,6 +185,8 @@ target_link_libraries(supertuxkart
${CURL_LIBRARIES}
${IRRLICHT_LIBRARIES}
${OGGVORBIS_LIBRARIES}
${PROJECT_SOURCE_DIR}/lib/irrlicht/lib/Linux/libIrrlicht.a
${IRRLICHT_XF86VM_LIBRARY}
${OPENAL_LIBRARY}
${OPENGL_LIBRARIES})