Browse Source

Rename FindFFTW to FindFFTW3 and comment out configuration for it. FindFFTW3 was implemented, but Panda expects FFTW2.

kestred 12 years ago
parent
commit
dd495b5573

+ 33 - 33
cmake/modules/FindFFTW.cmake → cmake/modules/FindFFTW3.cmake

@@ -5,59 +5,59 @@
 #   find_package(FFTW [REQUIRED] [QUIET])
 #
 # Once done this will define:
-#   FFTW_FOUND       - true if fftw is found on the system
-#   FFTW_INCLUDE_DIR - the fftw include directory
-#   FFTW_LIBRARY_DIR - the fftw library directory
-#   FFTW_LIBRARY     - the path to the library binary
+#   FFTW3_FOUND       - true if fftw is found on the system
+#   FFTW3_INCLUDE_DIR - the fftw include directory
+#   FFTW3_LIBRARY_DIR - the fftw library directory
+#   FFTW3_LIBRARY     - the path to the library binary
 #
 # The following variables will be checked by the function
-#   FFTW_ROOT - if set, the libraries are exclusively searched under this path
+#   FFTW3_ROOT - if set, the libraries are exclusively searched under this path
 #
 
-if(NOT FFTW_INCLUDE_DIR OR NOT FFTW_LIBRARY_DIR)
+if(NOT FFTW3_INCLUDE_DIR OR NOT FFTW3_LIBRARY_DIR)
   # Check if we can use PkgConfig
   find_package(PkgConfig QUIET)
 
   #Determine from PKG
-  if(PKG_CONFIG_FOUND AND NOT FFTW_ROOT)
+  if(PKG_CONFIG_FOUND AND NOT FFTW3_ROOT)
     pkg_check_modules(PKG_FFTW QUIET "fftw3")
   endif()
 
-  if(FFTW_ROOT)
+  if(FFTW3_ROOT)
     # Try to find headers under root
