1 Star 0 Fork 1

lengjianjun/box2d

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
Erin Catto 提交于 2020-10-17 17:09 . Prepare for 2.4.1 release (#657)
cmake_minimum_required(VERSION 3.8)
# https://cmake.org/cmake/help/latest/command/project.html
project(box2d VERSION 2.4.1)
# set(CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo" CACHE STRING "" FORCE)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
option(BOX2D_BUILD_UNIT_TESTS "Build the Box2D unit tests" ON)
option(BOX2D_BUILD_TESTBED "Build the Box2D testbed" ON)
option(BOX2D_BUILD_DOCS "Build the Box2D documentation" OFF)
option(BOX2D_USER_SETTINGS "Override Box2D settings with b2UserSettings.h" OFF)
option(BUILD_SHARED_LIBS "Build Box2D as a shared library" OFF)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
include(GNUInstallDirs)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if (BOX2D_USER_SETTINGS)
add_compile_definitions(B2_USER_SETTINGS)
endif()
add_subdirectory(src)
if (BOX2D_BUILD_DOCS)
set(DOXYGEN_SKIP_DOT TRUE)
find_package(Doxygen)
endif()
if (DOXYGEN_FOUND AND BOX2D_BUILD_DOCS)
add_subdirectory(docs)
endif()
if (BOX2D_BUILD_UNIT_TESTS)
add_subdirectory(unit-test)
endif()
if (BOX2D_BUILD_TESTBED)
add_subdirectory(extern/glad)
add_subdirectory(extern/glfw)
add_subdirectory(extern/imgui)
add_subdirectory(extern/sajson)
add_subdirectory(testbed)
# default startup project for Visual Studio
if (MSVC)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT testbed)
set_property(TARGET testbed PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/testbed")
endif()
endif()
install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/box2d"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/lengjianjun/box2d.git
git@gitee.com:lengjianjun/box2d.git
lengjianjun
box2d
box2d
main

搜索帮助