Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ControlSystemAdapter-DoocsAdapter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChimeraTK Mirror
ControlSystemAdapter-DoocsAdapter
Commits
08760225
Commit
08760225
authored
6 years ago
by
Martin Killenberg
Browse files
Options
Downloads
Patches
Plain Diff
added FindFFTW to project template. Needed by several middle layer servers
parent
b484c44d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/Modules/FindFFTW.cmake
+159
-0
159 additions, 0 deletions
cmake/Modules/FindFFTW.cmake
with
159 additions
and
0 deletions
cmake/Modules/FindFFTW.cmake
0 → 100644
+
159
−
0
View file @
08760225
# - Find the FFTW library
#
# Usage:
# find_package(FFTW [REQUIRED] [QUIET] )
#
# It sets the following variables:
# FFTW_FOUND ... true if fftw is found on the system
# FFTW_LIBRARIES ... full path to fftw library
# FFTW_INCLUDES ... fftw include directory
#
# The following variables will be checked by the function
# FFTW_USE_STATIC_LIBS ... if true, only static libraries are found
# FFTW_ROOT ... if set, the libraries are exclusively searched
# under this path
# FFTW_LIBRARY ... fftw library to use
# FFTW_INCLUDE_DIR ... fftw include directory
#
#If environment variable FFTWDIR is specified, it has same effect as FFTW_ROOT
if
(
NOT FFTW_ROOT AND ENV{FFTWDIR}
)
set
(
FFTW_ROOT $ENV{FFTWDIR}
)
endif
()
# Check if we can use PkgConfig
find_package
(
PkgConfig
)
#Determine from PKG
if
(
PKG_CONFIG_FOUND AND NOT FFTW_ROOT
)
pkg_check_modules
(
PKG_FFTW QUIET
"fftw3"
)
endif
()
#Check whether to search static or dynamic libs
set
(
CMAKE_FIND_LIBRARY_SUFFIXES_SAV
${
CMAKE_FIND_LIBRARY_SUFFIXES
}
)
if
(
${
FFTW_USE_STATIC_LIBS
}
)
set
(
CMAKE_FIND_LIBRARY_SUFFIXES
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
else
()
set
(
CMAKE_FIND_LIBRARY_SUFFIXES
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
endif
()
if
(
FFTW_ROOT
)
#find libs
find_library
(
FFTW_LIB
NAMES
"fftw3"
PATHS
${
FFTW_ROOT
}
PATH_SUFFIXES
"lib"
"lib64"
NO_DEFAULT_PATH
)
find_library
(
FFTW_THREADS_LIB
NAMES
"fftw3_threads"
PATHS
${
FFTW_ROOT
}
PATH_SUFFIXES
"lib"
"lib64"
NO_DEFAULT_PATH
)
find_library
(
FFTWF_LIB
NAMES
"fftw3f"
PATHS
${
FFTW_ROOT
}
PATH_SUFFIXES
"lib"
"lib64"
NO_DEFAULT_PATH
)
find_library
(
FFTWF_THREADS_LIB
NAMES
"fftw3f_threads"
PATHS
${
FFTW_ROOT
}
PATH_SUFFIXES
"lib"
"lib64"
NO_DEFAULT_PATH
)
find_library
(
FFTWL_LIB
NAMES
"fftw3l"
PATHS
${
FFTW_ROOT
}
PATH_SUFFIXES
"lib"
"lib64"
NO_DEFAULT_PATH
)
find_library
(
FFTWL_THREADS_LIB
NAMES
"fftw3l_threads"
PATHS
${
FFTW_ROOT
}
PATH_SUFFIXES
"lib"
"lib64"
NO_DEFAULT_PATH
)
#find includes
find_path
(
FFTW_INCLUDES
NAMES
"fftw3.h"
PATHS
${
FFTW_ROOT
}
PATH_SUFFIXES
"include"
NO_DEFAULT_PATH
)
else
()
find_library
(
FFTW_LIB
NAMES
"fftw3"
PATHS
${
PKG_FFTW_LIBRARY_DIRS
}
${
LIB_INSTALL_DIR
}
)
find_library
(
FFTW_THREADS_LIB
NAMES
"fftw3_threads"
PATHS
${
PKG_FFTW_LIBRARY_DIRS
}
${
LIB_INSTALL_DIR
}
)
find_library
(
FFTWF_LIB
NAMES
"fftw3f"
PATHS
${
PKG_FFTW_LIBRARY_DIRS
}
${
LIB_INSTALL_DIR
}
)
find_library
(
FFTWF_THREADS_LIB
NAMES
"fftw3f_threads"
PATHS
${
PKG_FFTW_LIBRARY_DIRS
}
${
LIB_INSTALL_DIR
}
)
find_library
(
FFTWL_LIB
NAMES
"fftw3l"
PATHS
${
PKG_FFTW_LIBRARY_DIRS
}
${
LIB_INSTALL_DIR
}
)
find_library
(
FFTWL_THREADS_LIB
NAMES
"fftw3l_threads"
PATHS
${
PKG_FFTW_LIBRARY_DIRS
}
${
LIB_INSTALL_DIR
}
)
find_path
(
FFTW_INCLUDES
NAMES
"fftw3.h"
PATHS
${
PKG_FFTW_INCLUDE_DIRS
}
${
INCLUDE_INSTALL_DIR
}
)
endif
(
FFTW_ROOT
)
set
(
FFTW_LIBRARIES
${
FFTW_LIB
}
${
FFTWF_LIB
}
)
if
(
FFTWL_LIB
)
set
(
FFTW_LIBRARIES
${
FFTW_LIBRARIES
}
${
FFTWL_LIB
}
)
endif
()
set
(
CMAKE_FIND_LIBRARY_SUFFIXES
${
CMAKE_FIND_LIBRARY_SUFFIXES_SAV
}
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
FFTW DEFAULT_MSG
FFTW_INCLUDES FFTW_LIBRARIES
)
mark_as_advanced
(
FFTW_INCLUDES FFTW_LIBRARIES FFTW_LIB FFTWF_LIB FFTWL_LIB FFTW_THREADS_LIB FFTWF_THREADS_LIB FFTWL_THREADS_LIB
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment