diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2019-09-12 23:19:04 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2019-10-24 18:55:01 +0200 |
commit | 0d5609fd66ce10480a72a1ac25ded66e423c01ad (patch) | |
tree | 73b5502c8faf4d82d9a522c8d03e5871d7a6e5a1 /cmake | |
parent | c277f5c8f476287bb9d89a7dcaed5a708c1cf1e1 (diff) |
CMake: Add optional features
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindGPerfTools.cmake | 120 | ||||
-rw-r--r-- | cmake/modules/FindHSS1394.cmake | 75 | ||||
-rw-r--r-- | cmake/modules/FindID3Tag.cmake | 85 | ||||
-rw-r--r-- | cmake/modules/FindLibUSB.cmake | 86 | ||||
-rw-r--r-- | cmake/modules/FindLilv.cmake | 85 | ||||
-rw-r--r-- | cmake/modules/FindMAD.cmake | 85 | ||||
-rw-r--r-- | cmake/modules/FindMP4.cmake | 84 | ||||
-rw-r--r-- | cmake/modules/FindMP4v2.cmake | 84 | ||||
-rw-r--r-- | cmake/modules/FindMediaFoundation.cmake | 20 | ||||
-rw-r--r-- | cmake/modules/FindModplug.cmake | 84 | ||||
-rw-r--r-- | cmake/modules/FindOpus.cmake | 87 | ||||
-rw-r--r-- | cmake/modules/FindSQLite3.cmake | 85 | ||||
-rw-r--r-- | cmake/modules/FindShout.cmake | 84 | ||||
-rw-r--r-- | cmake/modules/FindWavPack.cmake | 84 |
14 files changed, 1148 insertions, 0 deletions
diff --git a/cmake/modules/FindGPerfTools.cmake b/cmake/modules/FindGPerfTools.cmake new file mode 100644 index 0000000000..370f061c87 --- /dev/null +++ b/cmake/modules/FindGPerfTools.cmake @@ -0,0 +1,120 @@ +# 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: +FindGPerfTools +-------------- + +Finds the GPerfTools library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``GPerfTools::tcmalloc`` + The GPerfTools tcmalloc library +``GPerfTools::profiler`` + The GPerfTools profiler library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``GPerfTools_FOUND`` + True if the system has the GPerfTools library. +``GPerfTools_INCLUDE_DIRS`` + Include directories needed to use GPerfTools. +``GPerfTools_LIBRARIES`` + Libraries needed to link to GPerfTools. +``GPerfTools_DEFINITIONS`` + Compile defitions needed to use GPerfTools. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``GPerfTools_TCMALLOC_INCLUDE_DIR`` + The directory containing ``gperftools/tcmalloc.h``. +``GPerfTools_TCMALLOC_LIBRARY`` + The path to the GPerfTools tcmalloc library. +``GPerfTools_PROFILER_INCLUDE_DIR`` + The directory containing ``gperftools/profiler.h``. +``GPerfTools_PROFILER_LIBRARY`` + The path to the GPerfTools profiler library. + +#]=======================================================================] + +find_package(PkgConfig) + +pkg_check_modules(PC_GPerfTools_TCMALLOC QUIET libtcmalloc) +find_path(GPerfTools_TCMALLOC_INCLUDE_DIR + NAMES gperftools/tcmalloc.h + PATHS ${PC_GPerfTools_TCMALLOC_INCLUDE_DIRS} + DOC "tcmalloc include directory") +mark_as_advanced(GPerfTools_TCMALLOC_INCLUDE_DIR) + +find_library(GPerfTools_TCMALLOC_LIBRARY + NAMES tcmalloc + PATHS ${PC_GPerfTools_TCMALLOC_LIBRARY_DIRS} + DOC "tcmalloc library" +) +mark_as_advanced(GPerfTools_TCMALLOC_LIBRARY) + +pkg_check_modules(PC_GPerfTools_PROFILER QUIET libprofiler) +find_path(GPerfTools_PROFILER_INCLUDE_DIR + NAMES gperftools/profiler.h + PATHS ${PC_GPerfTools_PROFILER_INCLUDE_DIRS} + DOC "profiler include directory") +mark_as_advanced(GPerfTools_PROFILER_INCLUDE_DIR) + +find_library(GPerfTools_PROFILER_LIBRARY + NAMES profiler + PATHS ${PC_GPerfTools_PROFILER_LIBRARY_DIRS} + DOC "profiler library" +) +mark_as_advanced(GPerfTools_PROFILER_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + GPerfTools + DEFAULT_MSG + GPerfTools_TCMALLOC_LIBRARY + GPerfTools_TCMALLOC_INCLUDE_DIR + GPerfTools_PROFILER_LIBRARY + GPerfTools_PROFILER_INCLUDE_DIR +) + +if(GPerfTools_FOUND) + set(GPerfTools_LIBRARIES + ${GPerfTools_TCMALLOC_LIBRARY} + ${GPerfTools_PROFILER_LIBRARY} + ) + set(GPerfTools_INCLUDE_DIRS + ${GPerfTools_TCMALLOC_INCLUDE_DIR} + ${GPerfTools_PROFILER_INCLUDE_DIR} + ) + set(GPerfTools_DEFINITIONS + ${PC_GPerfTools_TCMALLOC_CFLAGS_OTHER} + ${PC_GPerfTools_PROFILER_CFLAGS_OTHER} + ) + + if (NOT TARGET GPerfTools::tcmalloc) + add_library(GPerfTools::tcmalloc UNKNOWN IMPORTED) + set_target_properties(GPerfTools::tcmalloc PROPERTIES + IMPORTED_LOCATION ${GPerfTools_TCMALLOC_LIBRARY} + INTERFACE_COMPILE_OPTIONS "${PC_GPerfTools_TCMALLOC_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${GPerfTools_TCMALLOC_INCLUDE_DIR}") + endif() + if (NOT TARGET GPerfTools::profiler) + add_library(GPerfTools::profiler UNKNOWN IMPORTED) + set_target_properties(GPerfTools::profiler PROPERTIES + IMPORTED_LOCATION "${GPerfTools_PROFILER_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${PC_GPerfTools_PROFILER_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${GPerfTools_PROFILER_INCLUDE_DIR}") + endif() +endif() diff --git a/cmake/modules/FindHSS1394.cmake b/cmake/modules/FindHSS1394.cmake new file mode 100644 index 0000000000..3030706849 --- /dev/null +++ b/cmake/modules/FindHSS1394.cmake @@ -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: +FindHSS1394 +----------- + +Finds the HSS1394 library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``HSS1394::HSS1394`` + The HSS1304 library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``HSS1394_FOUND`` + True if the system has the HSS1394 library. +``HSS1394_INCLUDE_DIRS`` + Include directories needed to use HSS1394. +``HSS1394_LIBRARIES`` + Libraries needed to link to HSS1394. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``HSS1394_INCLUDE_DIR`` + The directory containing ``HSS1394/HSS1394.h``. +``HSS1394_LIBRARY`` + The path to the HSS1394 library. + +#]=======================================================================] + +find_path(HSS1394_INCLUDE_DIR + NAMES HSS1394/HSS1394.h + DOC "HSS1394 include directory") +mark_as_advanced(HSS1394_INCLUDE_DIR) + +find_library(HSS1394_LIBRARY + NAMES hss1394 + DOC "HSS1394 library" +) +mark_as_advanced(HSS1394_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + HSS1394 + DEFAULT_MSG + HSS1394_LIBRARY + HSS1394_INCLUDE_DIR +) + +if(HSS1394_FOUND) + set(HSS1394_LIBRARIES "${HSS1394_LIBRARY}") + set(HSS1394_INCLUDE_DIRS "${HSS1394_INCLUDE_DIR}") + + if(NOT TARGET HSS1394::HSS1394) + add_library(HSS1394::HSS1394 UNKNOWN IMPORTED) + set_target_properties(HSS1394::HSS1394 + PROPERTIES + IMPORTED_LOCATION "${HSS1394_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${HSS1394_INCLUDE_DIR}" + ) + endif() +endif() diff --git a/cmake/modules/FindID3Tag.cmake b/cmake/modules/FindID3Tag.cmake new file mode 100644 index 0000000000..b97d8f33b2 --- /dev/null +++ b/cmake/modules/FindID3Tag.cmake @@ -0,0 +1,85 @@ +# 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: +FindID3Tag +---------- + +Finds the ID3Tag library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``ID3Tag::ID3Tag`` + The ID3Tag library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``ID3Tag_FOUND`` + True if the system has the ID3Tag library. +``ID3Tag_INCLUDE_DIRS`` + Include directories needed to use ID3Tag. +``ID3Tag_LIBRARIES`` + Libraries needed to link to ID3Tag. +``ID3Tag_DEFINITIONS`` + Compile defitions needed to use ID3Tag. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``ID3Tag_INCLUDE_DIR`` + The directory containing ``id3tag.h``. +``ID3Tag_LIBRARY`` + The path to the ID3Tag library. + +#]=======================================================================] + +find_package(PkgConfig) +pkg_check_modules(PC_ID3Tag QUIET id3tag) + +find_path(ID3Tag_INCLUDE_DIR + NAMES id3tag.h + PATHS ${PC_ID3Tag_INCLUDE_DIRS} + PATH_SUFFIXES id3tag + DOC "ID3Tag include directory") +mark_as_advanced(ID3Tag_INCLUDE_DIR) + +find_library(ID3Tag_LIBRARY + NAMES id3tag + PATHS ${PC_ID3Tag_LIBRARY_DIRS} + DOC "ID3Tag library" +) +mark_as_advanced(ID3Tag_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + ID3Tag + DEFAULT_MSG + ID3Tag_LIBRARY + ID3Tag_INCLUDE_DIR +) + +if(ID3Tag_FOUND) + set(ID3Tag_LIBRARIES "${ID3Tag_LIBRARY}") + set(ID3Tag_INCLUDE_DIRS "${ID3Tag_INCLUDE_DIR}") + set(ID3Tag_DEFINITIONS ${PC_ID3Tag_CFLAGS_OTHER}) + + if(NOT TARGET ID3Tag::ID3Tag) + add_library(ID3Tag::ID3Tag UNKNOWN IMPORTED) + set_target_properties(ID3Tag::ID3Tag + PROPERTIES + IMPORTED_LOCATION "${ID3Tag_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${PC_ID3Tag_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${ID3Tag_INCLUDE_DIR}" + ) + endif() +endif() diff --git a/cmake/modules/FindLibUSB.cmake b/cmake/modules/FindLibUSB.cmake new file mode 100644 index 0000000000..39c6e39fe1 --- /dev/null +++ b/cmake/modules/FindLibUSB.cmake @@ -0,0 +1,86 @@ +# 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: +FindLibUSB +---------- + +Finds the LibUSB library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``LibUSB::LibUSB`` + The LibUSB library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``LibUSB_FOUND`` + True if the system has the LibUSB library. +``LibUSB_INCLUDE_DIRS`` + Include directories needed to use LibUSB. +``LibUSB_LIBRARIES`` + Libraries needed to link to LibUSB. +``LibUSB_DEFINITIONS`` + Compile defitions needed to use LibUSB. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``LibUSB_INCLUDE_DIR`` + The directory containing ``libusb-1.0/libusb.h``. +``LibUSB_LIBRARY`` + The path to the LibUSB library. + +#]=======================================================================] + +find_package(PkgConfig) +pkg_check_modules(PC_LibUSB QUIET libusb-1.0) + +find_path(LibUSB_INCLUDE_DIR + NAMES libusb.h + PATH_SUFFIXES libusb libusb-1.0 + PATHS ${PC_LibUSB_INCLUDE_DIRS} + DOC "LibUSB include directory" +) +mark_as_advanced(LibUSB_INCLUDE_DIR) + +find_library(LibUSB_LIBRARY + NAMES usb-1.0 + PATHS ${PC_LibUSB_LIBRARY_DIRS} + DOC "LibUSB library" +) +mark_as_advanced(LibUSB_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LibUSB + DEFAULT_MSG + LibUSB_LIBRARY + LibUSB_INCLUDE_DIR +) + +if(LibUSB_FOUND) + set(LibUSB_LIBRARIES "${LibUSB_LIBRARY}") + set(LibUSB_INCLUDE_DIRS "${LibUSB_INCLUDE_DIR}") + set(LibUSB_DEFINITIONS ${PC_LibUSB_CFLAGS_OTHER}) + + if(NOT TARGET LibUSB::LibUSB) + add_library(LibUSB::LibUSB UNKNOWN IMPORTED) + set_target_properties(LibUSB::LibUSB + PROPERTIES + IMPORTED_LOCATION "${LibUSB_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${PC_LibUSB_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${LibUSB_INCLUDE_DIR}" + ) + endif() +endif() diff --git a/cmake/modules/FindLilv.cmake b/cmake/modules/FindLilv.cmake new file mode 100644 index 0000000000..a4ff766c00 --- /dev/null +++ b/cmake/modules/FindLilv.cmake @@ -0,0 +1,85 @@ +# 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: +FindLilv +-------- + +Finds the Lilv library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``Lilv::Lilv`` + The Lilv library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``Lilv_FOUND`` + True if the system has the Lilv library. +``Lilv_INCLUDE_DIRS`` + Include directories needed to use Lilv. +``Lilv_LIBRARIES`` + Libraries needed to link to Lilv. +``Lilv_DEFINITIONS`` + Compile defitions needed to use Lilv. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``Lilv_INCLUDE_DIR`` + The directory containing ``lilv-0/lilb/lilv.h``. +``Lilv_LIBRARY`` + The path to the Lilv library. + +#]=======================================================================] + +find_package(PkgConfig) +pkg_check_modules(PC_Lilv QUIET lilv-0) + +find_path(Lilv_INCLUDE_DIR + NAMES lilv-0/lilv/lilv.h + PATHS ${PC_Lilv_INCLUDE_DIRS} + DOC "Lilv include directory" +) +mark_as_advanced(Lilv_INCLUDE_DIR) + +find_library(Lilv_LIBRARY + NAMES lilv-0 + PATHS ${PC_Lilv_LIBRARY_DIRS} + DOC "Lilv library" +) +mark_as_advanced(Lilv_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + Lilv + DEFAULT_MSG + Lilv_LIBRARY + Lilv_INCLUDE_DIR +) + +if(Lilv_FOUND) + set(Lilv_LIBRARIES "${Lilv_LIBRARY}") + set(Lilv_INCLUDE_DIRS "${Lilv_INCLUDE_DIR}") + set(Lilv_DEFINITIONS ${PC_Lilv_CFLAGS_OTHER}) + + if(NOT TARGET Lilv::Lilv) + add_library(Lilv::Lilv UNKNOWN IMPORTED) + set_target_properties(Lilv::Lilv + PROPERTIES + IMPORTED_LOCATION "${Lilv_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${PC_Lilv_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${Lilv_INCLUDE_DIR}" + ) + endif() +endif() diff --git a/cmake/modules/FindMAD.cmake b/cmake/modules/FindMAD.cmake new file mode 100644 index 0000000000..1e7cf7a2f3 --- /dev/null +++ b/cmake/modules/FindMAD.cmake @@ -0,0 +1,85 @@ +# 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: +FindMAD +------- + +Finds the MAD library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``MAD::MAD`` + The MAD library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``MAD_FOUND`` + True if the system has the MAD library. +``MAD_INCLUDE_DIRS`` + Include directories needed to use MAD. +``MAD_LIBRARIES`` + Libraries needed to link to MAD. +``MAD_DEFINITIONS`` + Compile defitions needed to use MAD. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``MAD_INCLUDE_DIR`` + The directory containing ``mad.h``. +``MAD_LIBRARY`` + The path to the MAD library. + +#]=======================================================================] + +find_package(PkgConfig) +pkg_check_modules(PC_MAD QUIET mad) + +find_path(MAD_INCLUDE_DIR + NAMES mad.h + PATHS ${PC_MAD_INCLUDE_DIRS} + PATH_SUFFIXES mad + DOC "MAD include directory") +mark_as_advanced(MAD_INCLUDE_DIR) + +find_library(MAD_LIBRARY + NAMES mad + PATHS ${PC_MAD_LIBRARY_DIRS} + DOC "MAD library" +) +mark_as_advanced(MAD_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + MAD + DEFAULT_MSG + MAD_LIBRARY + MAD_INCLUDE_DIR +) + +if(MAD_FOUND) + set(MAD_LIBRARIES "${MAD_LIBRARY}") + set(MAD_INCLUDE_DIRS "${MAD_INCLUDE_DIR}") + set(MAD_DEFINITIONS ${PC_MAD_CFLAGS_OTHER}) + + if(NOT TARGET MAD::MAD) + add_library(MAD::MAD UNKNOWN IMPORTED) + set_target_properties(MAD::MAD + PROPERTIES + IMPORTED_LOCATION "${MAD_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${PC_MAD_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${MAD_INCLUDE_DIR}" + ) + endif() +endif() diff --git a/cmake/modules/FindMP4.cmake b/cmake/modules/FindMP4.cmake new file mode 100644 index 0000000000..dff3e6c053 --- /dev/null +++ b/cmake/modules/FindMP4.cmake @@ -0,0 +1,84 @@ +# 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: +FindMP4 +------- + +Finds the MP4 library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``MP4::MP4`` + The MP4 library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``MP4_FOUND`` + True if the system has the MP4 library. +``MP4_INCLUDE_DIRS`` + Include directories needed to use MP4. +``MP4_LIBRARIES`` + Libraries needed to link to MP4. +``MP4_DEFINITIONS`` + Compile defitions needed to use MP4. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``MP4_INCLUDE_DIR`` + The directory containing ``mp4/mp4.h``. +``MP4_LIBRARY`` + The path to the MP4 library. + +#]=======================================================================] + +find_package(PkgConfig) +pkg_check_modules(PC_MP4 QUIET mp4) + +find_path(MP4_INCLUDE_DIR + NAMES mp4/mp4.h + PATHS ${PC_MP4_INCLUDE_DIRS} + DOC "MP4 include directory") +mark_as_advanced(MP4_INCLUDE_DIR) + +find_library(MP4_LIBRARY + NAMES mp4 + PATHS ${PC_MP4_LIBRARY_DIRS} + DOC "MP4 library" +) +mark_as_advanced(MP4_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + MP4 + DEFAULT_MSG + MP4_LIBRARY + MP4_INCLUDE_DIR +) + +if(MP4_FOUND) + set(MP4_LIBRARIES "${MP4_LIBRARY}") + set(MP4_INCLUDE_DIRS "${MP4_INCLUDE_DIR}") + set(MP4_DEFINITIONS ${PC_MP4_CFLAGS_OTHER}) + + if(NOT TARGET MP4::MP4) + add_library(MP4::MP4 UNKNOWN IMPORTED) + set_target_properties(MP4::MP4 + PROPERTIES + IMPORTED_LOCATION "${MP4_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${PC_MP4_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${MP4_INCLUDE_DIR}" + ) + endif() +endif() diff --git a/cmake/modules/FindMP4v2.cmake b/cmake/modules/FindMP4v2.cmake new file mode 100644 index 0000000000..798710fa39 --- /dev/null +++ b/cmake/modules/FindMP4v2.cmake @@ -0,0 +1,84 @@ +# 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: +FindMP4v2 +--------- + +Finds the MP4v2 library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``MP4v2::MP4v2`` + The MP4v2 library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``MP4v2_FOUND`` + True if the system has the MP4v2 library. +``MP4v2_INCLUDE_DIRS`` + Include directories needed to use MP4v2. +``MP4v2_LIBRARIES`` + Libraries needed to link to MP4v2. +``MP4v2_DEFINITIONS`` + Compile defitions needed to use MP4v2. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``MP4v2_INCLUDE_DIR`` + The directory containing ``mp4v2/mp4v2.h``. +``MP4v2_LIBRARY`` + The path to the MP4v2 library. + +#]=======================================================================] + +find_package(PkgConfig) +pkg_check_modules(PC_MP4v2 QUIET mp4v2) + +find_path(MP4v2_INCLUDE_DIR + NAMES mp4v2/mp4v2.h + PATHS ${PC_MP4v2_INCLUDE_DIRS} + DOC "MP4v2 include directory") +mark_as_advanced(MP4v2_INCLUDE_DIR) + +find_library(MP4v2_LIBRARY + NAMES mp4v2 + PATHS ${PC_MP4v2_LIBRARY_DIRS} + DOC "MP4v2 library" +) +mark_as_advanced(MP4v2_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + MP4v2 + DEFAULT_MSG + MP4v2_LIBRARY + MP4v2_INCLUDE_DIR +) + +if(MP4v2_FOUND) + set(MP4v2_LIBRARIES "${MP4v2_LIBRARY}") + set(MP4v2_INCLUDE_DIRS "${MP4v2_INCLUDE_DIR}") + set(MP4v2_DEFINITIONS ${PC_MP4v2_CFLAGS_OTHER}) + + if(NOT TARGET MP4v2::MP4v2) + add_library(MP4v2::MP4v2 UNKNOWN IMPORTED) + set_target_properties(MP4v2::MP4v2 + PROPERTIES + IMPORTED_LOCATION "${MP4v2_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${PC_MP4v2_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${MP4v2_INCLUDE_DIR}" + ) + endif() +endif() diff --git a/cmake/modules/FindMediaFoundation.cmake b/cmake/modules/FindMediaFoundation.cmake new file mode 100644 index 0000000000..0d8f47a821 --- /dev/null +++ b/cmake/modules/FindMediaFoundation.cmake @@ -0,0 +1,20 @@ +# - Find MediaFoundation +# Find the Windows SDK MediaFoundation libraries +# +# MediaFoundation_LIBRARIES - List of libraries when using MediaFoundation +# MediaFoundation_FOUND - True if MediaFoundation found + +IF (MSVC) + SET( MediaFoundation_LIBRARIES mf.lib mfplat.lib mfreadwrite.lib mfuuid.lib strmiids.lib ) + SET( MediaFoundation_FOUND true ) +ENDIF (MSVC) + +IF (MediaFoundation_FOUND) + IF (NOT MediaFoundation_FIND_QUIETLY) + MESSAGE(STATUS "Found MediaFoundation: ${MediaFoundation_LIBRARIES}") + ENDIF (NOT MediaFoundation_FIND_QUIETLY) +ELSE (MediaFoundation_FOUND) + IF (MediaFoundation_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find MediaFoundation") + ENDIF (MediaFoundation_FIND_REQUIRED) +ENDIF (MediaFoundation_FOUND) diff --git a/cmake/modules/FindModplug.cmake b/cmake/modules/FindModplug.cmake new file mode 100644 index 0000000000..171950d2a4 --- /dev/null +++ b/cmake/modules/FindModplug.cmake @@ -0,0 +1,84 @@ +# 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: +FindModplug +----------- + +Finds the Modplug library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``Modplug::Modplug`` + The Modplug library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``Modplug_FOUND`` + True if the system has the Modplug library. +``Modplug_INCLUDE_DIRS`` + Include directories needed to use Modplug. +``Modplug_LIBRARIES`` + Libraries needed to link to Modplug. +``Modplug_DEFINITIONS`` + Compile defitions needed to use Modplug. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``Modplug_INCLUDE_DIR`` + The directory containing ``modplug.h``. +``Modplug_LIBRARY`` + The path to the Modplug library. + +#]=======================================================================] + +find_package(PkgConfig) +pkg_check_modules(PC_Modplug QUIET libmodplug) + +find_path(Modplug_INCLUDE_DIR + NAMES libmodplug/modplug.h + PATHS ${PC_Modplug_INCLUDE_DIRS} + DOC "Modplug include directory") +mark_as_advanced(Modplug_INCLUDE_DIR) + +find_library(Modplug_LIBRARY + NAMES modplug + PATHS ${PC_Modplug_LIBRARY_DIRS} + DOC "Modplug library" +) +mark_as_advanced(Modplug_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + Modplug + DEFAULT_MSG + Modplug_LIBRARY + Modplug_INCLUDE_DIR +) + +if(Modplug_FOUND) + set(Modplug_LIBRARIES "${Modplug_LIBRARY}") + set(Modplug_INCLUDE_DIRS "${Modplug_INCLUDE_DIR}") + set(Modplug_DEFINITIONS ${PC_Modplug_CFLAGS_OTHER}) + + if(NOT TARGET Modplug::Modplug) + add_library(Modplug::Modplug UNKNOWN IMPORTED) + set_target_properties(Modplug::Modplug + PROPERTIES + IMPORTED_LOCATION "${Modplug_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${PC_Modplug_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${Modplug_INCLUDE_DIR}" + ) + endif() +endif() diff --git a/cmake/modules/FindOpus.cmake b/cmake/modules/FindOpus.cmake new file mode 100644 index 0000000000..61ce265cec --- /dev/null +++ b/cmake/modules/FindOpus.cmake @@ -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: +FindOpus +-------- + +Finds the Opus library. + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``Opus_FOUND`` + True if the system has the Opus library. +``Opus_INCLUDE_DIRS`` + Include directories needed to use Opus. +``Opus_LIBRARIES`` + Libraries needed to link to Opus. +``Opus_DEFINITIONS`` + Compile defitions needed to use Opus. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``Opus_INCLUDE_DIR`` + The directory containing ``opus.h``. +``Opus_LIBRARY`` + The path to the Opus library. +``OpusFile_INCLUDE_DIR`` + The directory containing ``opusfile.h``. +``OpusFile_LIBRARY`` + The path to the Opus library. + +#]=======================================================================] + +find_package(PkgConfig) +pkg_check_modules(PC_Opus QUIET opus) +pkg_check_modules(PC_OpusFile QUIET opusfile) + +find_path(Opus_INCLUDE_DIR + NAMES opus/opus.h + PATHS ${PC_Opus_INCLUDE_DIRS} + DOC "Opus include directory") +mark_as_advanced(Opus_INCLUDE_DIR) + +find_library(Opus_LIBRARY + NAMES opus + PATHS ${PC_Opus_LIBRARY_DIRS} + DOC "Opus library" +) +mark_as_advanced(Opus_LIBRARY) + +find_path(OpusFile_INCLUDE_DIR + NAMES opusfile.h + PATH_SUFFIXES opus + PATHS ${PC_OpusFile_INCLUDE_DIRS} + DOC "Opusfile include directory") +mark_as_advanced(OpusFile_INCLUDE_DIR) + +find_library(OpusFile_LIBRARY + NAMES opusfile + PATHS ${PC_OpusFile_LIBRARY_DIRS} + DOC "Opusfile library" +) +mark_as_advanced(OpusFile_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + Opus + DEFAULT_MSG + Opus_LIBRARY + Opus_INCLUDE_DIR + OpusFile_LIBRARY + OpusFile_INCLUDE_DIR +) + +if(Opus_FOUND) + set(Opus_LIBRARIES ${Opus_LIBRARY} ${OpusFile_LIBRARY}) + set(Opus_INCLUDE_DIRS ${Opus_INCLUDE_DIR} ${OpusFile_INCLUDE_DIR}) + set(Opus_DEFINITIONS ${PC_Opus_CFLAGS_OTHER} ${PC_OpusFile_CFLAGS_OTHER}) +endif() diff --git a/cmake/modules/FindSQLite3.cmake b/cmake/modules/FindSQLite3.cmake new file mode 100644 index 0000000000..fc7c0012d6 --- /dev/null +++ b/cmake/modules/FindSQLite3.cmake @@ -0,0 +1,85 @@ +# 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: +FindSQLite3 +----------- + +Finds the SQLite3 library. + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides the following imported targets, if found: + +``SQLite3::SQLite3`` + The SQLite3 library + +Result Variables +^^^^^^^^^^^^^^^^ + +This will define the following variables: + +``SQLite3_FOUND`` + True if the system has the SQLite3 library. +``SQLite3_INCLUDE_DIRS`` + Include directories needed to use SQLite3. +``SQLite3_LIBRARIES`` + Libraries needed to link to SQLite3. +``SQLite3_DEFINITIONS`` + Compile defitions needed to use SQLite3. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``SQLite3_INCLUDE_DIR`` + The directory containing ``sqlite3.h``. +``SQLite3_LIBRARY`` + The path to the SQLite3 library. + +#]=======================================================================] + +find_package(PkgConfig) +pkg_check_modules(PC_SQLite3 QUIET sqlite3) + +find_path(SQLite3_INCLUDE_DIR + NAMES sqlite3.h + PATHS ${PC_SQLite3_INCLUDE_DIRS} + PATH_SUFFIXES sqlite sqlite3 + DOC "SQLite3 include directory") +mark_as_advanced(SQLite3_INCLUDE_DIR) + +find_library(SQLite3_LIBRARY + NAMES sqlite3 + PATHS ${PC_SQLite3_LIBRARY_DIRS} + DOC "SQLite3 library" +) +mark_as_advanced(SQLite3_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + SQLite3 + DEFAULT_MSG + SQLite3_LIBRARY + SQLite3_INCLUDE_DIR +) + +if(SQLite3_FOUND) + set(SQLite3_LIBRARIES "${SQLite3_LIBRARY}") + set(SQLite3_INCLUDE_DIRS "${SQLite3_INCLUDE_DIR}") + set(SQLite3_DEFINITIONS ${PC_SQLite3_CFLAGS_OTHER}) + + if(NOT TARGET SQLite3::SQLite3) + add_library(SQLite3::SQLite3 UNKNOWN IMPORTED) + set_target_properties(SQLite3::SQLite3 + PROPERTIES + IMPORTED_LOCATION "${SQLite3_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${PC_SQLite3_CFLAGS_OTHER}" + INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIR}" + ) + endif() +endif() |