Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake support #2280

Merged
merged 138 commits into from
Nov 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
1b5aa7b
CMake: Add initial CMakeLists.txt
Holzhaus Sep 8, 2019
c277f5c
CMake: Add missing FindGLIB.cmake module
Holzhaus Sep 12, 2019
0d5609f
CMake: Add optional features
Holzhaus Sep 12, 2019
8eda976
CMake: Clean up probuf handling a bit
Holzhaus Sep 12, 2019
cd93868
CMake: Add project information
Holzhaus Sep 12, 2019
2541209
CMake: Make sure that ebur128 is linked statically
Holzhaus Sep 12, 2019
8645547
CMake: Fix mixxx-qrc target
Holzhaus Sep 12, 2019
1c5b86a
CMake: Add installation and packaging instructions
Holzhaus Sep 12, 2019
70064a1
CMake: Add tests
Holzhaus Sep 12, 2019
3cc198a
CMake: Add missing build.h.template file
Holzhaus Sep 12, 2019
8f16f54
CMake: Improve backwards compatibility with older CMake versions
Holzhaus Sep 12, 2019
7d07c34
CMake: Fix indentation in cmake/modules/Find*.cmake
Holzhaus Sep 13, 2019
dc96c3b
CMake: Use git commit count instead of commit hash as BUILD_REV
Holzhaus Sep 13, 2019
fce3d1e
CMake: Fix MediaFoundation variable case
Holzhaus Sep 13, 2019
f0d230e
CMake: Print error message if library for optional feature is missing
Holzhaus Sep 13, 2019
475cb5a
CMake: Move protoc compiler output back to previous location
Holzhaus Sep 13, 2019
164410c
CMake: Add option to switch between static/dynamic linking of libebur128
Holzhaus Sep 13, 2019
ce74c93
CMake: Make HID support optional and allow static linking
Holzhaus Sep 13, 2019
6a1254d
CMake: Assume statically linked PortTime if only porttime.h was found
Holzhaus Sep 13, 2019
cac8dfc
CMake: Only link HSS1394 on Windows or Mac OS
Holzhaus Sep 13, 2019
5d0c897
CMake: Disable HSS1394 on non-Windows/Mac systems by default
Holzhaus Sep 13, 2019
2c4e732
CMake: Fix typo in HIDAPI_STATIC_DEFAULT
Holzhaus Sep 13, 2019
7f8507c
CMake: Remove usage of target_link_directores() and use full paths in…
Holzhaus Sep 13, 2019
2f2bbe1
CMake: Remove project(DESCRIPTION) parameter
Holzhaus Sep 13, 2019
8904b25
CMake: Set CXX standard
Holzhaus Sep 13, 2019
4b8c1bc
CMake: Make pkg-config optional in FindXXX modules
Holzhaus Sep 13, 2019
aeb0537
CMake: Fix OpenGL linker instructions
Holzhaus Sep 13, 2019
a97d2e8
CMake: Always add thread support
Holzhaus Sep 13, 2019
287fe8c
CMake: Make Qt5::Keychain an *optional* component
Holzhaus Sep 13, 2019
971e34a
CMake: Fix QRC resource linking
Holzhaus Sep 14, 2019
f538f5a
CMake: Add benchmark test
Holzhaus Sep 14, 2019
66083c5
CMake: Only set CMD0071 to NEW if that policy exists in that cmake ve…
Holzhaus Sep 14, 2019
3b9b493
CMake: Run tests from source directory
Holzhaus Sep 14, 2019
6c60056
CMake: Add __SNDFILE__ compile definition
Holzhaus Sep 15, 2019
8f186d5
CMake: Do not define __UNIX__ if we're compiling for Mac OS X
Holzhaus Sep 15, 2019
8a2fcd1
CMake: Add include directory for CoreAudio support
Holzhaus Sep 15, 2019
4061c9d
CMake: Fix benchmarking tests
Holzhaus Oct 24, 2019
f20f7bf
CMake: Increase test timeout to 30 seconds per test
Holzhaus Sep 15, 2019
5c1dd3d
CMake: Fix X11 link target
Holzhaus Sep 15, 2019
59ef197
CMake: Fix compatibility with CMake 3.1.0's FindX11 module
Holzhaus Sep 15, 2019
df8a795
CMake: Add chromaprint_p library name for libchromaprint
Holzhaus Sep 15, 2019
0faa0f3
CMake: Allow protobuf-lite libraries
Holzhaus Sep 15, 2019
4418dc7
CMake: Use CMAKE_PROJECT_HOMEPAGE_URL to fix CMake 3.1.0 compatibility
Holzhaus Sep 15, 2019
02c98e3
CMake: Do no link OBJECT libraries
Holzhaus Sep 16, 2019
cc5990b
CMake: Add support for IN_LIST if() operator
Holzhaus Sep 16, 2019
2e6bbc8
CMake: Fixup lib prefixes (second attempt)
Holzhaus Sep 16, 2019
0578ddb
CMake: Enable libebur128's internal queue if necessary
Holzhaus Sep 17, 2019
3893eeb
CMake: Only use Qt::WinExtras on Windows
Holzhaus Sep 17, 2019
a4764a8
CMake: Call find_package(HSS1394) independently of platform
Holzhaus Sep 17, 2019
3d1e65b
CMake: Fix typo in FindTaglib.cmake module
Holzhaus Sep 17, 2019
b635a5f
CMake: Set _USE_MATH_DEFINES for QueenMaryDsp
Holzhaus Sep 17, 2019
012b545
CMake: Fix QueenMaryDsp include directories
Holzhaus Sep 17, 2019
c25b9cc
CMake: Remove superfluous message() statements
Holzhaus Sep 17, 2019
fff93bd
CMake: Improve CPack packaging
Holzhaus Sep 17, 2019
812a0e8
CMake: Add FFmpeg support
Holzhaus Sep 18, 2019
52a1476
CMake: Add improvements for FindFFmpeg.cmake
Holzhaus Sep 18, 2019
bd7133e
CMake: Improve FFmpeg checks
Holzhaus Sep 18, 2019
2f126bc
CMake: Add optimization options
Holzhaus Sep 18, 2019
6dff834
CMake: Add EXCLUDE_FROM_ALL to non-primary targets
Holzhaus Sep 18, 2019
c7baa69
CMake: Set GIT_* vars to "unknown" if git command fails
Holzhaus Sep 18, 2019
c8858fd
CMake: Add DEBUG_ASSERTIONS_FATAL option and add rls/dbg compile defs
Holzhaus Sep 21, 2019
435b60e
CMake: Attempt to fix issues when linking libebur128 statically
Holzhaus Oct 1, 2019
db4d169
CMake: Update sources for mixxx-lib and mixxx-test
Holzhaus Oct 2, 2019
c52dd70
CMake: Fix quoting issue in FindFFmpeg.cmake
Holzhaus Oct 2, 2019
bb40577
CMake: Fix incompatibility between /O2 and /RTC1
Holzhaus Sep 22, 2019
8dd8b48
CMake: Replace PROJECT_*_DIR with CMAKE_CURRENT_*_DIR
Holzhaus Oct 3, 2019
0053021
CMake: Fix library path for internal libebur128
Holzhaus Oct 3, 2019
92444fe
CMake: Add support for Windows-only mixxx.rc file
Holzhaus Oct 3, 2019
5ed4b65
CMake: Use QUIET when finding Qt5Keychain
Holzhaus Oct 4, 2019
4cefe25
CMake: Copy or symlink resources to build folder
Holzhaus Oct 4, 2019
75efd38
CMake: Add static QT5 dependencies on windows
Holzhaus Oct 4, 2019
72ad1cb
CMake: Bump cmake_minimum_required to 3.9.0 due to GoogleTest module
Holzhaus Oct 7, 2019
086312b
CMake: Add set WIN32_EXECUTABLE property on mixxx executable
Holzhaus Oct 7, 2019
5d6d4bd
CMake: Do not exclude mixxx-test from ALL target
Holzhaus Oct 24, 2019
55c4c5b
CMake: Swap arguments in FindTaglib.cmake module
Holzhaus Oct 7, 2019
df8f1c5
CMake: Add missing Qt libraries on static build
Holzhaus Oct 7, 2019
2c05ec4
CMake: Fix MediaFoundation libraries
Holzhaus Oct 8, 2019
7a253bd
CMake: Add definitions for static dependencies
Holzhaus Oct 8, 2019
ebb5d39
CMake: Add missing dependencies when using static deps on Windows
Holzhaus Oct 8, 2019
213170e
CMake: Work around gtest/gmock TR1 namespace deprecation warning on MSVC
Holzhaus Oct 8, 2019
2d0cacb
CMake: Work around MSVC's Release/Debug output directories for gtest/…
Holzhaus Oct 8, 2019
18cd19d
CMake: Add some missing compile/link definitions
Holzhaus Oct 9, 2019
7e2b1b1
CMake: Do not add MSVC-specific flags on Windows unconditionally
Holzhaus Oct 9, 2019
9519de0
CMake: Use /MD on MSVC
Holzhaus Oct 9, 2019
2e9a195
CMake: Remove unneeded QtWindowsExtras
Holzhaus Oct 10, 2019
ffcc1e9
CMake: Force shared CRT for gtest/gmock on MSVC
Holzhaus Oct 10, 2019
e9367f7
CMake: Add missing Qt imageformat plugins
Holzhaus Oct 10, 2019
a35d435
CMake: Add missing Qt5 windows support components
Holzhaus Oct 10, 2019
705faa9
CMake: Show more warnings
Holzhaus Oct 10, 2019
bcae017
CMake: Add WARNINGS_FATAL option to treat warnigns as errors
Holzhaus Oct 10, 2019
13864d7
CMake: Add more missing Qt5 libraries
Holzhaus Oct 10, 2019
e25a368
CMake: Make pedantic warnings optional
Holzhaus Oct 10, 2019
60da0e2
CMake: Include CTest
Holzhaus Oct 11, 2019
6706651
CMake: Add SYSTEM property to third party include directories
Holzhaus Oct 11, 2019
43d25fd
CMake: Add ccache support
Holzhaus Oct 11, 2019
f5c8b12
CMake: Improve ccache support
Holzhaus Oct 11, 2019
d9fcb88
CMake: Sort includes alphabetically
Holzhaus Oct 12, 2019
e6a1ecc
CMake: Use cmake_dependent_option to simplify option availability checks
Holzhaus Oct 12, 2019
8879497
CMake: Remove quotes around off in FFMPEG_ENABLED option
Holzhaus Oct 12, 2019
41ffaa2
CMake: Add support for clcache on MSVC
Holzhaus Oct 12, 2019
70ee9d7
CMake: Add BUILD_BYPRODUCTS for external projects to fix Ninja errors
Holzhaus Oct 12, 2019
b8b525b
CMake: Fix condition to add /arch:SSE2 instruction on MSVC
Holzhaus Oct 12, 2019
69af138
CMake: Pass CMAKE_BUILD_TYPE to ExternalProject
Holzhaus Oct 12, 2019
9365eff
CMake: Add status message regarding internal libebur128
Holzhaus Oct 13, 2019
55d7678
CMake: Find Celt/Silk only on MSVC with static deps
Holzhaus Oct 13, 2019
aa5d881
CMake: Improve ccache/cclache option handling
Holzhaus Oct 13, 2019
c0ec319
CMake: Rename C[L]CACHE_FOUND to C[L]CACHE_EXECUTABLE
Holzhaus Oct 13, 2019
d476a57
CMake: Remove _ENABLED suffix from option names
Holzhaus Oct 24, 2019
1661566
CMake: Fix Qt5Keychain detection
Holzhaus Oct 19, 2019
816d09b
CMake: Fix typo in Qt5Keychain variables
Holzhaus Oct 19, 2019
ddc7239
CMake: Fix Qt5Keychain include dirs
Holzhaus Oct 19, 2019
dc7549c
Merge branch 'master' of [email protected]:mixxxdj/mixxx.git into holzha…
uklotzde Oct 25, 2019
78ead48
CMake: Fix mixxx-lib dependencies
uklotzde Oct 25, 2019
8d76cf5
CMake: Move dependencies and feature options to end of CMakeLists.txt
Holzhaus Oct 27, 2019
7b5d027
CMake: Add symlink to for testdata to build directory
Holzhaus Oct 27, 2019
a384e5c
CMake: Set mixxx-res as dependency for mixxx-lib instead of mixxx
Holzhaus Oct 27, 2019
77d2cd1
Merge branch 'master' into cmake
uklotzde Oct 28, 2019
28b8501
Add SeratoMarkers2 files
uklotzde Oct 28, 2019
99db595
CMake: Fix DEBUG_ASSERTIONS_FATAL flag
Holzhaus Nov 7, 2019
6eaa1b6
CMake: Remove unused Qt5::X11Extras component
Holzhaus Nov 7, 2019
0c64c43
CMake: Add CMAKE_SYSTEM_PROCESSOR as preprocessor definition
Holzhaus Nov 7, 2019
0fc3783
CMake: Remove unused QT_SHARED preprocessor define
Holzhaus Nov 7, 2019
b64c95a
CMake: Remove duplicate Findffmpeg cmake module
Holzhaus Nov 7, 2019
af02436
CMake: Reset FFMPEG_LIBRARIES/DEFINITIONS before appending to them
Holzhaus Nov 7, 2019
a078965
CMake: Disable FAAD by default
Holzhaus Nov 7, 2019
e35bc3d
CMake: Disable WavPack by default
Holzhaus Nov 7, 2019
d862dfe
CMake: Add SFC_SUPPORTS_SET_COMPRESSION_LEVEL define for SndFile
Holzhaus Nov 8, 2019
de78d7b
CMake: Remove trailing slash in UNIX_SHARE_PATH/UNIX_LIB_PATH definition
Holzhaus Nov 8, 2019
a504858
CMake: Add -pipe on GNU gcc to speed up builds
Holzhaus Nov 8, 2019
50e5a0c
Revert "CMake: Remove unused Qt5::X11Extras component"
Holzhaus Nov 8, 2019
734e949
Merge branch 'master' into cmake
uklotzde Nov 12, 2019
bbac193
CMake: Add Kaitai for Rekordbox feature
uklotzde Nov 12, 2019
ffb9877
CMake: Add MP3GuessEnc for Rekordbox feature
uklotzde Nov 12, 2019
11beede
CMake: Add Rekordbox feature
uklotzde Nov 12, 2019
b17ed12
CMake: Get rid of duplicate target_include_directories for Katai
Holzhaus Nov 12, 2019
3452d10
CMake: Disable deprecated-copy warnings in gmock library
Holzhaus Nov 12, 2019
b884fc7
CMake: Disable warnings in generated source files
Holzhaus Nov 12, 2019
5eb3909
Merge branch 'master' of https://github.com/mixxxdj/mixxx into cmake
Holzhaus Nov 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,151 changes: 2,151 additions & 0 deletions CMakeLists.txt

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions cmake/cpack_package_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Free Digital DJ software. Start making live DJ mixes today.
Mixxx is free DJ software that gives you everything you need to perform live DJ
mixes. Blend songs together with automatic BPM matching and remix on-the-fly
with looping and hot cues. Whether you're a pro DJ or just getting started,
Mixxx has you covered.

