CMakeLists.txt
上传用户:gb3593
上传日期:2022-01-07
资源大小:3028k
文件大小:1k
源码类别:

游戏引擎

开发平台:

Visual C++

  1. cmake_minimum_required(VERSION 2.4)
  2. project(Box2D)
  3. if(UNIX)
  4. set(BOX2D_INSTALL_BY_DEFAULT ON)
  5. else(UNIX)
  6. set(BOX2D_INSTALL_BY_DEFAULT OFF)
  7. endif(UNIX)
  8. option(BOX2D_INSTALL "Install Box2D libs, includes, and CMake scripts" ${BOX2D_INSTALL_BY_DEFAULT})
  9. option(BOX2D_INSTALL_DOC "Install Box2D documentation" OFF)
  10. option(BOX2D_BUILD_SHARED "Build Box2D shared libraries" OFF)
  11. option(BOX2D_BUILD_STATIC "Build Box2D static libraries" ON)
  12. option(BOX2D_BUILD_EXAMPLES "Build Box2D examples" ON)
  13. set(BOX2D_VERSION 2.1.0)
  14. # The Box2D library.
  15. add_subdirectory(Box2D)
  16. if(BOX2D_BUILD_EXAMPLES)
  17.   # HelloWorld console example.
  18.   add_subdirectory(HelloWorld)
  19.   # Testbed and dependencies.
  20.   find_package(OpenGL REQUIRED)
  21.   add_subdirectory(freeglut)
  22.   add_subdirectory(glui)
  23.   add_subdirectory(Testbed)
  24. endif(BOX2D_BUILD_EXAMPLES)
  25. if(BOX2D_INSTALL_DOC)
  26.   install(DIRECTORY Documentation DESTINATION share/doc/Box2D PATTERN ".svn" EXCLUDE)
  27. endif(BOX2D_INSTALL_DOC)