Skip to content

Commit 9701b72

Browse files
committed
Display warning message when pkg_config was not found
1 parent f9c6310 commit 9701b72

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mk/cmake/SuperTux/ProvideSDL2.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ else()
3333
else()
3434
# 64-bit
3535
include(FindPkgConfig)
36-
pkg_search_module(SDL2 REQUIRED sdl2>=2.0.1)
37-
pkg_search_module(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
36+
if(NOT PKG_CONFIG_FOUND)
37+
message(WARNING "Trying to find libraries using pkg_search_module, but pkg-config was not found. Install pkg-config to continue.")
38+
else()
39+
pkg_search_module(SDL2 REQUIRED sdl2>=2.0.1)
40+
pkg_search_module(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
41+
endif()
3842
endif()
3943
endif()
4044
endif()

0 commit comments

Comments
 (0)