Mixxx works with ALSA, JACK, OSS and supports many popular DJ controllers.

Features include:
- Parallel or split scratchable waveform displays
- Waveform summaries
- Spinning vinyl widgets
- MP3, OGG, WAVE, FLAC, and optional unprotected aac (m4a) playback
- Extra playback formats through plugins
- Wave and Ogg recording with optional MP3 support
- Fast, database-powered library
- Crates and playlists for organizing your music
- Reads iTunes, Traktor, and Rhythmbox libraries
- History section keeps track of your setlists
- Internet Broadcasting with Shoutcast and Icecast
- Microphone Support
- Automatic crossfading with Auto DJ
- Pitch-independent time stretch (key lock)
- Adjustable pitch range
- Ramping pitchbend controls
- ReplayGain volume normalization
- Quantized loops, hotcues, and beatloops
- Synchronization and auto-beatmatching
- BPM detection and estimation
- Bulk BPM analysis
- Adjustable EQ shelves
- Crossfader curve control
- Sampler Decks
- Vinyl emulation with Serato, Traktor, and Mixvibes timecode support
- Multichannel soundcard support (playback and capture)
- Headphone cueing with multiple soundcard support
- Skinnable interface with several skins bundled
- Support for many DJ MIDI and HID controllers out-of-the-box
- Advanced MIDI/HID scripting engine
- Multiple simultaneous MIDI/HID controllers
- Multi-core CPU support
- 24-bit/96000 Hz playback and capture
63 changes: 63 additions & 0 deletions cmake/modules/FindCelt.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This file is part of Mixxx, Digital DJ'ing software.
# Copyright (C) 2001-2019 Mixxx Development Team
# Distributed under the GNU General Public Licence (GPL) version 2 or any later
# later version. See the LICENSE file for details.

