CMakeLists.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. cmake_minimum_required(VERSION 2.6)
  2. option( RAKNET_ENABLE_EXTENSIONS "Enable extension projects that might need specific dependencies." TRUE )
  3. option( RAKNET_EXTENSION_USEMYSQL "Enable extensions using MySQL" TRUE )
  4. option( RAKNET_EXTENSION_USEPOSTGRESQL "Enable extensions using PostgreSQL" TRUE )
  5. option( RAKNET_EXTENSION_USEBOOST "Enable extensions using Boost" TRUE )
  6. option( RAKNET_EXTENSION_USESPEEX "Enable extensions using Speex" TRUE )
  7. option( RAKNET_EXTENSION_USEIRRLICHT "Enable extensions using Irrlicht" TRUE )
  8. option( RAKNET_EXTENSION_USEIRRKLANG "Enable extensions using Irkklang" TRUE )
  9. option( RAKNET_EXTENSION_USEOGRE3D "Enable extensions using Ogre3D" TRUE )
  10. option( RAKNET_EXTENSION_Autopatcher "Enable Autopatcher extension" TRUE )
  11. add_subdirectory("bzip2-1.0.6")
  12. add_subdirectory("XML")
  13. if( RAKNET_ENABLE_EXTENSIONS )
  14. IF(RAKNET_EXTENSION_USEMYSQL )
  15. add_subdirectory(MySQLInterface)
  16. ENDIF()
  17. IF(RAKNET_EXTENSION_USEPOSTGRESQL)
  18. add_subdirectory(PostgreSQLInterface)
  19. ENDIF()
  20. endif()
  21. if( RAKNET_EXTENSION_Autopatcher )
  22. add_subdirectory(Autopatcher)
  23. endif()
  24. IF (WIN32 AND NOT UNIX)
  25. IF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles")
  26. add_subdirectory(portaudio_v18_1)
  27. ENDIF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles")
  28. add_subdirectory(speex-1.1.12)
  29. ENDIF(WIN32 AND NOT UNIX)
  30. if( RAKNET_ENABLE_EXTENSIONS )
  31. IF(RAKNET_EXTENSION_USEBOOST)
  32. add_subdirectory(RPC3)
  33. ENDIF()
  34. endif()
  35. IF(NOT WIN32 AND UNIX)
  36. IF(RAKNET_EXTENSION_USESPEEX AND RAKNET_ENABLE_EXTENSIONS)
  37. FINDSPEEX()
  38. include_directories(${RAKNETHEADERFILES} ${SPEEX_INCLUDE_DIRS})
  39. add_library(LibRakVoice STATIC RakVoice.h RakVoice.cpp)
  40. target_link_libraries(LibRakVoice ${RAKNET_COMMON_LIBS} ${SPEEX_LIBRARIES})
  41. ENDIF()
  42. ENDIF()
  43. if( RAKNET_ENABLE_EXTENSIONS )
  44. IF( RAKNET_EXTENSION_USEIRRLICHT AND RAKNET_EXTENSION_USEIRRKLANG )
  45. add_subdirectory(IrrlichtDemo)
  46. ENDIF()
  47. IF( RAKNET_EXTENSION_USEOGRE3D )
  48. add_subdirectory(Ogre3DInterpDemo)
  49. ENDIF()
  50. endif()
粤ICP备19079148号