From 8f63e9ff68ff49886c6eaa66288db7590b4c6f0b Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 9 Nov 2021 11:13:52 -0500 Subject: [PATCH] cmake: use generated SDL_config.h to build SDLmain static lib Thanks to @toazz for the patch! Fixes #4829. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 06721edc1..d26126d04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2630,6 +2630,7 @@ if(NOT WINDOWS_STORE) add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) # alias target for in-tree builds add_library(SDL2::SDL2main ALIAS SDL2main) + target_include_directories(SDL2main BEFORE PRIVATE "${SDL2_BINARY_DIR}/include") target_include_directories(SDL2main PUBLIC "$" $ $) set(_INSTALL_LIBS "SDL2main") if (NOT ANDROID)