#[=======================================================================[.rst:
FindCelt
--------

Finds the Celt library.

Imported Targets
^^^^^^^^^^^^^^^^

This module provides the following imported targets, if found:

``Celt::Celt``
The Celt library

Result Variables
^^^^^^^^^^^^^^^^

This will define the following variables:

``Celt_FOUND``
True if the system has the Celt library.
``Celt_LIBRARIES``
Libraries needed to link to Celt.

Cache Variables
^^^^^^^^^^^^^^^

The following cache variables may also be set:

``Celt_LIBRARY``
The path to the Celt library.

#]=======================================================================]

find_library(Celt_LIBRARY
NAMES fftw fftw3 fftw-3.3
DOC "Celt library"
)
mark_as_advanced(Celt_LIBRARY)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Celt
DEFAULT_MSG
Celt_LIBRARY
)

if(Celt_FOUND)
set(Celt_LIBRARIES "${Celt_LIBRARY}")

if(NOT TARGET Celt::Celt)
add_library(Celt::Celt UNKNOWN IMPORTED)
set_target_properties(Celt::Celt
PROPERTIES
IMPORTED_LOCATION "${Celt_LIBRARY}"
)
endif()
endif()
87 changes: 87 additions & 0 deletions cmake/modules/FindChromaprint.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# This file is part of Mixxx, Digital DJ'ing software.
# Copyright (C) 2001-2019 Mixxx Development Team
# Distributed under the GNU General Public Licence (GPL) version 2 or any later
# later version. See the LICENSE file for details.

