cmake: include FIndPkgConfig.cmake through find_package
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3103b01..9f3567c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,9 +67,10 @@ include(CheckCXXCompilerFlag)
include(CheckStructHasMember)
include(CMakeDependentOption)
include(CMakePushCheckState)
-include(FindPkgConfig)
include(GNUInstallDirs)
+find_package(PkgConfig)
+
list(APPEND CMAKE_MODULE_PATH "${SDL2_SOURCE_DIR}/cmake")
include(${SDL2_SOURCE_DIR}/cmake/macros.cmake)
include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)