Skip to content

Commit 03adb8d

Browse files
committed
build: Fix loader test building without std filesystem
1 parent 2af452f commit 03adb8d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tests/loader_test/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ if(VulkanHeaders_FOUND)
4242
)
4343
endif()
4444

45+
if(BUILD_WITHOUT_STD_FILESYSTEM)
46+
target_compile_definitions(loader_test PRIVATE DISABLE_STD_FILESYSTEM)
47+
endif()
4548
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
4649
if(MSVC)
4750
target_compile_definitions(loader_test PRIVATE _CRT_SECURE_NO_WARNINGS)
@@ -53,7 +56,10 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
5356
loader_test PRIVATE -Wall -Wno-unused-function -Wno-format-truncation
5457
)
5558

56-
target_link_libraries(loader_test -lstdc++fs openxr_loader m -lpthread)
59+
target_link_libraries(loader_test openxr_loader m -lpthread)
60+
if(NOT BUILD_WITHOUT_STD_FILESYSTEM)
61+
target_link_libraries(loader_test stdc++fs)
62+
endif()
5763
else()
5864
message(FATAL_ERROR "Unsupported Platform")
5965
endif()

0 commit comments

Comments
 (0)