#[=======================================================================[.rst:
FindChromaprint
---------------

Finds the Chromaprint library.

Imported Targets
^^^^^^^^^^^^^^^^

This module provides the following imported targets, if found:

``Chromaprint::Chromaprint``
The Chromaprint library

Result Variables
^^^^^^^^^^^^^^^^

This will define the following variables:

``Chromaprint_FOUND``
True if the system has the Chromaprint library.
``Chromaprint_INCLUDE_DIRS``
Include directories needed to use Chromaprint.
``Chromaprint_LIBRARIES``
Libraries needed to link to Chromaprint.
``Chromaprint_DEFINITIONS``
Compile defitions needed to use Chromaprint.

Cache Variables
^^^^^^^^^^^^^^^

The following cache variables may also be set:

``Chromaprint_INCLUDE_DIR``
The directory containing ``chromaprint.h``.
``Chromaprint_LIBRARY``
The path to the Chromaprint library.

#]=======================================================================]

find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(PC_Chromaprint QUIET libchromaprint)
endif()

find_path(Chromaprint_INCLUDE_DIR
NAMES chromaprint.h
PATHS ${PC_Chromaprint_INCLUDE_DIRS}
PATH_SUFFIXES chromaprint
DOC "Chromaprint include directory")
mark_as_advanced(Chromaprint_INCLUDE_DIR)

