Skip to content

Commit 06757f3

Browse files
committed
Revert "Add vcpkg CONFIG mode support to Find modules and prioritize custom CMake module path"
This reverts commit de6f1ad.
1 parent bf882ab commit 06757f3

12 files changed

Lines changed: 7 additions & 109 deletions

attachments/CMake/FindKTX.cmake

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@
1313
# KTX::ktx
1414
#
1515

16-
# Try to find the package using CONFIG mode first (e.g., from vcpkg)
17-
find_package(ktx CONFIG QUIET)
18-
19-
if(ktx_FOUND)
20-
if(NOT TARGET KTX::ktx AND TARGET ktx::ktx)
21-
add_library(KTX::ktx ALIAS ktx::ktx)
22-
endif()
23-
set(KTX_FOUND TRUE)
24-
return()
25-
endif()
26-
2716
# Check if we're on Linux - if so, we'll skip the search and directly use FetchContent
2817
if(UNIX AND NOT APPLE)
2918
# On Linux, we assume KTX is not installed and proceed directly to fetching it

attachments/CMake/Findglm.cmake

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@
1212
# glm::glm
1313
#
1414

15-
# Try to find the package using CONFIG mode first (e.g., from vcpkg)
16-
find_package(glm CONFIG QUIET)
17-
18-
if(glm_FOUND)
19-
if(NOT TARGET glm::glm AND TARGET glm)
20-
add_library(glm::glm ALIAS glm)
21-
endif()
22-
return()
23-
endif()
24-
2515
# Try to find the package using pkg-config first
2616
find_package(PkgConfig QUIET)
2717
if(PKG_CONFIG_FOUND)
@@ -104,7 +94,7 @@ endif()
10494

