Skip to content

Commit

Permalink
Add missing function to vulkan_functions header
Browse files Browse the repository at this point in the history
  • Loading branch information
Alairion committed Mar 11, 2023
1 parent 2c549b3 commit bbc21cd
Show file tree
Hide file tree
Showing 28 changed files with 326 additions and 238 deletions.
109 changes: 45 additions & 64 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,43 @@ project(captal_engine VERSION 0.1.0
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

option(CAPTAL_SUPERBUILD "Build all Captal's dependencies" ON)
option(CAPTAL_USE_LTO "Build Captal and its submodules with LTO enabled, if supported" OFF)

option(CAPTAL_BUILD_FOUNDATION_EXAMPLES "Build Captal Foundation's examples if ON" OFF)
option(CAPTAL_BUILD_FOUNDATION_TESTS "Build Captal Foundation's unit tests if ON" OFF)

option(CAPTAL_BUILD_APYRE "Build Apyre if ON" OFF)
option(CAPTAL_BUILD_APYRE_STATIC "Build Apyre as a static library if ON" OFF)
option(CAPTAL_BUILD_APYRE_EXAMPLES "Build Apyre's examples if ON, does nothing if CAPTAL_BUILD_APYRE is off" OFF)
option(CAPTAL_BUILD_APYRE_TESTS "Build Apyre's unit tests if ON, does nothing if CAPTAL_BUILD_APYRE is off" OFF)

option(CAPTAL_BUILD_TEPHRA "Build Tephra if ON" OFF)
option(CAPTAL_BUILD_TEPHRA_STATIC "Build Tephra as a static library if ON" OFF)
option(CAPTAL_BUILD_TEPHRA_EXAMPLES "Build Tephra's examples if ON, implies CAPTAL_BUILD_APYRE. Does nothing if CAPTAL_BUILD_TEPHRA is off" OFF)
option(CAPTAL_BUILD_TEPHRA_TESTS "Build Tephra's unit tests if ON, implies CAPTAL_BUILD_APYRE. Does nothing if CAPTAL_BUILD_TEPHRA is off" OFF)

option(CAPTAL_BUILD_SWELL "Build Swell if ON" OFF)
option(CAPTAL_BUILD_SWELL_STATIC "Build Swell as a static library if ON" OFF)
option(CAPTAL_BUILD_SWELL_EXAMPLES "Build Swell's examples if ON. Does nothing if CAPTAL_BUILD_SWELL is off" OFF)
option(CAPTAL_BUILD_SWELL_TESTS "Build Swell's unit tests if ON. Does nothing if CAPTAL_BUILD_SWELL is off" OFF)

option(CAPTAL_BUILD_CAPTAL "Build Captal if ON, implies CAPTAL_BUILD_TEPHRA, CAPTAL_BUILD_APYRE and CAPTAL_BUILD_SWELL if ON" OFF)
option(CAPTAL_BUILD_CAPTAL_STATIC "Build Captal as a static library if ON" OFF)
option(CAPTAL_BUILD_CAPTAL_EXAMPLES "Build Captal's examples if ON. Does nothing if CAPTAL_BUILD_CAPTAL is off" OFF)
option(CAPTAL_BUILD_CAPTAL_TESTS "Build Captal's unit tests if ON. Does nothing if CAPTAL_BUILD_CAPTAL is off" OFF)

if(CAPTAL_BUILD_CAPTAL)
set(CAPTAL_BUILD_APYRE ON CACHE BOOL "Build Apyre if ON" FORCE)
set(CAPTAL_BUILD_TEPHRA ON CACHE BOOL "Build Tephra if ON" FORCE)
set(CAPTAL_BUILD_SWELL ON CACHE BOOL "Build Swell if ON" FORCE)
option(CPT_SUPERBUILD "Build all Captal's dependencies" ON)
option(CPT_USE_LTO "Build Captal and its submodules with LTO enabled, if supported" OFF)

option(CPT_BUILD_FOUNDATION_EXAMPLES "Build Captal Foundation's examples if ON" OFF)
option(CPT_BUILD_FOUNDATION_TESTS "Build Captal Foundation's unit tests if ON" OFF)

option(CPT_BUILD_APYRE "Build Apyre if ON" OFF)
option(CPT_BUILD_APYRE_STATIC "Build Apyre as a static library if ON" OFF)
option(CPT_BUILD_APYRE_EXAMPLES "Build Apyre's examples if ON, does nothing if CPT_BUILD_APYRE is off" OFF)
option(CPT_BUILD_APYRE_TESTS "Build Apyre's unit tests if ON, does nothing if CPT_BUILD_APYRE is off" OFF)

option(CPT_BUILD_TEPHRA "Build Tephra if ON" OFF)
option(CPT_BUILD_TEPHRA_STATIC "Build Tephra as a static library if ON" OFF)
option(CPT_BUILD_TEPHRA_EXAMPLES "Build Tephra's examples if ON, implies CPT_BUILD_APYRE. Does nothing if CPT_BUILD_TEPHRA is off" OFF)
option(CPT_BUILD_TEPHRA_TESTS "Build Tephra's unit tests if ON, implies CPT_BUILD_APYRE. Does nothing if CPT_BUILD_TEPHRA is off" OFF)

option(CPT_BUILD_SWELL "Build Swell if ON" OFF)
option(CPT_BUILD_SWELL_STATIC "Build Swell as a static library if ON" OFF)
option(CPT_BUILD_SWELL_EXAMPLES "Build Swell's examples if ON. Does nothing if CPT_BUILD_SWELL is off" OFF)
option(CPT_BUILD_SWELL_TESTS "Build Swell's unit tests if ON. Does nothing if CPT_BUILD_SWELL is off" OFF)

option(CPT_BUILD_CAPTAL "Build Captal if ON, implies CPT_BUILD_TEPHRA, CPT_BUILD_APYRE and CPT_BUILD_SWELL if ON" OFF)
option(CPT_BUILD_CAPTAL_STATIC "Build Captal as a static library if ON" OFF)
option(CPT_BUILD_CAPTAL_EXAMPLES "Build Captal's examples if ON. Does nothing if CPT_BUILD_CAPTAL is off" OFF)
option(CPT_BUILD_CAPTAL_TESTS "Build Captal's unit tests if ON. Does nothing if CPT_BUILD_CAPTAL is off" OFF)

if(CPT_BUILD_CAPTAL)
set(CPT_BUILD_APYRE ON CACHE BOOL "Build Apyre if ON" FORCE)
set(CPT_BUILD_TEPHRA ON CACHE BOOL "Build Tephra if ON" FORCE)
set(CPT_BUILD_SWELL ON CACHE BOOL "Build Swell if ON" FORCE)
endif()

if(CAPTAL_BUILD_TEPHRA)
include(CMakeDependentOption)

cmake_dependent_option(TEPHRA_USE_PLATFORM_ANDROID "If on, enable the Android surface extension" ON "${CMAKE_SYSTEM_NAME} STREQUAL Android" OFF)
cmake_dependent_option(TEPHRA_USE_PLATFORM_IOS "If on, enable the IOS surface extension" ON "${CMAKE_SYSTEM_NAME} STREQUAL iOS" OFF)
cmake_dependent_option(TEPHRA_USE_PLATFORM_WIN32 "If on, enable the Windows surface extension" ON "${CMAKE_SYSTEM_NAME} STREQUAL Windows" OFF)
cmake_dependent_option(TEPHRA_USE_PLATFORM_MACOS "If on, enable the OSX surface extension" ON "${CMAKE_SYSTEM_NAME} STREQUAL Darwin" OFF)
cmake_dependent_option(TEPHRA_USE_PLATFORM_XLIB "If on, enable the Linux Xlib surface extension" ON "${CMAKE_SYSTEM_NAME} STREQUAL Linux" OFF)

#Other linux platforms
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
option(TEPHRA_USE_PLATFORM_XCB "If on, enable the Linux XCB surface extension" OFF)
option(TEPHRA_USE_PLATFORM_WAYLAND "If on, enable the Linux Wayland surface extension" OFF)
endif()
if(CPT_BUILD_TEPHRA AND (CPT_BUILD_TEPHRA_EXAMPLES OR CPT_BUILD_TEPHRA_TESTS))
set(CPT_BUILD_APYRE ON CACHE BOOL "Build Apyre if ON" FORCE)
endif()

if(CAPTAL_BUILD_TEPHRA AND (CAPTAL_BUILD_TEPHRA_EXAMPLES OR CAPTAL_BUILD_TEPHRA_TESTS))
set(CAPTAL_BUILD_APYRE ON CACHE BOOL "Build Apyre if ON" FORCE)
endif()

if(CAPTAL_USE_LTO)
if(CPT_USE_LTO)
include(CheckIPOSupported)
check_ipo_supported(RESULT LTO_SUPPORT OUTPUT LTO_OUTPUT)

Expand All @@ -73,40 +57,39 @@ else()
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF CACHE BOOL "" FORCE)
endif()