-    find_path(FFTW_INCLUDE_DIR
+    find_path(FFTW3_INCLUDE_DIR
       NAMES "fftw3.h"
-      PATHS ${FFTW_ROOT}
+      PATHS ${FFTW3_ROOT}
       PATH_SUFFIXES "include"
       NO_DEFAULT_PATH
     )
 
     # Try to find library under root
-    find_library(FFTW_LIBRARY
+    find_library(FFTW3_LIBRARY
       NAMES "fftw3"
-      PATHS ${FFTW_ROOT}
+      PATHS ${FFTW3_ROOT}
       PATH_SUFFIXES "lib" "lib64"
       NO_DEFAULT_PATH
     )
 
-    find_library(FFTW_FFTWF_LIBRARY
+    find_library(FFTW3_FFTWF_LIBRARY
       NAMES "fftw3f"
-      PATHS ${FFTW_ROOT}
+      PATHS ${FFTW3_ROOT}
       PATH_SUFFIXES "lib" "lib64"
       NO_DEFAULT_PATH
     )
 
-    find_library(FFTW_FFTWL_LIBRARY
+    find_library(FFTW3_FFTWL_LIBRARY
       NAMES "fftw3l"
-      PATHS ${FFTW_ROOT}
+      PATHS ${FFTW3_ROOT}
       PATH_SUFFIXES "lib" "lib64"
       NO_DEFAULT_PATH
     )
   else()
     # Find headers the normal way
-    find_path(FFTW_INCLUDE_DIR
+    find_path(FFTW3_INCLUDE_DIR
       NAMES "fftw3.h"
-      PATHS ${PKG_FFTW_INCLUDE_DIRS}
+      PATHS ${PKG_FFTW3_INCLUDE_DIRS}
             ${INCLUDE_INSTALL_DIR}
             "/usr/include"
             "/usr/local/include"
@@ -65,18 +65,18 @@ if(NOT FFTW_INCLUDE_DIR OR NOT FFTW_LIBRARY_DIR)
     )
 
     # Find library the normal way
-    find_library(FFTW_LIBRARY
+    find_library(FFTW3_LIBRARY
       NAMES "fftw3"
-      PATHS ${PKG_FFTW_LIBRARY_DIRS}
+      PATHS ${PKG_FFTW3_LIBRARY_DIRS}
             ${LIB_INSTALL_DIR}
             "/usr"
             "/usr/local"
       PATH_SUFFIXES "" "lib" "lib32" "lib64"
     )
 
-    find_library(FFTW_FFTWF_LIBRARY
+    find_library(FFTW3_FFTWF_LIBRARY
       NAMES "fftw3f"
-      PATHS ${PKG_FFTW_LIBRARY_DIRS}
+      PATHS ${PKG_FFTW3_LIBRARY_DIRS}
             ${LIB_INSTALL_DIR}
             "/usr"
             "/usr/local"
@@ -84,9 +84,9 @@ if(NOT FFTW_INCLUDE_DIR OR NOT FFTW_LIBRARY_DIR)
     )
 
 
-    find_library(FFTW_FFTWL_LIBRARY
+    find_library(FFTW3_FFTWL_LIBRARY
       NAMES "fftw3l"
-      PATHS ${PKG_FFTW_LIBRARY_DIRS}
+      PATHS ${PKG_FFTW3_LIBRARY_DIRS}
             ${LIB_INSTALL_DIR}
             "/usr"
             "/usr/local"
@@ -94,16 +94,16 @@ if(NOT FFTW_INCLUDE_DIR OR NOT FFTW_LIBRARY_DIR)
     )
   endif()
 
-  # Get the directory conaining FFTW_LIBRARY
-  get_filename_component(FFTW_LIBRARY_DIR "${FFTW_LIBRARY}" PATH)
-  set(FFTW_LIBRARY_DIR "${FFTW_LIBRARY_DIR}" CACHE PATH "The path to fftw's library directory.") # Library path
+  # Get the directory conaining FFTW3_LIBRARY
+  get_filename_component(FFTW3_LIBRARY_DIR "${FFTW3_LIBRARY}" PATH)
+  set(FFTW3_LIBRARY_DIR "${FFTW3_LIBRARY_DIR}" CACHE PATH "The path to fftw's library directory.") # Library path
 
-  mark_as_advanced(FFTW_INCLUDE_DIR)
-  mark_as_advanced(FFTW_LIBRARY_DIR)
-  mark_as_advanced(FFTW_LIBRARY)
-  mark_as_advanced(FFTW_FFTWF_LIBRARY)
-  mark_as_advanced(FFTW_FFTWL_LIBRARY)
+  mark_as_advanced(FFTW3_INCLUDE_DIR)
+  mark_as_advanced(FFTW3_LIBRARY_DIR)
+  mark_as_advanced(FFTW3_LIBRARY)
+  mark_as_advanced(FFTW3_FFTWF_LIBRARY)
+  mark_as_advanced(FFTW3_FFTWL_LIBRARY)
 endif()
 
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(FFTW DEFAULT_MSG FFTW_LIBRARY FFTW_INCLUDE_DIR FFTW_LIBRARY_DIR)
+find_package_handle_standard_args(FFTW DEFAULT_MSG FFTW3_LIBRARY FFTW3_INCLUDE_DIR FFTW3_LIBRARY_DIR)

+ 4 - 4
dtool/Config.cmake

@@ -478,11 +478,11 @@ package_option(TAR
   "This is used to optimize patch generation against tar files.")
 
 # Is libfftw installed, and where?
-find_package(FFTW)
+#find_package(FFTW2)
 
-package_option(FFTW
-  "This enables support for lossless compression of animations in
-.bam files.  This is rarely used, and you probably don't need it.")
+#package_option(FFTW
+#  "This enables support for lossless compression of animations in
+#.bam files.  This is rarely used, and you probably don't need it.")
 
 #TODO PHAVE_DRFFTW_H
 

+ 3 - 3
panda/src/mathutil/CMakeLists.txt

@@ -63,13 +63,13 @@ set(P3MATHUTIL_SOURCES
 if(HAVE_EIGEN)
   include_directories(${EIGEN3_INCLUDE_DIR})
 endif()
-if(NOT PHAVE_DRFFTW_H)
-  configure_file(../../../dtool/src/parser-inc/rfftw.h rfftw.h COPYONLY)
+if(HAVE_FFTW)
+  include_directories(${FFTW2_INCLUDE_DIR})
 endif()
 
 composite_sources(p3mathutil P3MATHUTIL_SOURCES)
 add_library(p3mathutil ${P3MATHUTIL_HEADERS} ${P3MATHUTIL_SOURCES})
-target_link_libraries(p3mathutil p3event ${FFTW_LIBRARY_DIR})
+target_link_libraries(p3mathutil p3event ${FFTW2_LIBRARY_DIR}})
 target_interrogate(p3mathutil ALL)
 
 #begin test_bin_target

+ 1 - 1
panda/src/mathutil/fftCompressor.cxx

@@ -25,7 +25,7 @@
 #ifdef HAVE_FFTW
 
 //  hack.....
-// this is a hack to help interigate sort out a macro 
+// this is a hack to help interrogate sort out a macro
 // in the system poll and select definitions 
 //    
 #ifdef howmany