10595
# Set the variables
10696
include(FindPackageHandleStandardArgs)
107-
find_package_handle_standard_args(glm
97+
find_package_handle_standard_args(glm
10898
REQUIRED_VARS glm_INCLUDE_DIR
10999
)
110100

attachments/CMake/Findnlohmann_json.cmake

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@
1212
# nlohmann_json::nlohmann_json
1313
#
1414

15-
# Try to find the package using CONFIG mode first (e.g., from vcpkg)
16-
find_package(nlohmann_json CONFIG QUIET)
17-
18-
if(nlohmann_json_FOUND)
19-
if(NOT TARGET nlohmann_json::nlohmann_json AND TARGET nlohmann_json)
20-
add_library(nlohmann_json::nlohmann_json ALIAS nlohmann_json)
21-
endif()
22-
return()
23-
endif()
24-
2515
# Try to find the package using pkg-config first
2616
find_package(PkgConfig QUIET)
2717
if(PKG_CONFIG_FOUND)

attachments/CMake/Findtinygltf.cmake

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@
1212
# tinygltf::tinygltf
1313
#
1414

15-
# Try to find the package using CONFIG mode first (e.g., from vcpkg)
16-
find_package(tinygltf CONFIG QUIET)
17-
18-
if(tinygltf_FOUND)
19-
if(NOT TARGET tinygltf::tinygltf AND TARGET tinygltf)
20-
add_library(tinygltf::tinygltf ALIAS tinygltf)
21-
endif()
22-
return()
23-
endif()
24-
2515
# First, try to find nlohmann_json
2616
find_package(nlohmann_json QUIET)
2717
if(NOT nlohmann_json_FOUND)

attachments/CMake/Findtinyobjloader.cmake

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
# It also defines the following targets:
1010
# tinyobjloader::tinyobjloader
1111

12-
# Try to find the package using CONFIG mode first (e.g., from vcpkg)
13-
find_package(tinyobjloader CONFIG QUIET)
14-
15-
if(tinyobjloader_FOUND)
16-
if(NOT TARGET tinyobjloader::tinyobjloader AND TARGET tinyobjloader)
17-
add_library(tinyobjloader::tinyobjloader ALIAS tinyobjloader)
18-
endif()
19-
return()
20-
endif()
21-
2212
# Try to find the package using pkg-config first
2313
find_package(PkgConfig QUIET)
2414
if(PKG_CONFIG_FOUND)
@@ -119,7 +109,7 @@ endif()
119109

120110
# Set the variables
121111
include(FindPackageHandleStandardArgs)
122-
find_package_handle_standard_args(tinyobjloader
112+
find_package_handle_standard_args(tinyobjloader
123113
REQUIRED_VARS tinyobjloader_INCLUDE_DIR
124114
)
125115

attachments/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ endif()
1111

1212
project (VulkanTutorial)
1313

14-
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")
14+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")
1515

1616
# Add option to enable/disable C++ 20 module
1717
option(ENABLE_CPP20_MODULE "Enable C++ 20 module support for Vulkan" OFF)

attachments/simple_engine/CMake/FindKTX.cmake

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@
1313
# KTX::ktx
1414
#
1515

16-
# Try to find the package using CONFIG mode first (e.g., from vcpkg)
17-
find_package(ktx CONFIG QUIET)
18-
19-
if(ktx_FOUND)
20-
if(NOT TARGET KTX::ktx AND TARGET ktx::ktx)
21-
add_library(KTX::ktx ALIAS ktx::ktx)
22-
endif()
23-
set(KTX_FOUND TRUE)
24-
return()
25-
endif()
26-
2716
# Check if we're on Linux - if so, we'll skip the search and directly use FetchContent
2817
if(UNIX AND NOT APPLE)
2918
# On Linux, we assume KTX is not installed and proceed directly to fetching it
@@ -81,7 +70,7 @@ if(NOT KTX_FOUND)
8170
FetchContent_Declare(
8271
ktx
8372
GIT_REPOSITORY https://github.com/KhronosGroup/KTX-Software.git
84-
GIT_TAG v4.3.1 # Use a specific tag for stability
73+
GIT_TAG v4.4.2 # Use a specific tag for stability
8574
)
8675

8776
# Set options to minimize build time and dependencies

attachments/simple_engine/CMake/Findglm.cmake

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@
1212
# glm::glm
1313
#
1414

15-
# Try to find the package using CONFIG mode first (e.g., from vcpkg)
16-
find_package(glm CONFIG QUIET)
17-
18-
if(glm_FOUND)
19-
if(NOT TARGET glm::glm AND TARGET glm)
20-
add_library(glm::glm ALIAS glm)
21-
endif()
22-
return()
23-
endif()
24-
2515
# Try to find the package using pkg-config first
2616
find_package(PkgConfig QUIET)
2717
if(PKG_CONFIG_FOUND)
@@ -104,7 +94,7 @@ endif()
10494

10595
# Set the variables
10696
include(FindPackageHandleStandardArgs)
107-
find_package_handle_standard_args(glm
97+
find_package_handle_standard_args(glm
10898
REQUIRED_VARS glm_INCLUDE_DIR
10999
)
110100

attachments/simple_engine/CMake/Findnlohmann_json.cmake

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@
1212
# nlohmann_json::nlohmann_json
1313
#
1414

15-
# Try to find the package using CONFIG mode first (e.g., from vcpkg)
16-
find_package(nlohmann_json CONFIG QUIET)
17-
18-
if(nlohmann_json_FOUND)
19-
if(NOT TARGET nlohmann_json::nlohmann_json AND TARGET nlohmann_json)
20-
add_library(nlohmann_json::nlohmann_json ALIAS nlohmann_json)
21-
endif()
22-
return()
23-
endif()
24-
2515
# Try to find the package using pkg-config first
2616
find_package(PkgConfig QUIET)
2717
if(PKG_CONFIG_FOUND)

attachments/simple_engine/CMake/Findtinygltf.cmake

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@
1212
# tinygltf::tinygltf
1313
#
1414

15-
# Try to find the package using CONFIG mode first (e.g., from vcpkg)
16-
find_package(tinygltf CONFIG QUIET)
17-
18-
if(tinygltf_FOUND)
19-
if(NOT TARGET tinygltf::tinygltf AND TARGET tinygltf)
20-
add_library(tinygltf::tinygltf ALIAS tinygltf)
21-
endif()
22-
return()
23-
endif()
24-
2515
# First, try to find nlohmann_json
2616
find_package(nlohmann_json QUIET)
2717
if(NOT nlohmann_json_FOUND)

0 commit comments

Comments
 (0)