if(CAPTAL_SUPERBUILD)
if(CPT_SUPERBUILD)
include(cmake/superbuild.cmake)
return()
endif()

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)

if(CAPTAL_BUILD_FOUNDATION_TESTS OR CAPTAL_BUILD_APYRE_TESTS OR CAPTAL_BUILD_TEPHRA_TESTS OR CAPTAL_BUILD_SWELL_TESTS OR CAPTAL_BUILD_CAPTAL_TESTS)
if(CPT_BUILD_FOUNDATION_TESTS OR CPT_BUILD_APYRE_TESTS OR CPT_BUILD_TEPHRA_TESTS OR CPT_BUILD_SWELL_TESTS OR CPT_BUILD_CPT_TESTS)
include(cmake/download_submodule.cmake)
include(cmake/buildcatch.cmake)
endif()


find_package(NotEnoughStandards REQUIRED)

add_subdirectory(captal_foundation)
set(TO_EXPORT CaptalFoundation)

if(CAPTAL_BUILD_APYRE)
if(CPT_BUILD_APYRE)
add_subdirectory(apyre)
list(APPEND TO_EXPORT Apyre)
endif()

if(CAPTAL_BUILD_TEPHRA)
if(CPT_BUILD_TEPHRA)
add_subdirectory(tephra)
list(APPEND TO_EXPORT Tephra)
endif()

