Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
prism/extern/CMakeLists.txt

118 lines
3.7 KiB
Text
Raw Normal View History

2020-08-11 12:07:21 -04:00
set(CMAKE_FOLDER "External")
include(FetchContent)
2020-08-11 12:07:21 -04:00
2020-09-22 12:54:08 -04:00
FetchContent_Declare(
bullet
GIT_REPOSITORY https://github.com/bulletphysics/bullet3.git
GIT_TAG 2.89
CMAKE_ARGS "-Wno-dev"
PATCH_COMMAND git apply --ignore-space-change --ignore-whitespace ${CMAKE_CURRENT_SOURCE_DIR}/fix_bullet_cmake_version.patch
2020-09-22 12:54:08 -04:00
)
FetchContent_Declare(
spirv-cross
GIT_REPOSITORY https://github.com/KhronosGroup/SPIRV-Cross.git
GIT_TAG MoltenVK-1.1.5
2020-09-22 12:54:08 -04:00
)
FetchContent_Declare(
glslang
GIT_REPOSITORY https://github.com/KhronosGroup/glslang.git
GIT_TAG df609a01b386001e367709086c58529c48028d1e # taken from https://github.com/KhronosGroup/SPIRV-Cross/blob/2021-01-15/checkout_glslang_spirv_tools.sh#L3
2020-09-22 12:54:08 -04:00
)
# bullet
set(BUILD_BULLET3 OFF CACHE BOOL "" FORCE)
set(BUILD_BULLET3_DEMOS OFF CACHE BOOL "" FORCE)
set(BUILD_BULLET2_DEMOS OFF CACHE BOOL "" FORCE)
set(BUILD_CPU_DEMOS OFF CACHE BOOL "" FORCE)
set(USE_GRAPHICAL_BENCHMARK OFF CACHE BOOL "" FORCE)
set(BUILD_EXTRAS OFF CACHE BOOL "" FORCE)
set(INSTALL_LIBS OFF CACHE BOOL "" FORCE)
# spirv-cross
set(BUILD_UNIT_TESTS OFF CACHE BOOL "" FORCE)
set(SPIRV_CROSS_SKIP_INSTALL ON CACHE BOOL "" FORCE)
set(BUILD_EXTERNAL OFF CACHE BOOL "" FORCE)
set(SPIRV_CROSS_CLI OFF CACHE BOOL "" FORCE)
set(SPIRV_CROSS_ENABLE_TESTS OFF CACHE BOOL "" FORCE)
set(SPIRV_CROSS_ENABLE_HLSL OFF CACHE BOOL "" FORCE)
set(SPIRV_CROSS_ENABLE_CPP OFF CACHE BOOL "" FORCE)
set(SPIRV_CROSS_ENABLE_REFLECT OFF CACHE BOOL "" FORCE)
set(SPIRV_CROSS_ENABLE_C_API OFF CACHE BOOL "" FORCE)
set(SPIRV_CROSS_ENABLE_UTIL OFF CACHE BOOL "" FORCE)
# glslang
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(BUILD_EXTERNAL OFF CACHE BOOL "" FORCE)
set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "" FORCE)
set(USE_MSVC_RUNTIME_LIBRARY_DLL ON CACHE BOOL "" FORCE)
set(ENABLE_GLSLANG_INSTALL OFF CACHE BOOL "" FORCE)
set(ENABLE_CTEST OFF CACHE BOOL "" FORCE)
set(CMAKE_PROJECT_BULLET_PHYSICS_INCLUDE_BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/fix_bad_cmake_dev.cmake)
2020-09-22 12:54:08 -04:00
FetchContent_MakeAvailable(bullet)
FetchContent_MakeAvailable(spirv-cross)
FetchContent_MakeAvailable(glslang)
2020-08-11 12:07:21 -04:00
set(OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF CACHE BOOL "" FORCE)
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
add_subdirectory(stb)
add_subdirectory(imgui)
add_subdirectory(magic_enum)
add_subdirectory(smaa)
add_subdirectory(doctest)
FetchContent_Declare(json
GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git
GIT_TAG v3.9.1)
2020-08-11 12:07:21 -04:00
FetchContent_GetProperties(json)
if (NOT json_POPULATED)
FetchContent_Populate(json)
add_subdirectory(${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL)
endif ()
if (NOT ENABLE_IOS AND NOT ENABLE_TVOS)
add_subdirectory(ogg)
add_subdirectory(opus)
add_library(opusfile
opusfile/src/opusfile.c
opusfile/src/info.c
opusfile/src/internal.c
opusfile/src/stream.c)
target_include_directories(opusfile
PUBLIC
opusfile/include)
target_link_libraries(opusfile
PUBLIC
ogg
opus)
endif ()
if (BUILD_TOOLS)
set(ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC OFF CACHE BOOL "" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(ASSIMP_NO_EXPORT ON CACHE BOOL "" FORCE)
set(ASSIMP_BUILD_SAMPLES OFF CACHE BOOL "" FORCE)
set(ASSIMP_INSTALL OFF CACHE BOOL "" FORCE)
set(ASSIMP_BUILD_ZLIB OFF CACHE BOOL "" FORCE)
set(ASSIMP_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL "" FORCE)
add_subdirectory(assimp)
endif ()
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt
GIT_TAG 8.0.1
)
FetchContent_MakeAvailable(fmt)
if (ENABLE_METAL)
add_subdirectory(metal-cpp)
endif ()