diff --git a/3rdParty/CMakeLists.txt b/3rdParty/CMakeLists.txt index 374149e..f76cbe2 100644 --- a/3rdParty/CMakeLists.txt +++ b/3rdParty/CMakeLists.txt @@ -32,7 +32,6 @@ add_subdirectory(boost) add_subdirectory(units) add_subdirectory(libjpeg-turbo) add_subdirectory(msdf) -add_subdirectory(cmake-checks-cache) if (NOT IOS AND ENABLE_CURL) add_subdirectory(curl) endif() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCCompilerFlag.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCCompilerFlag.cmake new file mode 100644 index 0000000..f08f191 --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCCompilerFlag.cmake @@ -0,0 +1,33 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckCCompilerFlag.cmake) + +macro(check_c_compiler_flag flag variable) + _check_c_compiler_flag("${flag}" ${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Test ${variable}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCSourceCompiles.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCSourceCompiles.cmake new file mode 100644 index 0000000..18ac96f --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCSourceCompiles.cmake @@ -0,0 +1,37 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckCSourceCompiles.cmake) + +macro(check_c_source_compiles source variable) + if(NOT DEFINED "${variable}") + _check_c_source_compiles("${source}" ${variable}) + else() + _check_c_source_compiles("${source}" ${variable} "${ARGN}") + endif() + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Test ${variable}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCXXCompilerFlag.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCXXCompilerFlag.cmake new file mode 100644 index 0000000..58d216d --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCXXCompilerFlag.cmake @@ -0,0 +1,33 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckCXXCompilerFlag.cmake) + +macro(check_cxx_compiler_flag flag variable) + _check_cxx_compiler_flag("${flag}" ${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Test ${variable}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCXXSourceCompiles.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCXXSourceCompiles.cmake new file mode 100644 index 0000000..9b58f1a --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCXXSourceCompiles.cmake @@ -0,0 +1,37 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake) + +macro(check_cxx_source_compiles source variable) + if(NOT DEFINED "${variable}") + _check_cxx_source_compiles("${source}" ${variable}) + else() + _check_cxx_source_compiles("${source}" ${variable} "${ARGN}") + endif() + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Test ${variable}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCXXSymbolExists.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCXXSymbolExists.cmake new file mode 100644 index 0000000..689bab8 --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckCXXSymbolExists.cmake @@ -0,0 +1,33 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckCXXSymbolExists.cmake) + +macro(check_cxx_symbol_exists symbol header variable) + _check_cxx_symbol_exists(${symbol} "${header}" ${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Have C++ symbol ${symbol}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckFunctionExists.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckFunctionExists.cmake new file mode 100644 index 0000000..5c15b80 --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckFunctionExists.cmake @@ -0,0 +1,33 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) + +macro(check_function_exists function variable) + _check_function_exists(${function} ${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Have function ${function}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckIncludeFile.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckIncludeFile.cmake new file mode 100644 index 0000000..083a308 --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckIncludeFile.cmake @@ -0,0 +1,33 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) + +macro(check_include_file header variable) + _check_include_file(${header} ${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Have include ${header}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckIncludeFileCXX.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckIncludeFileCXX.cmake new file mode 100644 index 0000000..50fdd73 --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckIncludeFileCXX.cmake @@ -0,0 +1,33 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake) + +macro(check_include_file_cxx header variable) + _check_include_file_cxx(${header} ${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Have include ${header}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckIncludeFiles.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckIncludeFiles.cmake new file mode 100644 index 0000000..8be1e86 --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckIncludeFiles.cmake @@ -0,0 +1,37 @@ +# MIT License + +# Copyright (c) 2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake) + +macro(check_include_files headers variable) + if(NOT DEFINED "${variable}") + _check_include_files("${headers}" ${variable}) + else() + _check_include_files("${headers}" ${variable} "${ARGN}") + endif() + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Have include ${headers}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckLibraryExists.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckLibraryExists.cmake new file mode 100644 index 0000000..1ab7536 --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckLibraryExists.cmake @@ -0,0 +1,33 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) + +macro(check_library_exists library function location variable) + _check_library_exists("${library}" ${function} "${location}" ${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Have library ${library}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckStructHasMember.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckStructHasMember.cmake new file mode 100644 index 0000000..28bd904 --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckStructHasMember.cmake @@ -0,0 +1,34 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckStructHasMember.cmake) + +macro(check_struct_has_member struct member header variable) + _check_struct_has_member("${struct}" ${member} "${header}" ${variable} ${ARGN}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"${struct} hash ${member} member\")\n") +endmacro() + diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckSymbolExists.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckSymbolExists.cmake new file mode 100644 index 0000000..11d459b --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckSymbolExists.cmake @@ -0,0 +1,33 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) + +macro(check_symbol_exists symbol header variable) + _check_symbol_exists(${symbol} "${header}" ${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Have symbol ${symbol}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckTypeSize.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckTypeSize.cmake new file mode 100644 index 0000000..ee56b64 --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/CheckTypeSize.cmake @@ -0,0 +1,38 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake) + +macro(check_type_size type variable) + _check_type_size(${type} ${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(HAVE_${variable} \"${HAVE_${variable}}\" CACHE INTERNAL \"Result of TRY_COMPILE\")\n") + if(HAVE_${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"CHECK_TYPE_SIZE: sizeof(${type})\")\n") + else() + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"\" CACHE INTERNAL \"CHECK_TYPE_SIZE: ${type} unknown\")\n") + endif() +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/DumpCMakeVariables.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/DumpCMakeVariables.cmake new file mode 100644 index 0000000..5267e7e --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/DumpCMakeVariables.cmake @@ -0,0 +1,48 @@ +# MIT License + +# Copyright (c) 2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +set(CMAKE_CHECKS_CACHE_FILE "${CMAKE_BINARY_DIR}/cmake_checks_cache.txt" CACHE FILEPATH "CMake checks cache file") + +file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "###############################################################\n") +file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "# Dump of all cache variables that started with CMAKE_*\n") +file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "###############################################################\n") + +get_cmake_property(_cachedVariableNames CACHE_VARIABLES) +list(FILTER _cachedVariableNames INCLUDE REGEX "^CMAKE_.*$") +foreach (_cacheVariable ${_cachedVariableNames}) + get_property(_type CACHE "${_cacheVariable}" PROPERTY TYPE) + get_property(_advanced CACHE "${_cacheVariable}" PROPERTY ADVANCED) + get_property(_help_string CACHE "${_cacheVariable}" PROPERTY HELPSTRING) + string(REPLACE "\"" "\\\"" ${_cacheVariable} "${${_cacheVariable}}") + if (NOT "${_type}" STREQUAL "UNINITIALIZED" AND NOT "${_type}" STREQUAL "STATIC") + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${_cacheVariable} \"${${_cacheVariable}}\" CACHE ${_type} \"${_help_string}\")\n") + if (${_advanced}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "mark_as_advanced(${_cacheVariable})\n") + endif() + endif() +endforeach() + +file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "###############################################################\n") diff --git a/3rdParty/cmake-checks-cache/CMakeChecksCache/TestBigEndian.cmake b/3rdParty/cmake-checks-cache/CMakeChecksCache/TestBigEndian.cmake new file mode 100644 index 0000000..f99f07d --- /dev/null +++ b/3rdParty/cmake-checks-cache/CMakeChecksCache/TestBigEndian.cmake @@ -0,0 +1,35 @@ +# MIT License + +# Copyright (c) 2017-2018 Cristian Adam + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +include_guard(GLOBAL) + +cmake_minimum_required(VERSION 3.11) + +include(DumpCMakeVariables) +include(${CMAKE_ROOT}/Modules/TestBigEndian.cmake) + +#macro(TEST_BIG_ENDIAN VARIABLE) + +macro(test_big_endian variable) + _test_big_endian(${variable}) + file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(HAVE_${variable} \"${${variable}}\" CACHE INTERNAL \"Test Big Endian ${variable}\")\n") +endmacro() diff --git a/3rdParty/cmake-checks-cache/CMakeLists.txt b/3rdParty/cmake-checks-cache/CMakeLists.txt deleted file mode 100644 index 5c01267..0000000 --- a/3rdParty/cmake-checks-cache/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -include (FetchContent) - -if(NOT DEFINED CMAKE_CHECKS_REPO) - set(CMAKE_CHECKS_REPO https://github.com/cristianadam/cmake-checks-cache.git) -endif () - -FetchContent_Declare( - cmake-checks-cache - GIT_REPOSITORY ${CMAKE_CHECKS_REPO} - GIT_TAG master - GIT_SHALLOW TRUE -) - -FetchContent_MakeAvailable(cmake-checks-cache) \ No newline at end of file diff --git a/3rdParty/cmake-checks-cache/LICENSE.md b/3rdParty/cmake-checks-cache/LICENSE.md new file mode 100644 index 0000000..a6da65d --- /dev/null +++ b/3rdParty/cmake-checks-cache/LICENSE.md @@ -0,0 +1,23 @@ +``` +MIT License + +Copyright (c) 2017-2018 Cristian Adam + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/CMakeLists.txt b/CMakeLists.txt index e044b9b..1138282 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if(LINUX) find_package(ECM REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) endif() -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_BINARY_DIR}/_deps/cmake-checks-cache-src/CMakeChecksCache" +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cmake-checks-cache/CMakeChecksCache" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/functions")