find_library(Chromaprint_LIBRARY
NAMES chromaprint chromaprint_p
PATHS ${PC_Chromaprint_LIBRARY_DIRS}
DOC "Chromaprint library"
)
mark_as_advanced(Chromaprint_LIBRARY)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Chromaprint
DEFAULT_MSG
Chromaprint_LIBRARY
Chromaprint_INCLUDE_DIR
)

if(Chromaprint_FOUND)
set(Chromaprint_LIBRARIES "${Chromaprint_LIBRARY}")
set(Chromaprint_INCLUDE_DIRS "${Chromaprint_INCLUDE_DIR}")
set(Chromaprint_DEFINITIONS ${PC_Chromaprint_CFLAGS_OTHER})

if(NOT TARGET Chromaprint::Chromaprint)
add_library(Chromaprint::Chromaprint UNKNOWN IMPORTED)
set_target_properties(Chromaprint::Chromaprint
PROPERTIES
IMPORTED_LOCATION "${Chromaprint_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${PC_Chromaprint_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${Chromaprint_INCLUDE_DIR}"
)
endif()
endif()
87 changes: 87 additions & 0 deletions cmake/modules/FindEbur128.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# This file is part of Mixxx, Digital DJ'ing software.
# Copyright (C) 2001-2019 Mixxx Development Team
# Distributed under the GNU General Public Licence (GPL) version 2 or any later
# later version. See the LICENSE file for details.

#[=======================================================================[.rst:
FindEbur128
-----------

