From 04c321d200e10b60b04d1a5a07dc3936f3d29806 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sun, 22 Apr 2018 09:18:04 +0200 Subject: CREATE_PROJECT: CMAKE: Fix importing SDL2 when it was built using CMake When SDL is built using CMake, Find_Package imports a target instead of defining variables. If a target was imported we now define the include path and linker flags variables from the target's properties. Using imported targets is a best practice. Ideally, we should define an imported target when we detect variables were defined. However, the linker flags variable would need to be parsed into a library path and a list of libraries, making that approach impractical. --- devtools/create_project/cmake.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp index 2c4553a6c6..d1a2be86cc 100644 --- a/devtools/create_project/cmake.cpp +++ b/devtools/create_project/cmake.cpp @@ -37,7 +37,7 @@ CMakeProvider::CMakeProvider(StringList &global_warnings, std::mapenable || featureExcluded(i->name)) continue; -- cgit v1.2.3