Skip to content

Commit ba5466b

Browse files
CMake: check that Core, Tools and FX modules are found
1 parent 0697651 commit ba5466b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
cmake_minimum_required(VERSION 3.13)
22

3+
if(NOT DILIGENT_CORE_FOUND)
4+
message(FATAL_ERROR "DiligentCore module is not found. To build the samples and tutorials, please clone the main repository as described in the documentation (see https://github.com/DiligentGraphics/DiligentSamples/blob/master/README.md)")
5+
endif()
6+
if(NOT DILIGENT_TOOLS_FOUND)
7+
message(FATAL_ERROR "DiligentTools module is not found. Please add DiligentTools module to the project before DiligentSamples module.")
8+
endif()
9+
if(NOT DILIGENT_FX_FOUND)
10+
message(FATAL_ERROR "DiligentFX module is not found. Please add DiligentFX module to the project before DiligentSamples module.")
11+
endif()
12+
13+
set(DILIGENT_SAMPLES_FOUND TRUE CACHE INTERNAL "DiligentSamples module is found")
14+
315
if(PLATFORM_WIN32 OR PLATFORM_LINUX)
416
option(DILIGENT_INSTALL_SAMPLES "Enable installation of samples and tutorials" ON)
517
else()

0 commit comments

Comments
 (0)