mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
CMake: Implement detection for FFTW3
This commit is contained in:
parent
84e7539f99
commit
283db1fb7a
@ -106,4 +106,4 @@ if(NOT FFTW3_INCLUDE_DIR OR NOT FFTW3_LIBRARY_DIR)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(FFTW DEFAULT_MSG FFTW3_LIBRARY FFTW3_INCLUDE_DIR FFTW3_LIBRARY_DIR)
|
find_package_handle_standard_args(FFTW3 DEFAULT_MSG FFTW3_LIBRARY FFTW3_INCLUDE_DIR FFTW3_LIBRARY_DIR)
|
||||||
|
@ -485,17 +485,6 @@ option(HAVE_VIDEO4LINUX
|
|||||||
"Set this to enable webcam support on Linux." ${IS_LINUX})
|
"Set this to enable webcam support on Linux." ${IS_LINUX})
|
||||||
|
|
||||||
|
|
||||||
# TODO: FFTW2
|
|
||||||
# Is libfftw installed, and where?
|
|
||||||
#find_package(FFTW2 QUIET)
|
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
|
|
||||||
# Is libsquish installed, and where?
|
# Is libsquish installed, and where?
|
||||||
find_package(Squish QUIET)
|
find_package(Squish QUIET)
|
||||||
|
|
||||||
|
@ -163,7 +163,6 @@ check_include_file_cxx(unistd.h PHAVE_UNISTD_H)
|
|||||||
check_include_file_cxx(utime.h PHAVE_UTIME_H)
|
check_include_file_cxx(utime.h PHAVE_UTIME_H)
|
||||||
check_include_file_cxx(glob.h PHAVE_GLOB_H)
|
check_include_file_cxx(glob.h PHAVE_GLOB_H)
|
||||||
check_include_file_cxx(dirent.h PHAVE_DIRENT_H)
|
check_include_file_cxx(dirent.h PHAVE_DIRENT_H)
|
||||||
check_include_file_cxx(drfftw.h PHAVE_DRFFTW_H)
|
|
||||||
check_include_file_cxx(sys/soundcard.h PHAVE_SYS_SOUNDCARD_H)
|
check_include_file_cxx(sys/soundcard.h PHAVE_SYS_SOUNDCARD_H)
|
||||||
check_include_file_cxx(ucontext.h PHAVE_UCONTEXT_H) #TODO doesn't work on OSX, use sys/ucontext.h
|
check_include_file_cxx(ucontext.h PHAVE_UCONTEXT_H) #TODO doesn't work on OSX, use sys/ucontext.h
|
||||||
check_include_file_cxx(linux/input.h PHAVE_LINUX_INPUT_H)
|
check_include_file_cxx(linux/input.h PHAVE_LINUX_INPUT_H)
|
||||||
@ -190,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_FFTW)
|
|
||||||
message("+ fftw")
|
|
||||||
else()
|
|
||||||
message("- Did not find fftw")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(HAVE_SQUISH)
|
if(HAVE_SQUISH)
|
||||||
message("+ squish")
|
message("+ squish")
|
||||||
else()
|
else()
|
||||||
|
@ -70,6 +70,21 @@ package_option(TAR
|
|||||||
"This is used to optimize patch generation against tar files.")
|
"This is used to optimize patch generation against tar files.")
|
||||||
config_package(TAR "libtar")
|
config_package(TAR "libtar")
|
||||||
|
|
||||||
|
#
|
||||||
|
# ------------ FFTW ------------
|
||||||
|
#
|
||||||
|
|
||||||
|
find_package(FFTW3 QUIET)
|
||||||
|
|
||||||
|
package_option(FFTW
|
||||||
|
"This enables support for compression of animations in .bam files.
|
||||||
|
This is only necessary for creating or reading .bam files containing
|
||||||
|
compressed animations."
|
||||||
|
FOUND_AS "FFTW3"
|
||||||
|
LICENSE "GPL")
|
||||||
|
|
||||||
|
config_package(FFTW "FFTW")
|
||||||
|
|
||||||
# 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")
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
/* Define if we have libtar installed. */
|
/* Define if we have libtar installed. */
|
||||||
#cmakedefine HAVE_TAR
|
#cmakedefine HAVE_TAR
|
||||||
|
|
||||||
/* Define if we have libfftw installed. */
|
/* Define if we have libfftw3 installed. */
|
||||||
#cmakedefine HAVE_FFTW
|
#cmakedefine HAVE_FFTW
|
||||||
|
|
||||||
/* Define if we have libsquish installed. */
|
/* Define if we have libsquish installed. */
|
||||||
@ -406,9 +406,6 @@
|
|||||||
/* Define if you have the <dirent.h> header file. */
|
/* Define if you have the <dirent.h> header file. */
|
||||||
#cmakedefine PHAVE_DIRENT_H
|
#cmakedefine PHAVE_DIRENT_H
|
||||||
|
|
||||||
/* Define if you have the <drfftw.h> header file. */
|
|
||||||
#cmakedefine PHAVE_DRFFTW_H
|
|
||||||
|
|
||||||
/* Do we have <sys/soundcard.h> (and presumably a Linux-style audio
|
/* Do we have <sys/soundcard.h> (and presumably a Linux-style audio
|
||||||
interface)? */
|
interface)? */
|
||||||
#cmakedefine PHAVE_SYS_SOUNDCARD_H
|
#cmakedefine PHAVE_SYS_SOUNDCARD_H
|
||||||
|
@ -5,9 +5,6 @@ endif()
|
|||||||
# Not sure where I want to hide these inludes yet, but it is annoying
|
# Not sure where I want to hide these inludes yet, but it is annoying
|
||||||
# to have to add them to every CMakeLists that either directly, or
|
# to have to add them to every CMakeLists that either directly, or
|
||||||
# recursively includes linmath, and other libraries etc...
|
# recursively includes linmath, and other libraries etc...
|
||||||
if(HAVE_FFTW)
|
|
||||||
include_directories(${FFTW2_INCLUDE_DIR})
|
|
||||||
endif()
|
|
||||||
if(HAVE_CG)
|
if(HAVE_CG)
|
||||||
include_directories(${CG_INCLUDE_DIRS})
|
include_directories(${CG_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
@ -62,7 +62,8 @@ set(P3MATHUTIL_SOURCES
|
|||||||
|
|
||||||
composite_sources(p3mathutil P3MATHUTIL_SOURCES)
|
composite_sources(p3mathutil P3MATHUTIL_SOURCES)
|
||||||
add_library(p3mathutil ${P3MATHUTIL_HEADERS} ${P3MATHUTIL_SOURCES})
|
add_library(p3mathutil ${P3MATHUTIL_HEADERS} ${P3MATHUTIL_SOURCES})
|
||||||
target_link_libraries(p3mathutil p3event ${FFTW2_LIBRARY_DIR})
|
target_link_libraries(p3mathutil p3event)
|
||||||
|
target_use_packages(p3mathutil FFTW)
|
||||||
target_interrogate(p3mathutil ALL)
|
target_interrogate(p3mathutil ALL)
|
||||||
|
|
||||||
install(TARGETS p3mathutil DESTINATION lib)
|
install(TARGETS p3mathutil DESTINATION lib)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user