From 8ae99120b534a0939fb35157c67d2a9a00f344ab Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Tue, 12 May 2026 21:06:29 -0400 Subject: [PATCH] Wrap subdirectory compilation in conditional --- CMakeLists.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fabaee7..d359e4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,30 @@ add_subdirectory(deps/SDL_ttf EXCLUDE_FROM_ALL) else() + find_package(PkgConfig REQUIRED) + + if(NOT TARGET SDL3::SDL3) + find_package(SDL3 REQUIRED) + endif() + if(NOT TARGET SDL3_image::SDL3_image) + find_package(SDL3_image REQUIRED) + endif() + if(NOT TARGET SDL3_mixer::SDL3_mixer) + find_package(SDL3_mixer REQUIRED) + endif() + if(NOT TARGET SDL3_ttf::SDL3_ttf) + find_package(SDL3_ttf REQUIRED) + endif() + if(NOT TARGET akerror::akerror) + find_package(akerror REQUIRED) + endif() + if(NOT TARGET akstdib::akstdlib) + find_package(akstdlib REQUIRED) + endif() + if(NOT TARGET jansson::jansson) + find_package(jansson) + endif() + endif() set(GAMECONTROLLERDB_H "include/akgl/SDL_GameControllerDB.h")