From a9717cf3ab4b3b13e8ed77c8ea6bb9e50ca36909 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 18 Feb 2018 21:41:33 -0700 Subject: [PATCH] CMake: Migrate detection of libsquish --- dtool/Config.cmake | 7 ------- dtool/LocalSetup.cmake | 6 ------ dtool/Package.cmake | 11 +++++++++++ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/dtool/Config.cmake b/dtool/Config.cmake index 8b48b1e97d..445cca4f09 100644 --- a/dtool/Config.cmake +++ b/dtool/Config.cmake @@ -475,13 +475,6 @@ option(HAVE_VIDEO4LINUX "Set this to enable webcam support on Linux." ${IS_LINUX}) -# Is libsquish installed, and where? -find_package(Squish QUIET) - -package_option(SQUISH - "Enables support for automatic compression of DXT textures.") - - # Is Cg installed, and where? find_package(Cg QUIET) package_option(CG diff --git a/dtool/LocalSetup.cmake b/dtool/LocalSetup.cmake index 1da3ec113b..e875342c5d 100644 --- a/dtool/LocalSetup.cmake +++ b/dtool/LocalSetup.cmake @@ -189,12 +189,6 @@ endif() # Now go through all the packages and report whether we have them. show_packages() -if(HAVE_SQUISH) - message("+ squish") -else() - message("- Did not find squish") -endif() - if(HAVE_CG) message("+ Nvidia Cg High Level Shading Language") else() diff --git a/dtool/Package.cmake b/dtool/Package.cmake index f72eb3a398..f703c50f16 100644 --- a/dtool/Package.cmake +++ b/dtool/Package.cmake @@ -85,6 +85,17 @@ package_option(FFTW config_package(FFTW "FFTW") +# +# ------------ libsquish ------------ +# + +find_package(Squish QUIET) + +package_option(SQUISH + "Enables support for automatic compression of DXT textures.") + +config_package(SQUISH "libsquish") + # Find and configure Miles Sound System find_package(Miles QUIET) #config_package(RAD_MSS "Miles Sound System")