File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ jobs:
158
158
cmake -S prboom2
159
159
-B build
160
160
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
161
+ -DSTRICT_FIND=ON
161
162
${{ matrix.config.extra_options }}
162
163
163
164
- name : Build
Original file line number Diff line number Diff line change 1
1
include_guard ()
2
2
3
+ if (STRICT_FIND)
4
+ set (dsda_strict_keyword)
5
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL 4.1)
6
+ set (CMAKE_FIND_REQUIRED ON )
7
+ else ()
8
+ set (dsda_strict_keyword REQUIRED)
9
+ endif ()
10
+ endif ()
11
+
3
12
# TODO: Move away from including this module this way
4
13
include (PkgConfigHelper)
5
14
@@ -30,42 +39,42 @@ if(SndFile_VERSION VERSION_GREATER_EQUAL "1.1.0")
30
39
endif ()
31
40
32
41
if (WITH_IMAGE)
33
- find_package (SDL2_image)
42
+ find_package (SDL2_image ${dsda_strict_keyword} )
34
43
if (SDL2_image_FOUND)
35
44
set (HAVE_LIBSDL2_IMAGE TRUE )
36
45
endif ()
37
46
endif ()
38
47
39
48
if (WITH_MAD)
40
- find_package (mad)
49
+ find_package (mad ${dsda_strict_keyword} )
41
50
if (mad_FOUND)
42
51
set (HAVE_LIBMAD TRUE )
43
52
endif ()
44
53
endif ()
45
54
46
55
if (WITH_FLUIDSYNTH)
47
- find_package (FluidSynth)
56
+ find_package (FluidSynth ${dsda_strict_keyword} )
48
57
if (FluidSynth_FOUND)
49
58
set (HAVE_LIBFLUIDSYNTH TRUE )
50
59
endif ()
51
60
endif ()
52
61
53
62
if (WITH_XMP)
54
- find_package (libxmp)
63
+ find_package (libxmp ${dsda_strict_keyword} )
55
64
if (libxmp_FOUND)
56
65
set (HAVE_LIBXMP TRUE )
57
66
endif ()
58
67
endif ()
59
68
60
69
if (WITH_VORBISFILE)
61
- find_package (Vorbis COMPONENTS File)
70
+ find_package (Vorbis COMPONENTS File ${dsda_strict_keyword} )
62
71
if (Vorbis_File_FOUND)
63
72
set (HAVE_LIBVORBISFILE TRUE )
64
73
endif ()
65
74
endif ()
66
75
67
76
if (WITH_PORTMIDI)
68
- find_package (PortMidi)
77
+ find_package (PortMidi ${dsda_strict_keyword} )
69
78
if (PortMidi_FOUND)
70
79
set (HAVE_LIBPORTMIDI TRUE )
71
80
endif ()
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ set(DOOMWADDIR "${CMAKE_INSTALL_PREFIX}/${default_wad_dir}" CACHE PATH "Path to
16
16
set (DSDA_INSTALL_COPYRIGHT_DIR "${default_copyright_dir} " CACHE STRING "Destination of the copyright file" )
17
17
set (DSDA_INSTALL_BINDIR "${default_bin_dir} " CACHE STRING "Destination of the dsda-doom binary" )
18
18
19
+ option (STRICT_FIND "Fail configuration if an optional dependency is not found" OFF )
19
20
option (SIMPLECHECKS "Enable checks which only impose significant overhead if a posible error is detected" ON )
20
21
option (RANGECHECK "Enable internal range checking" OFF )
21
22
You can’t perform that action at this time.
0 commit comments