From 629866d71b7f32cbc49e23962919df609cb5174a Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Sat, 18 Jun 2022 16:00:52 +0200 Subject: [PATCH] CMake: Use find_package with CONFIG mode in the minimal sample --- samples/minimal/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/minimal/CMakeLists.txt b/samples/minimal/CMakeLists.txt index 7e1333f4fe..6731fd7147 100644 --- a/samples/minimal/CMakeLists.txt +++ b/samples/minimal/CMakeLists.txt @@ -30,10 +30,12 @@ endif() project(minimal) # Request the required wxWidgets libs -find_package(wxWidgets 3.1 COMPONENTS core base REQUIRED) +find_package(wxWidgets 3.1 COMPONENTS core base REQUIRED CONFIG) # Include the wxWidgets use file to initialize various settings -include(${wxWidgets_USE_FILE}) +if(wxWidgets_USE_FILE) + include(${wxWidgets_USE_FILE}) +endif() # Define a variable containing a list of source files for the project set(SRC_FILES