Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! Update third party dependencies to vcpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
jherico committed Feb 13, 2024
1 parent f757eca commit 5db80f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ cmake_minimum_required(VERSION 3.16)
include(${CMAKE_CURRENT_SOURCE_DIR}/bldsys/cmake/ezvcpkg.cmake)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_PACKAGES catch2 cli11 fmt glm glslang imgui spdlog spirv-cross stb tinygltf vulkan-memory-allocator)
if ((NOT ANDROID) AND (NOT (VKB_WSI_SELECTION STREQUAL D2D)))
if ((NOT (CMAKE_SYSTEM_NAME STREQUAL "Android")) AND (NOT (VKB_WSI_SELECTION STREQUAL D2D)))
list(APPEND VCPKG_PACKAGES glfw3)
endif()

ezvcpkg_fetch(
COMMIT 2024.01.12
PACKAGES ${VCPKG_PACKAGES}
CLEAN_BUILDTREES
UPDATE_TOOLCHAIN
)

project(vulkan_samples)

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

set(CMAKE_PREFIX_PATH ${EZVCPKG_DIR} ${EZVCPKG_DIR}/share)
message(STATUS "CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}")
list(PREPEND CMAKE_PREFIX_PATH ${EZVCPKG_DIR} ${EZVCPKG_DIR}/share)
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
find_package(glm CONFIG REQUIRED)
find_package(fmt CONFIG REQUIRED)
Expand Down
9 changes: 5 additions & 4 deletions bldsys/cmake/ezvcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ macro(EZVCPKG_CALCULATE_PATHS)
set(EZVCPKG_HOST_TRIPLET "x64-linux")
endif()

if (ANDROID)
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
set(EZVCPKG_TRIPLET "arm64-android")
set(VCPKG_TARGET_TRIPLET "arm64-android")
else()
set(EZVCPKG_TRIPLET ${EZVCPKG_HOST_TRIPLET})
endif()
Expand Down Expand Up @@ -170,7 +171,7 @@ endmacro()
macro(EZVCPKG_BUILD)
if (EZVCPKG_SERIALIZE)
foreach(_PACKAGE ${EZVCPKG_PACKAGES})
message(STATUS "EZVCPKG Building/Verifying package ${_PACKAGE} using triplet ${EZVCPKG_TRIPLET}")
message(STATUS "EZVCPKG Building/Verifying package ${_PACKAGE}")
execute_process(
COMMAND ${EZVCPKG_EXE} --vcpkg-root ${EZVCPKG_DIR} install --triplet ${EZVCPKG_TRIPLET} ${_PACKAGE}
WORKING_DIRECTORY ${EZVCPKG_DIR}
Expand All @@ -185,7 +186,7 @@ macro(EZVCPKG_BUILD)
else()
string(REPLACE ";" " " EZVCPKG_PACKAGES_STR "${EZVCPKG_PACKAGES}")

message(STATUS "EZVCPKG Building/Verifying packages ${EZVCPKG_PACKAGES_STR} using triplet ${EZVCPKG_TRIPLET}")
message(STATUS "EZVCPKG Building/Verifying packages ${EZVCPKG_PACKAGES_STR}")
execute_process(
COMMAND ${EZVCPKG_EXE} --vcpkg-root ${EZVCPKG_DIR} install --triplet ${EZVCPKG_TRIPLET} ${EZVCPKG_PACKAGES}
WORKING_DIRECTORY ${EZVCPKG_DIR}
Expand Down Expand Up @@ -255,7 +256,7 @@ function(EZVCPKG_FETCH_IMPL)
# Figure out the paths for everything
EZVCPKG_CALCULATE_PATHS()

message(STATUS "EZVCPKG initializing\n\tcommit: ${EZVCPKG_COMMIT}\n\trepository: ${EZVCPKG_URL}\n\tlocal dir: ${EZVCPKG_DIR}")
message(STATUS "EZVCPKG initializing\n\tcommit: ${EZVCPKG_COMMIT}\n\trepository: ${EZVCPKG_URL}\n\tlocal dir: ${EZVCPKG_DIR}\n\ttriplet: ${EZVCPKG_TRIPLET}")

# We can't assume build systems will be well behaved if we attempt two different concurrent builds of the same
# target, so we need to have some locking here to ensure that for a given vcpkg location, only one instance
Expand Down

0 comments on commit 5db80f3

Please sign in to comment.