aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CheckFileOffsetBits.c9
-rw-r--r--cmake/CheckFileOffsetBits.cmake39
-rw-r--r--cmake/CheckSharedFunctionExists.cmake92
-rw-r--r--cmake/FindMySOFA.cmake81
-rw-r--r--cmake/FindOpenSL.cmake64
-rw-r--r--cmake/FindWindowsSDK.cmake15
6 files changed, 155 insertions, 145 deletions
diff --git a/cmake/CheckFileOffsetBits.c b/cmake/CheckFileOffsetBits.c
deleted file mode 100644
index de98296e..00000000
--- a/cmake/CheckFileOffsetBits.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <sys/types.h>
-
-#define KB ((off_t)(1024))
-#define MB ((off_t)(KB*1024))
-#define GB ((off_t)(MB*1024))
-int tb[((GB+GB+GB) > GB) ? 1 : -1];
-
-int main()
-{ return 0; }
diff --git a/cmake/CheckFileOffsetBits.cmake b/cmake/CheckFileOffsetBits.cmake
deleted file mode 100644
index 1dc154e4..00000000
--- a/cmake/CheckFileOffsetBits.cmake
+++ /dev/null
@@ -1,39 +0,0 @@
-# - Check if the _FILE_OFFSET_BITS macro is needed for large files
-# CHECK_FILE_OFFSET_BITS()
-#
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# Copyright (c) 2009, Chris Robinson
-#
-# Redistribution and use is allowed according to the terms of the LGPL license.
-
-
-MACRO(CHECK_FILE_OFFSET_BITS)
-
- IF(NOT DEFINED _FILE_OFFSET_BITS)
- MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files")
- TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CheckFileOffsetBits.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
- IF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
- TRY_COMPILE(__WITH_FILE_OFFSET_BITS_64
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CheckFileOffsetBits.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_FILE_OFFSET_BITS=64)
- ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
-
- IF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
- SET(_FILE_OFFSET_BITS 64 CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
- MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - 64")
- ELSE(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
- SET(_FILE_OFFSET_BITS "" CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
- MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - not needed")
- ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
- ENDIF(NOT DEFINED _FILE_OFFSET_BITS)
-
-ENDMACRO(CHECK_FILE_OFFSET_BITS) \ No newline at end of file
diff --git a/cmake/CheckSharedFunctionExists.cmake b/cmake/CheckSharedFunctionExists.cmake
deleted file mode 100644
index c691fa9c..00000000
--- a/cmake/CheckSharedFunctionExists.cmake
+++ /dev/null
@@ -1,92 +0,0 @@
-# - Check if a symbol exists as a function, variable, or macro
-# CHECK_SYMBOL_EXISTS(<symbol> <files> <variable>)
-#
-# Check that the <symbol> is available after including given header
-# <files> and store the result in a <variable>. Specify the list
-# of files in one argument as a semicolon-separated list.
-#
-# If the header files define the symbol as a macro it is considered
-# available and assumed to work. If the header files declare the
-# symbol as a function or variable then the symbol must also be
-# available for linking. If the symbol is a type or enum value
-# it will not be recognized (consider using CheckTypeSize or
-# CheckCSourceCompiles).
-#
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
-
-#=============================================================================
-# Copyright 2003-2011 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-MACRO(CHECK_SHARED_FUNCTION_EXISTS SYMBOL FILES LIBRARY LOCATION VARIABLE)
- IF(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}")
- SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
- SET(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
- IF(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_SYMBOL_EXISTS_LIBS
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES};${LIBRARY}")
- ELSE(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_SYMBOL_EXISTS_LIBS
- "-DLINK_LIBRARIES:STRING=${LIBRARY}")
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CMAKE_SYMBOL_EXISTS_INCLUDES
- "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CMAKE_SYMBOL_EXISTS_INCLUDES)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- FOREACH(FILE ${FILES})
- SET(CMAKE_CONFIGURABLE_FILE_CONTENT
- "${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
- ENDFOREACH(FILE)
- SET(CMAKE_CONFIGURABLE_FILE_CONTENT
- "${CMAKE_CONFIGURABLE_FILE_CONTENT}\nvoid cmakeRequireSymbol(int dummy,...){(void)dummy;}\nint main()\n{\n cmakeRequireSymbol(0,&${SYMBOL});\n return 0;\n}\n")
-
- CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
- "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" @ONLY)
-
- MESSAGE(STATUS "Looking for ${SYMBOL} in ${LIBRARY}")
- TRY_COMPILE(${VARIABLE}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- CMAKE_FLAGS
- -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
- -DLINK_DIRECTORIES:STRING=${LOCATION}
- "${CHECK_SYMBOL_EXISTS_LIBS}"
- "${CMAKE_SYMBOL_EXISTS_INCLUDES}"
- OUTPUT_VARIABLE OUTPUT)
- IF(${VARIABLE})
- MESSAGE(STATUS "Looking for ${SYMBOL} in ${LIBRARY} - found")
- SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL} in ${LIBRARY}")
- FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the ${SYMBOL} "
- "exist in ${LIBRARY} passed with the following output:\n"
- "${OUTPUT}\nFile ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c:\n"
- "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
- ELSE(${VARIABLE})
- MESSAGE(STATUS "Looking for ${SYMBOL} in ${LIBRARY} - not found.")
- SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL} in ${LIBRARY}")
- FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the ${SYMBOL} "
- "exist in ${LIBRARY} failed with the following output:\n"
- "${OUTPUT}\nFile ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c:\n"
- "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
- ENDIF(${VARIABLE})
- ENDIF(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}")
-ENDMACRO(CHECK_SHARED_FUNCTION_EXISTS)
diff --git a/cmake/FindMySOFA.cmake b/cmake/FindMySOFA.cmake
new file mode 100644
index 00000000..a1d57446
--- /dev/null
+++ b/cmake/FindMySOFA.cmake
@@ -0,0 +1,81 @@
+# - Find MySOFA
+# Find the MySOFA libraries
+#
+# This module defines the following variables:
+# MYSOFA_FOUND - True if MYSOFA_INCLUDE_DIR & MYSOFA_LIBRARY are found
+# MYSOFA_INCLUDE_DIRS - where to find mysofa.h, etc.
+# MYSOFA_LIBRARIES - the MySOFA library
+#
+
+#=============================================================================
+# Copyright 2009-2011 Kitware, Inc.
+# Copyright 2009-2011 Philip Lowman <[email protected]>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# * The names of Kitware, Inc., the Insight Consortium, or the names of
+# any consortium members, or of any contributors, may not be used to
+# endorse or promote products derived from this software without
+# specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+
+find_package(ZLIB)
+
+find_path(MYSOFA_INCLUDE_DIR NAMES mysofa.h
+ DOC "The MySOFA include directory"
+)
+
+find_library(MYSOFA_LIBRARY NAMES mysofa
+ DOC "The MySOFA library"
+)
+
+find_library(MYSOFA_M_LIBRARY NAMES m
+ DOC "The math library for MySOFA"
+)
+
+# handle the QUIETLY and REQUIRED arguments and set MYSOFA_FOUND to TRUE if
+# all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MYSOFA REQUIRED_VARS MYSOFA_LIBRARY MYSOFA_INCLUDE_DIR ZLIB_FOUND)
+
+if(MYSOFA_FOUND)
+ set(MYSOFA_INCLUDE_DIRS ${MYSOFA_INCLUDE_DIR})
+ set(MYSOFA_LIBRARIES ${MYSOFA_LIBRARY})
+ set(MYSOFA_LIBRARIES ${MYSOFA_LIBRARIES} ZLIB::ZLIB)
+ if(MYSOFA_M_LIBRARY)
+ set(MYSOFA_LIBRARIES ${MYSOFA_LIBRARIES} ${MYSOFA_M_LIBRARY})
+ endif()
+
+ add_library(MySOFA::MySOFA UNKNOWN IMPORTED)
+ set_property(TARGET MySOFA::MySOFA PROPERTY
+ IMPORTED_LOCATION ${MYSOFA_LIBRARY})
+ set_target_properties(MySOFA::MySOFA PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES ${MYSOFA_INCLUDE_DIRS}
+ INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
+ if(MYSOFA_M_LIBRARY)
+ set_property(TARGET MySOFA::MySOFA APPEND PROPERTY
+ INTERFACE_LINK_LIBRARIES ${MYSOFA_M_LIBRARY})
+ endif()
+endif()
+
+mark_as_advanced(MYSOFA_INCLUDE_DIR MYSOFA_LIBRARY)
diff --git a/cmake/FindOpenSL.cmake b/cmake/FindOpenSL.cmake
new file mode 100644
index 00000000..41c68fde
--- /dev/null
+++ b/cmake/FindOpenSL.cmake
@@ -0,0 +1,64 @@
+# - Find OpenSL
+# Find the OpenSL libraries
+#
+# This module defines the following variables:
+# OPENSL_FOUND - True if OPENSL_INCLUDE_DIR & OPENSL_LIBRARY are set
+# OPENSL_INCLUDE_DIRS - where to find SLES/OpenSLES.h, etc.
+# OPENSL_LIBRARIES - the OpenSL library
+#
+
+#=============================================================================
+# Copyright 2009-2011 Kitware, Inc.
+# Copyright 2009-2011 Philip Lowman <[email protected]>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# * The names of Kitware, Inc., the Insight Consortium, or the names of
+# any consortium members, or of any contributors, may not be used to
+# endorse or promote products derived from this software without
+# specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+
+find_path(OPENSL_INCLUDE_DIR NAMES SLES/OpenSLES.h
+ DOC "The OpenSL include directory"
+)
+find_path(OPENSL_ANDROID_INCLUDE_DIR NAMES SLES/OpenSLES_Android.h
+ DOC "The OpenSL Android include directory"
+)
+
+find_library(OPENSL_LIBRARY NAMES OpenSLES
+ DOC "The OpenSL library"
+)
+
+# handle the QUIETLY and REQUIRED arguments and set OPENSL_FOUND to TRUE if
+# all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(OPENSL REQUIRED_VARS OPENSL_LIBRARY OPENSL_INCLUDE_DIR
+ OPENSL_ANDROID_INCLUDE_DIR)
+
+if(OPENSL_FOUND)
+ set(OPENSL_LIBRARIES ${OPENSL_LIBRARY})
+ set(OPENSL_INCLUDE_DIRS ${OPENSL_INCLUDE_DIR} ${OPENSL_ANDROID_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(OPENSL_INCLUDE_DIR OPENSL_ANDROID_INCLUDE_DIR OPENSL_LIBRARY)
diff --git a/cmake/FindWindowsSDK.cmake b/cmake/FindWindowsSDK.cmake
index e136b897..3fcc3bf4 100644
--- a/cmake/FindWindowsSDK.cmake
+++ b/cmake/FindWindowsSDK.cmake
@@ -73,6 +73,11 @@ macro(_winsdk_announce)
endmacro()
set(_winsdk_win10vers
+ 10.0.18362.0 # Windows 10 Version 1903
+ 10.0.17763.0 # Windows 10 Version 1809
+ 10.0.17134.0 # Windows 10 Version 1803 (April 2018 Update)
+ 10.0.16299.0 # Windows 10 Version 1709 (Fall Creators Update)
+ 10.0.15063.0 # Windows 10 Version 1703 (Creators Update)
10.0.14393.0 # Redstone aka Win10 1607 "Anniversary Update"
10.0.10586.0 # TH2 aka Win10 1511
10.0.10240.0 # Win10 RTM
@@ -527,11 +532,11 @@ if(WINDOWSSDK_FOUND)
winv6.3 # Win 8.1 min requirement
)
- list(APPEND _suffixes
- "lib/${_ver}/${_winsdk_arch}"
- "lib/${_ver}/um/${_winsdk_arch8}"
- "lib/${_ver}/km/${_winsdk_arch8}"
- )
+ list(APPEND _suffixes
+ "lib/${_ver}/${_winsdk_arch}"
+ "lib/${_ver}/um/${_winsdk_arch8}"
+ "lib/${_ver}/km/${_winsdk_arch8}"
+ )
endforeach()
# Look for WDF libraries in Win10+ SDK