if(CAPTAL_BUILD_SWELL)
if(CPT_BUILD_SWELL)
add_subdirectory(swell)
list(APPEND TO_EXPORT Swell)
endif()

if(CAPTAL_BUILD_CAPTAL)
if(CPT_BUILD_CAPTAL)
add_subdirectory(captal)
list(APPEND TO_EXPORT Captal)
endif()
Expand All @@ -116,7 +99,7 @@ include(CMakePackageConfigHelpers)
configure_package_config_file(
${PROJECT_SOURCE_DIR}/cmake/CaptalConfig.cmake.in
${PROJECT_BINARY_DIR}/CaptalConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake
INSTALL_DESTINATION lib/cmake/captal
)

write_basic_package_version_file(
Expand All @@ -142,22 +125,20 @@ install(FILES
${PROJECT_BINARY_DIR}/CaptalConfigVersion.cmake
DESTINATION lib/cmake/captal)

if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
if(CAPTAL_BUILD_APYRE)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if(CPT_BUILD_APYRE)
install(FILES $<TARGET_PDB_FILE:Apyre> DESTINATION bin/${CMAKE_BUILD_TYPE} OPTIONAL)
endif()

if(CAPTAL_BUILD_TEPHRA)
if(CPT_BUILD_TEPHRA)
install(FILES $<TARGET_PDB_FILE:Tephra> DESTINATION bin/${CMAKE_BUILD_TYPE} OPTIONAL)
endif()

if(CAPTAL_BUILD_SWELL)
if(CPT_BUILD_SWELL)
install(FILES $<TARGET_PDB_FILE:Swell> DESTINATION bin/${CMAKE_BUILD_TYPE} OPTIONAL)
endif()

if(CAPTAL_BUILD_CAPTAL)
if(CPT_BUILD_CAPTAL)
install(FILES $<TARGET_PDB_FILE:Captal> DESTINATION bin/${CMAKE_BUILD_TYPE} OPTIONAL)
endif()
endif()

export(PACKAGE Captal)
4 changes: 2 additions & 2 deletions apyre/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(APYRE_SOURCES
src/apyre/power.cpp
)

if(CAPTAL_BUILD_APYRE_STATIC)
if(CPT_BUILD_APYRE_STATIC)
add_library(Apyre STATIC ${APYRE_SOURCES})
target_compile_definitions(Apyre PUBLIC APYRE_STATIC_BUILD)
set_target_properties(Apyre PROPERTIES POSITION_INDEPENDENT_CODE ON)
Expand Down Expand Up @@ -62,7 +62,7 @@ if(WIN32)
target_compile_definitions(Apyre PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
endif()

if(CAPTAL_BUILD_APYRE_EXAMPLES)
if(CPT_BUILD_APYRE_EXAMPLES)
add_executable(ApyreTest "main.cpp")
target_link_libraries(ApyreTest PRIVATE Apyre)
endif()
Expand Down
4 changes: 2 additions & 2 deletions captal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ set(CAPTAL_SOURCES
src/captal/external/pugixml.cpp
)

if(CAPTAL_BUILD_CAPTAL_STATIC)
if(CPT_BUILD_CAPTAL_STATIC)
add_library(Captal STATIC ${CAPTAL_SOURCES})
target_compile_definitions(Captal PUBLIC CAPTAL_STATIC_BUILD)
set_target_properties(Captal PROPERTIES POSITION_INDEPENDENT_CODE ON)
Expand Down Expand Up @@ -146,7 +146,7 @@ target_link_libraries(Captal
NotEnoughStandards::NotEnoughStandards
)

if(CAPTAL_BUILD_CAPTAL_EXAMPLES)
if(CPT_BUILD_CAPTAL_EXAMPLES)
add_library(CaptalSansation STATIC sansation.hpp sansation.cpp)

add_executable(CaptalExample main.cpp)
Expand Down
4 changes: 2 additions & 2 deletions captal/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ static void run()
//Other parameter are more situational. Check out the doc.
constexpr cpt::video_mode video_mode
{
.image_count = 2,
.present_mode = tph::present_mode::fifo,
.image_count = 3,
.present_mode = tph::present_mode::mailbox,
.sample_count = tph::sample_count::msaa_x4,
.depth_format = tph::texture_format::d32_sfloat
};
Expand Down
18 changes: 12 additions & 6 deletions cmake/CaptalConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
@PACKAGE_INIT@

if(@CAPTAL_BUILD_TEPHRA@)
find_package(VULKAN REQUIRED)
if(@CPT_BUILD_TEPHRA@)
find_package(Vulkan REQUIRED)
endif()

set(EnTT_DIR "@EnTT_DIR@" CACHE PATH INTERNAL "")
set(PalSigslot_DIR "@PalSigslot_DIR@" CACHE PATH INTERNAL "")
set(NotEnoughStandards_DIR "@NotEnoughStandards_DIR@" CACHE PATH INTERNAL "")
include(CMakeFindDependencyMacro)

if(@CPT_BUILD_CAPTAL@)
set(EnTT_DIR "@EnTT_DIR@" CACHE PATH "")
set(PalSigslot_DIR "@PalSigslot_DIR@" CACHE PATH "")

find_dependency(EnTT REQUIRED)
find_dependency(PalSigslot REQUIRED)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/CaptalTargets.cmake")
check_required_components("@PROJECT_NAME@")
check_required_components("Captal")
55 changes: 24 additions & 31 deletions cmake/superbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ set(ADDITIONAL_CMAKE_ARGS)
# Shared dependencies
include(cmake/superbuild_not_enough_standards.cmake)

if(CAPTAL_BUILD_APYRE)
if(CPT_BUILD_APYRE)
include(cmake/superbuild_sdl2.cmake)
endif()

if(CAPTAL_BUILD_TEPHRA)
if(CPT_BUILD_TEPHRA)
# Tephra has no dependency
endif()

if(CAPTAL_BUILD_SWELL)
if(CPT_BUILD_SWELL)
include(cmake/superbuild_portaudio.cmake)
include(cmake/superbuild_ogg.cmake)
include(cmake/superbuild_vorbis.cmake)
include(cmake/superbuild_flac.cmake)
endif()

if(CAPTAL_BUILD_CAPTAL)
if(CPT_BUILD_CAPTAL)
include(cmake/superbuild_zlib.cmake)
include(cmake/superbuild_freetype.cmake)
include(cmake/superbuild_chipmunk.cmake)
Expand All @@ -86,40 +86,33 @@ ExternalProject_Add(Captal
DEPENDS ${DEPENDENCIES}
SOURCE_DIR ${PROJECT_SOURCE_DIR}
CMAKE_CACHE_ARGS
"-DCAPTAL_SUPERBUILD:BOOL=OFF"
"-DCPT_SUPERBUILD:BOOL=OFF"
"-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}"
"-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/install"
"-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}"
"-DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}"
"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
"-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}"
"-DCMAKE_CXX_FLAGS_MINSIZEREL:STRING=${CMAKE_CXX_FLAGS_MINSIZEREL}"
"-DCAPTAL_USE_LTO:BOOL=${CAPTAL_USE_LTO}"
"-DCAPTAL_BUILD_FOUNDATION_EXAMPLES:BOOL=${CAPTAL_BUILD_FOUNDATION_EXAMPLES}"
"-DCAPTAL_BUILD_FOUNDATION_TESTS:BOOL=${CAPTAL_BUILD_FOUNDATION_TESTS}"
"-DCAPTAL_BUILD_APYRE:BOOL=${CAPTAL_BUILD_APYRE}"
"-DCAPTAL_BUILD_APYRE_STATIC:BOOL=${CAPTAL_BUILD_APYRE_STATIC}"
"-DCAPTAL_BUILD_APYRE_EXAMPLES:BOOL=${CAPTAL_BUILD_APYRE_EXAMPLES}"
"-DCAPTAL_BUILD_APYRE_TESTS:BOOL=${CAPTAL_BUILD_APYRE_TESTS}"
"-DCAPTAL_BUILD_TEPHRA:BOOL=${CAPTAL_BUILD_TEPHRA}"
"-DCAPTAL_BUILD_TEPHRA_STATIC:BOOL=${CAPTAL_BUILD_TEPHRA_STATIC}"
"-DCAPTAL_BUILD_TEPHRA_EXAMPLES:BOOL=${CAPTAL_BUILD_TEPHRA_EXAMPLES}"
"-DCAPTAL_BUILD_TEPHRA_TESTS:BOOL=${CAPTAL_BUILD_TEPHRA_TESTS}"
"-DCAPTAL_BUILD_SWELL:BOOL=${CAPTAL_BUILD_SWELL}"
"-DCAPTAL_BUILD_SWELL_STATIC:BOOL=${CAPTAL_BUILD_SWELL_STATIC}"
"-DCAPTAL_BUILD_SWELL_EXAMPLES:BOOL=${CAPTAL_BUILD_SWELL_EXAMPLES}"
"-DCAPTAL_BUILD_SWELL_TESTS:BOOL=${CAPTAL_BUILD_SWELL_TESTS}"
"-DCAPTAL_BUILD_CAPTAL:BOOL=${CAPTAL_BUILD_CAPTAL}"
"-DCAPTAL_BUILD_CAPTAL_STATIC:BOOL=${CAPTAL_BUILD_CAPTAL_STATIC}"
"-DCAPTAL_BUILD_CAPTAL_EXAMPLES:BOOL=${CAPTAL_BUILD_CAPTAL_EXAMPLES}"
"-DCAPTAL_BUILD_CAPTAL_TESTS:BOOL=${CAPTAL_BUILD_CAPTAL_TESTS}"
"-DTEPHRA_USE_PLATFORM_ANDROID:BOOL=${TEPHRA_USE_PLATFORM_ANDROID}"
"-DTEPHRA_USE_PLATFORM_IOS:BOOL=${TEPHRA_USE_PLATFORM_IOS}"
"-DTEPHRA_USE_PLATFORM_WIN32:BOOL=${TEPHRA_USE_PLATFORM_WIN32}"
"-DTEPHRA_USE_PLATFORM_MACOS:BOOL=${TEPHRA_USE_PLATFORM_MACOS}"
"-DTEPHRA_USE_PLATFORM_XLIB:BOOL=${TEPHRA_USE_PLATFORM_XLIB}"
"-DTEPHRA_USE_PLATFORM_XCB:BOOL=${TEPHRA_USE_PLATFORM_XCB}"
"-DTEPHRA_USE_PLATFORM_WAYLAND:BOOL=${TEPHRA_USE_PLATFORM_WAYLAND}"
"-DCPT_USE_LTO:BOOL=${CPT_USE_LTO}"
"-DCPT_BUILD_FOUNDATION_EXAMPLES:BOOL=${CPT_BUILD_FOUNDATION_EXAMPLES}"
"-DCPT_BUILD_FOUNDATION_TESTS:BOOL=${CPT_BUILD_FOUNDATION_TESTS}"
"-DCPT_BUILD_APYRE:BOOL=${CPT_BUILD_APYRE}"
"-DCPT_BUILD_APYRE_STATIC:BOOL=${CPT_BUILD_APYRE_STATIC}"
"-DCPT_BUILD_APYRE_EXAMPLES:BOOL=${CPT_BUILD_APYRE_EXAMPLES}"
"-DCPT_BUILD_APYRE_TESTS:BOOL=${CPT_BUILD_APYRE_TESTS}"
"-DCPT_BUILD_TEPHRA:BOOL=${CPT_BUILD_TEPHRA}"
"-DCPT_BUILD_TEPHRA_STATIC:BOOL=${CPT_BUILD_TEPHRA_STATIC}"
"-DCPT_BUILD_TEPHRA_EXAMPLES:BOOL=${CPT_BUILD_TEPHRA_EXAMPLES}"
"-DCPT_BUILD_TEPHRA_TESTS:BOOL=${CPT_BUILD_TEPHRA_TESTS}"
"-DCPT_BUILD_SWELL:BOOL=${CPT_BUILD_SWELL}"
"-DCPT_BUILD_SWELL_STATIC:BOOL=${CPT_BUILD_SWELL_STATIC}"
"-DCPT_BUILD_SWELL_EXAMPLES:BOOL=${CPT_BUILD_SWELL_EXAMPLES}"
"-DCPT_BUILD_SWELL_TESTS:BOOL=${CPT_BUILD_SWELL_TESTS}"
"-DCPT_BUILD_CAPTAL:BOOL=${CPT_BUILD_CAPTAL}"
"-DCPT_BUILD_CAPTAL_STATIC:BOOL=${CPT_BUILD_CAPTAL_STATIC}"
"-DCPT_BUILD_CAPTAL_EXAMPLES:BOOL=${CPT_BUILD_CAPTAL_EXAMPLES}"
"-DCPT_BUILD_CAPTAL_TESTS:BOOL=${CPT_BUILD_CAPTAL_TESTS}"
${ADDITIONAL_CMAKE_ARGS}
)

16 changes: 8 additions & 8 deletions cmake/superbuild_chipmunk.cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Download and build external project Chipmunk

option(CAPTAL_SUPERBUILD_EXCLUDE_CHIPMUNK "Does not build Chipmunk as a part of the superbuild, falling back on classic find_package." OFF)
option(CPT_SUPERBUILD_EXCLUDE_CHIPMUNK "Does not build Chipmunk as a part of the superbuild, falling back on classic find_package." OFF)

if(NOT CAPTAL_SUPERBUILD_EXCLUDE_CHIPMUNK)
set(CAPTAL_SUPERBUILD_CHIPMUNK_GIT_URL "https://github.com/slembcke/Chipmunk2D.git" CACHE STRING "Used url for Chipmunk git clone (allow usage of mirrors or interal repo)")
set(CAPTAL_SUPERBUILD_CHIPMUNK_GIT_TAG "master" CACHE STRING "Used tag for Chipmunk git clone")
if(NOT CPT_SUPERBUILD_EXCLUDE_CHIPMUNK)
set(CPT_SUPERBUILD_CHIPMUNK_GIT_URL "https://github.com/slembcke/Chipmunk2D.git" CACHE STRING "Used url for Chipmunk git clone (allow usage of mirrors or interal repo)")
set(CPT_SUPERBUILD_CHIPMUNK_GIT_TAG "master" CACHE STRING "Used tag for Chipmunk git clone")

mark_as_advanced(CAPTAL_SUPERBUILD_CHIPMUNK_GIT_URL)
mark_as_advanced(CAPTAL_SUPERBUILD_CHIPMUNK_GIT_TAG)
mark_as_advanced(CPT_SUPERBUILD_CHIPMUNK_GIT_URL)
mark_as_advanced(CPT_SUPERBUILD_CHIPMUNK_GIT_TAG)

ExternalProject_Add(Chipmunk
GIT_REPOSITORY ${CAPTAL_SUPERBUILD_CHIPMUNK_GIT_URL}
GIT_TAG ${CAPTAL_SUPERBUILD_CHIPMUNK_GIT_TAG}
GIT_REPOSITORY ${CPT_SUPERBUILD_CHIPMUNK_GIT_URL}
GIT_TAG ${CPT_SUPERBUILD_CHIPMUNK_GIT_TAG}
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
PREFIX "${CMAKE_BINARY_DIR}/dependencies/chipmunk"
Expand Down
16 changes: 8 additions & 8 deletions cmake/superbuild_entt.cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Download and build external project entt

option(CAPTAL_SUPERBUILD_EXCLUDE_ENTT "Does not build entt as a part of the superbuild, falling back on classic find_package." OFF)
option(CPT_SUPERBUILD_EXCLUDE_ENTT "Does not build entt as a part of the superbuild, falling back on classic find_package." OFF)

if(NOT CAPTAL_SUPERBUILD_EXCLUDE_ENTT)
set(CAPTAL_SUPERBUILD_ENTT_GIT_URL "https://github.com/skypjack/entt.git" CACHE STRING "Used url for entt git clone (allow usage of mirrors or interal repo)")
set(CAPTAL_SUPERBUILD_ENTT_GIT_TAG "v3.10.1" CACHE STRING "Used tag for entt git clone")
if(NOT CPT_SUPERBUILD_EXCLUDE_ENTT)
set(CPT_SUPERBUILD_ENTT_GIT_URL "https://github.com/skypjack/entt.git" CACHE STRING "Used url for entt git clone (allow usage of mirrors or interal repo)")
set(CPT_SUPERBUILD_ENTT_GIT_TAG "v3.10.1" CACHE STRING "Used tag for entt git clone")

mark_as_advanced(CAPTAL_SUPERBUILD_ENTT_GIT_URL)
mark_as_advanced(CAPTAL_SUPERBUILD_ENTT_GIT_TAG)
mark_as_advanced(CPT_SUPERBUILD_ENTT_GIT_URL)
mark_as_advanced(CPT_SUPERBUILD_ENTT_GIT_TAG)

ExternalProject_Add(EnTT
GIT_REPOSITORY ${CAPTAL_SUPERBUILD_ENTT_GIT_URL}
GIT_TAG ${CAPTAL_SUPERBUILD_ENTT_GIT_TAG}
GIT_REPOSITORY ${CPT_SUPERBUILD_ENTT_GIT_URL}
GIT_TAG ${CPT_SUPERBUILD_ENTT_GIT_TAG}
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
PREFIX "${CMAKE_BINARY_DIR}/dependencies/entt"
Expand Down
Loading

0 comments on commit bbc21cd

Please sign in to comment.