Finds the Ebur128 library.

Imported Targets
^^^^^^^^^^^^^^^^

This module provides the following imported targets, if found:

``Ebur128::Ebur128``
The Ebur128 library

Result Variables
^^^^^^^^^^^^^^^^

This will define the following variables:

``Ebur128_FOUND``
True if the system has the Ebur128 library.
``Ebur128_INCLUDE_DIRS``
Include directories needed to use Ebur128.
``Ebur128_LIBRARIES``
Libraries needed to link to Ebur128.
``Ebur128_DEFINITIONS``
Compile defitions needed to use Ebur128.

Cache Variables
^^^^^^^^^^^^^^^

The following cache variables may also be set:

``Ebur128_INCLUDE_DIR``
The directory containing ``ebur128.h``.
``Ebur128_LIBRARY``
The path to the Ebur128 library.

#]=======================================================================]

find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(PC_Ebur128 QUIET libebur128)
endif()

find_path(Ebur128_INCLUDE_DIR
NAMES ebur128.h
PATHS ${PC_Ebur128_INCLUDE_DIRS}
PATH_SUFFIXES ebur128
DOC "Ebur128 include directory")
mark_as_advanced(Ebur128_INCLUDE_DIR)

find_library(Ebur128_LIBRARY
NAMES ebur128
PATHS ${PC_Ebur128_LIBRARY_DIRS}
DOC "Ebur128 library"
)
mark_as_advanced(Ebur128_LIBRARY)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Ebur128
DEFAULT_MSG
Ebur128_LIBRARY
Ebur128_INCLUDE_DIR
)

if(Ebur128_FOUND)
set(Ebur128_LIBRARIES "${Ebur128_LIBRARY}")
set(Ebur128_INCLUDE_DIRS "${Ebur128_INCLUDE_DIR}")
set(Ebur128_DEFINITIONS ${PC_Ebur128_CFLAGS_OTHER})

if(NOT TARGET Ebur128::Ebur128)
add_library(Ebur128::Ebur128 UNKNOWN IMPORTED)
set_target_properties(Ebur128::Ebur128
PROPERTIES
IMPORTED_LOCATION "${Ebur128_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${PC_Ebur128_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${Ebur128_INCLUDE_DIR}"
)
endif()
endif()
75 changes: 75 additions & 0 deletions cmake/modules/FindFFTW.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# This file is part of Mixxx, Digital DJ'ing software.
# Copyright (C) 2001-2019 Mixxx Development Team
# Distributed under the GNU General Public Licence (GPL) version 2 or any later
# later version. See the LICENSE file for details.

#[=======================================================================[.rst:
FindFFTW
--------

Finds the FFTW library.

Imported Targets
^^^^^^^^^^^^^^^^

This module provides the following imported targets, if found:

``FFTW::FFTW``
The FFTW library

Result Variables
^^^^^^^^^^^^^^^^

This will define the following variables:

``FFTW_FOUND``
True if the system has the FFTW library.
``FFTW_INCLUDE_DIRS``
Include directories needed to use FFTW.
``FFTW_LIBRARIES``
Libraries needed to link to FFTW.

Cache Variables
^^^^^^^^^^^^^^^

The following cache variables may also be set:

``FFTW_INCLUDE_DIR``
The directory containing ``fftw3.h``.
``FFTW_LIBRARY``
The path to the FFTW library.

#]=======================================================================]

find_path(FFTW_INCLUDE_DIR
NAMES fftw3.h
DOC "FFTW include directory")
mark_as_advanced(FFTW_INCLUDE_DIR)

find_library(FFTW_LIBRARY
NAMES fftw fftw3 fftw-3.3
DOC "FFTW library"
)
mark_as_advanced(FFTW_LIBRARY)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
FFTW
DEFAULT_MSG
FFTW_LIBRARY
FFTW_INCLUDE_DIR
)

if(FFTW_FOUND)
set(FFTW_LIBRARIES "${FFTW_LIBRARY}")
set(FFTW_INCLUDE_DIRS "${FFTW_INCLUDE_DIR}")

if(NOT TARGET FFTW::FFTW)
add_library(FFTW::FFTW UNKNOWN IMPORTED)
set_target_properties(FFTW::FFTW
PROPERTIES
IMPORTED_LOCATION "${FFTW_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIR}"
)
endif()
endif()
Loading