Browse Source

CMake: Migrate zlib package detection

Sam Edwards 7 years ago
parent
commit
72d668e05a
3 changed files with 11 additions and 12 deletions
  1. 0 6
      dtool/Config.cmake
  2. 0 6
      dtool/LocalSetup.cmake
  3. 11 0
      dtool/Package.cmake

+ 0 - 6
dtool/Config.cmake

@@ -466,12 +466,6 @@ option(HAVE_VIDEO4LINUX
   "Set this to enable webcam support on Linux." ${IS_LINUX})
   "Set this to enable webcam support on Linux." ${IS_LINUX})
 
 
 
 
-# Is ZLIB installed, and where?
-find_package(ZLIB QUIET)
-
-package_option(ZLIB DEFAULT ON
-  "Enables support for compression of Panda assets.")
-
 # Is FFMPEG installed, and where?
 # Is FFMPEG installed, and where?
 find_package(FFMPEG QUIET)
 find_package(FFMPEG QUIET)
 find_package(SWScale QUIET)
 find_package(SWScale QUIET)

+ 0 - 6
dtool/LocalSetup.cmake

@@ -189,12 +189,6 @@ endif()
 # Now go through all the packages and report whether we have them.
 # Now go through all the packages and report whether we have them.
 show_packages()
 show_packages()
 
 
-if(HAVE_ZLIB)
-  message("+ zlib")
-else()
-  message("- Did not find zlib")
-endif()
-
 if(HAVE_RAD_MSS)
 if(HAVE_RAD_MSS)
   message("+ Miles Sound System")
   message("+ Miles Sound System")
 else()
 else()

+ 11 - 0
dtool/Package.cmake

@@ -135,6 +135,17 @@ package_option(VRPN
 
 
 config_package(VRPN "VRPN")
 config_package(VRPN "VRPN")
 
 
+#
+# ------------ zlib ------------
+#
+
+find_package(zlib QUIET)
+
+package_option(ZLIB
+  "Enables support for compression of Panda assets.")
+
+config_package(ZLIB "zlib")
+
 # Find and configure Miles Sound System
 # Find and configure Miles Sound System
 find_package(Miles QUIET)
 find_package(Miles QUIET)
 #config_package(RAD_MSS "Miles Sound System")
 #config_package(RAD_MSS "Miles Sound System")