Commit 8d61ac62 authored by Ben Boeckel's avatar Ben Boeckel

cmake: remove unused CMake modules

parent 57da0ae3
#.rst:
# FindEGL
# -------
#
# Find the EGL library.
#
# Imported Targets
# ^^^^^^^^^^^^^^^^
#
# This module defines the following :prop_tgt:`IMPORTED` targets:
#
# ``EGL::EGL``
# The EGL library, if found.
#
# ``EGL::OpenGL``
# The OpenGL library, if found.
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This module will set the following variables in your project:
#
# ``EGL_FOUND``
# System has the EGL library.
# ``EGL_INCLUDE_DIR``
# The EGL include directory.
# ``EGL_LIBRARY``
# The libEGL library.
# ``EGL_LIBRARIES``
# All EGL related libraries, including ``EGL_LIBRARY``.
#
# Hints
# ^^^^^
#
# Set `EGL_ROOT_DIR` to the root directory of an EGL installation.
find_path(EGL_INCLUDE_DIR
NAMES
EGL/egl.h
PATHS
${EGL_ROOT_DIR}/include
/usr/local/include
/usr/include)
find_library(EGL_LIBRARY
NAMES
EGL
PATHS
${EGL_ROOT_DIR}/lib
/usr/local/lib
/usr/lib)
find_library(EGL_opengl_LIBRARY
NAMES
OpenGL
PATHS
${EGL_ROOT_DIR}/lib
/usr/local/lib
/usr/lib)
set(EGL_LIBRARIES ${EGL_LIBRARY} ${EGL_opengl_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
EGL DEFAULT_MSG
EGL_LIBRARY EGL_opengl_LIBRARY EGL_INCLUDE_DIR)
mark_as_advanced(EGL_ROOT_DIR EGL_INCLUDE_DIR EGL_LIBRARY EGL_opengl_LIBRARY)
if(EGL_FOUND)
if(NOT TARGET EGL::OpenGL)
add_library(EGL::OpenGL UNKNOWN IMPORTED)
set_target_properties(EGL::OpenGL PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${EGL_INCLUDE_DIR}")
set_target_properties(EGL::OpenGL PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${EGL_opengl_LIBRARY}")
endif()
if(NOT TARGET EGL::EGL)
add_library(EGL::EGL UNKNOWN IMPORTED)
set_target_properties(EGL::EGL PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${EGL_INCLUDE_DIR}")
set_target_properties(EGL::EGL PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
INTERFACE_LINK_LIBRARIES "EGL::OpenGL"
IMPORTED_LOCATION "${EGL_LIBRARY}")
endif()
endif()
# include the latest version of FindPackageHandleStandardArgs.
if(CMAKE_VERSION VERSION_LESS 3.6.0)
include(${CMAKE_CURRENT_LIST_DIR}/NewCMake/FindPackageHandleStandardArgs.cmake)
else()
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
endif()
# - Find python libraries
# This module finds if Python is installed and determines where the
# include files and libraries are. It also determines what the name of
# the library is. This code sets the following variables:
#
# PYTHONLIBS_FOUND - have the Python libs been found
# PYTHON_LIBRARIES - path to the python library
# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
# PYTHON_INCLUDE_DIRS - path to where Python.h is found
# PYTHON_DEBUG_LIBRARIES - path to the debug library
# PYTHON_VERSION - python version string e.g. 2.7.1
# PYTHON_MAJOR_VERSION - python major version number
# PYTHON_MINOR_VERSION - python minor version number
# PYTHON_MICRO_VERSION - python release version number
#
# This code uses the following variables:
# Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
#=============================================================================
# Copyright 2001-2009 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.)
# Use the executable's path as a hint
set(_Python_LIBRARY_PATH_HINT)
if(PYTHON_EXECUTABLE)
if(WIN32)
get_filename_component(_Python_PREFIX ${PYTHON_EXECUTABLE} PATH)
if(_Python_PREFIX)
set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/libs)
endif()
unset(_Python_PREFIX)
else()
get_filename_component(_Python_PREFIX ${PYTHON_EXECUTABLE} PATH)
get_filename_component(_Python_PREFIX ${_Python_PREFIX} PATH)
if(_Python_PREFIX)
set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/lib)
endif()
unset(_Python_PREFIX)
endif()
endif()
include(CMakeFindFrameworks)
# Search for the python framework on Apple.
CMAKE_FIND_FRAMEWORKS(Python)
# Save CMAKE_FIND_FRAMEWORK
if(DEFINED CMAKE_FIND_FRAMEWORK)
set(_PythonLibs_CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK})
else()
unset(_PythonLibs_CMAKE_FIND_FRAMEWORK)
endif()
# To avoid picking up the system Python.h pre-maturely.
set(CMAKE_FIND_FRAMEWORK LAST)
set(_PythonInterp_VERSION)
if(PYTHONINTERP_FOUND)
set(_PythonInterp_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
endif()
# Set up the versions we know about, in the order we will search. Always add
# the user supplied additional versions to the front.
set(_Python_VERSIONS
${Python_ADDITIONAL_VERSIONS} ${_PythonInterp_VERSION}
2.7 2.6 2.5 3.6 3.5 3.4 3.3 3.2)
foreach(_CURRENT_VERSION ${_Python_VERSIONS})
string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
if(WIN32)
find_library(PYTHON_DEBUG_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
HINTS ${_Python_LIBRARY_PATH_HINT}
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
)
endif()
set(PYTHON_FRAMEWORK_LIBRARIES)
if(Python_FRAMEWORKS AND NOT PYTHON_LIBRARY)
foreach(dir ${Python_FRAMEWORKS})
list(APPEND PYTHON_FRAMEWORK_LIBRARIES
${dir}/Versions/${_CURRENT_VERSION}/lib)
endforeach()
endif()
find_library(PYTHON_LIBRARY
NAMES
python${_CURRENT_VERSION_NO_DOTS}
python${_CURRENT_VERSION}mu
python${_CURRENT_VERSION}m
python${_CURRENT_VERSION}u
python${_CURRENT_VERSION}
HINTS
${_Python_LIBRARY_PATH_HINT}
PATHS
${PYTHON_FRAMEWORK_LIBRARIES}
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
# Avoid finding the .dll in the PATH. We want the .lib.
NO_SYSTEM_ENVIRONMENT_PATH
)
# Look for the static library in the Python config directory
find_library(PYTHON_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
# Avoid finding the .dll in the PATH. We want the .lib.
NO_SYSTEM_ENVIRONMENT_PATH
# This is where the static library is usually located
PATH_SUFFIXES python${_CURRENT_VERSION}/config
)
# Don't search for include dir until library location is known
if(PYTHON_LIBRARY)
# Use the library's install prefix as a hint
set(_Python_INCLUDE_PATH_HINT)
get_filename_component(_Python_PREFIX ${PYTHON_LIBRARY} PATH)
get_filename_component(_Python_PREFIX ${_Python_PREFIX} PATH)
if(_Python_PREFIX)
set(_Python_INCLUDE_PATH_HINT ${_Python_PREFIX}/include)
endif()
unset(_Python_PREFIX)
# Add framework directories to the search paths
set(PYTHON_FRAMEWORK_INCLUDES)
if(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
foreach(dir ${Python_FRAMEWORKS})
list(APPEND PYTHON_FRAMEWORK_INCLUDES
${dir}/Versions/${_CURRENT_VERSION}/include)
endforeach()
endif()
find_path(PYTHON_INCLUDE_DIR
NAMES Python.h
HINTS
${_Python_INCLUDE_PATH_HINT}
PATHS
${PYTHON_FRAMEWORK_INCLUDES}
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
PATH_SUFFIXES
python${_CURRENT_VERSION}mu
python${_CURRENT_VERSION}m
python${_CURRENT_VERSION}u
python${_CURRENT_VERSION}
)
endif()
# For backward compatibility, set PYTHON_INCLUDE_PATH.
set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
break()
endif()
endforeach()
unset(_Python_INCLUDE_PATH_HINT)
unset(_Python_LIBRARY_PATH_HINT)
mark_as_advanced(
PYTHON_DEBUG_LIBRARY
PYTHON_LIBRARY
PYTHON_INCLUDE_DIR
)
# look in PYTHON_INCLUDE_DIR for patchlevel.h, which contains the
# version number macros in all versions of python from 1.5 through
# at least version 3.2, and set these vars: PYTHON_VERSION,
# PYTHON_MAJOR_VERSION, PYTHON_MINOR_VERSION, PYTHON_MICRO_VERSION.
IF(PYTHON_INCLUDE_DIR)
SET(_VERSION_REGEX
"^#define[ \t]+PY([A-Z_]*_VERSION)[ \t]+[\"]*([[0-9A-Za-z\\.]+)[\"]*[ \t]*$")
FILE(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" _VERSION_STRINGS
LIMIT_COUNT 10 REGEX ${_VERSION_REGEX})
FOREACH(_VERSION_STRING ${_VERSION_STRINGS})
STRING(REGEX REPLACE ${_VERSION_REGEX} "PYTHON\\1"
_VERSION_VARIABLE "${_VERSION_STRING}")
STRING(REGEX REPLACE ${_VERSION_REGEX} "\\2"
_VERSION_NUMBER "${_VERSION_STRING}")
SET(${_VERSION_VARIABLE} ${_VERSION_NUMBER})
ENDFOREACH()
ENDIF()
# We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the
# cache entries because they are meant to specify the location of a single
# library. We now set the variables listed by the documentation for this
# module.
SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
# Restore CMAKE_FIND_FRAMEWORK
if(DEFINED _PythonLibs_CMAKE_FIND_FRAMEWORK)
set(CMAKE_FIND_FRAMEWORK ${_PythonLibs_CMAKE_FIND_FRAMEWORK})
unset(_PythonLibs_CMAKE_FIND_FRAMEWORK)
else()
unset(CMAKE_FIND_FRAMEWORK)
endif()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
This diff is collapsed.
# This file was generated by CMake because it detected TRY_RUN() commands
# in crosscompiling mode. It will be overwritten by the next CMake run.
# Copy it to a safe location, set the variables to appropriate values
# and use it then to preset the CMake cache (using -C).
# CMAKE_REQUIRE_LARGE_FILE_SUPPORT
# indicates whether the executable would have been able to run on its
# target platform. If so, set CMAKE_REQUIRE_LARGE_FILE_SUPPORT to
# the exit code (in many cases 0 for success), otherwise enter "FAILED_TO_RUN".
# CMAKE_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT
# contains the text the executable would have printed on stdout and stderr.
# If the executable would not have been able to run, set CMAKE_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT empty.
# Otherwise check if the output is evaluated by the calling CMake code. If so,
# check what the source file would have printed when called with the given arguments.
# The HAVE_CMAKE_REQUIRE_LARGE_FILE_SUPPORT variable holds the build result for this TRY_RUN().
#
# Source file : /gpfs/gpfs0/home/gevecb/alex/paraview/build/VTK-head-bgl-new/CMakeFiles/CMakeTmp/src.cxx
# Executable : /gpfs/gpfs0/home/gevecb/alex/paraview/build/VTK-head-bgl-new/cmTryCompileExec-CMAKE_REQUIRE_LARGE_FILE_SUPPORT
# Run arguments :
# Called from: [1] /gpfs/gpfs0/home/gevecb/alex/paraview/src/ParaView3/VTK/CMakeLists.txt
SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT
"1"
CACHE STRING "Result from TRY_RUN" FORCE)
SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT
"NOTFOUND"
CACHE STRING "Output from TRY_RUN" FORCE)
# SHARED_LIBRARY_PATH_TYPE
# indicates whether the executable would have been able to run on its
# target platform. If so, set SHARED_LIBRARY_PATH_TYPE to
# the exit code (in many cases 0 for success), otherwise enter "FAILED_TO_RUN".
# SHARED_LIBRARY_PATH_TYPE__TRYRUN_OUTPUT
# contains the text the executable would have printed on stdout and stderr.
# If the executable would not have been able to run, set SHARED_LIBRARY_PATH_TYPE__TRYRUN_OUTPUT empty.
# Otherwise check if the output is evaluated by the calling CMake code. If so,
# check what the source file would have printed when called with the given arguments.
# The SHARED_LIBRARY_PATH_INFO_COMPILED variable holds the build result for this TRY_RUN().
#
# Source file : /gpfs/gpfs0/home/gevecb/alex/paraview/src/ParaView3/VTK/CMake/SharedLibraryPathInfo.cxx
# Executable : /gpfs/gpfs0/home/gevecb/alex/paraview/build/VTK-head-bgl-new/cmTryCompileExec-SHARED_LIBRARY_PATH_TYPE
# Run arguments : LDPATH
# Called from: [2] /gpfs/gpfs0/home/gevecb/alex/paraview/src/ParaView3/VTK/CMake/SharedLibraryPathVarName.cmake
# [1] /gpfs/gpfs0/home/gevecb/alex/paraview/src/ParaView3/VTK/CMakeLists.txt
SET( SHARED_LIBRARY_PATH_TYPE
"0"
CACHE STRING "Result from TRY_RUN" FORCE)
SET( SHARED_LIBRARY_PATH_TYPE__TRYRUN_OUTPUT
""
CACHE STRING "Output from TRY_RUN" FORCE)
# KWSYS_LFS_WORKS
# indicates whether the executable would have been able to run on its
# target platform. If so, set KWSYS_LFS_WORKS to
# the exit code (in many cases 0 for success), otherwise enter "FAILED_TO_RUN".
# KWSYS_LFS_WORKS__TRYRUN_OUTPUT
# contains the text the executable would have printed on stdout and stderr.
# If the executable would not have been able to run, set KWSYS_LFS_WORKS__TRYRUN_OUTPUT empty.
# Otherwise check if the output is evaluated by the calling CMake code. If so,
# check what the source file would have printed when called with the given arguments.
# The KWSYS_LFS_WORKS_COMPILED variable holds the build result for this TRY_RUN().
#
# Source file : /gpfs/gpfs0/home/gevecb/alex/paraview/src/ParaView3/VTK/Utilities/kwsys/kwsysPlatformTestsCXX.cxx
# Executable : /gpfs/gpfs0/home/gevecb/alex/paraview/build/VTK-head-bgl-new/cmTryCompileExec-KWSYS_LFS_WORKS
# Run arguments :
# Called from: [1] /gpfs/gpfs0/home/gevecb/alex/paraview/src/ParaView3/VTK/Utilities/kwsys/CMakeLists.txt
SET( KWSYS_LFS_WORKS
"0"
CACHE STRING "Result from TRY_RUN" FORCE)
SET( KWSYS_LFS_WORKS__TRYRUN_OUTPUT
"NOTFOUND"
CACHE STRING "Output from TRY_RUN" FORCE)
# This file sets up include directories, link directories, and
# compiler settings for a project to use VTK. It should not be
# included directly, but rather through the VTK_USE_FILE setting
# obtained from VTKConfig.cmake.
if(VTK_USE_FILE_INCLUDED)
return()
endif()
set(VTK_USE_FILE_INCLUDED 1)
# Update CMAKE_MODULE_PATH so includes work.
list(APPEND CMAKE_MODULE_PATH ${VTK_CMAKE_DIR})
# Add compiler flags needed to use VTK.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VTK_REQUIRED_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VTK_REQUIRED_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${VTK_REQUIRED_EXE_LINKER_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${VTK_REQUIRED_SHARED_LINKER_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${VTK_REQUIRED_MODULE_LINKER_FLAGS}")
# Add preprocessor definitions needed to use VTK.
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${VTK_DEFINITIONS})
# Add include directories needed to use VTK.
include_directories(${VTK_INCLUDE_DIRS})
# Add link directories needed to use VTK.
link_directories(${VTK_LIBRARY_DIRS})
#-----------------------------------------------------------------------------
#
# VTKConfig.cmake - VTK CMake configuration file for external projects.
#
# This file is configured by VTK and used by the UseVTK.cmake module
# to load VTK's settings for an external project.
@VTK_CONFIG_CODE@
set (__vtk_install_tree @VTK_CONFIG_INSTALLED@)
if (CMAKE_VERSION VERSION_LESS "3.3")
message(FATAL_ERROR "VTK now requires CMake 3.3 or newer")
endif()
#-----------------------------------------------------------------------------
# Minimum compiler version check: GCC >= 4.6
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
message(FATAL_ERROR "GCC 4.6 or later is required.")
endif ()
#-----------------------------------------------------------------------------
# Minimum compiler version check: LLVM Clang >= 3.0
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.0)
message(FATAL_ERROR "LLVM Clang 3.0 or later is required.")
endif ()
#-----------------------------------------------------------------------------
# Minimum compiler version check: Apple Clang >= 3.0 (Xcode 4.2)
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.0)
message(FATAL_ERROR "Apple Clang 3.0 or later is required.")
endif ()
#-----------------------------------------------------------------------------
# Minimum compiler version check: Microsoft C/C++ >= 19.0 (aka VS 2015)
if ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0)
message(FATAL_ERROR "Microsoft Visual Studio 2015 or later is required.")
endif ()
#-----------------------------------------------------------------------------
# Minimum compiler version check: Intel C++ (ICC) >= 14
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
message(FATAL_ERROR "Intel C++ (ICC) 14.0 or later is required.")
endif ()
# The C and C++ flags added by VTK to the cmake-configured flags.
set(VTK_REQUIRED_C_FLAGS "@VTK_REQUIRED_C_FLAGS@")
set(VTK_REQUIRED_CXX_FLAGS "@VTK_REQUIRED_CXX_FLAGS@")
set(VTK_REQUIRED_EXE_LINKER_FLAGS "@VTK_REQUIRED_EXE_LINKER_FLAGS@")
set(VTK_REQUIRED_SHARED_LINKER_FLAGS "@VTK_REQUIRED_SHARED_LINKER_FLAGS@")
set(VTK_REQUIRED_MODULE_LINKER_FLAGS "@VTK_REQUIRED_MODULE_LINKER_FLAGS@")
# The VTK version number
set(VTK_MAJOR_VERSION "@VTK_MAJOR_VERSION@")
set(VTK_MINOR_VERSION "@VTK_MINOR_VERSION@")
set(VTK_BUILD_VERSION "@VTK_BUILD_VERSION@")
# The location of the UseVTK.cmake file.
set(VTK_CMAKE_DIR "@VTK_CONFIG_CMAKE_DIR@")
set(VTK_USE_FILE "${VTK_CMAKE_DIR}/UseVTK.cmake")
# The rendering backend VTK was configured to use.
set(VTK_RENDERING_BACKEND "@VTK_RENDERING_BACKEND@")
if (__vtk_install_tree)
if (WIN32)
set (VTK_RUNTIME_DIRS "@CMAKE_INSTALL_PREFIX@/@VTK_INSTALL_RUNTIME_DIR@")
else ()
set (VTK_RUNTIME_DIRS "@CMAKE_INSTALL_PREFIX@/@VTK_INSTALL_LIBRARY_DIR@")
endif ()
else()
if (WIN32)
set (VTK_RUNTIME_DIRS "@CMAKE_BINARY_DIR@/bin")
else ()
set (VTK_RUNTIME_DIRS "@CMAKE_BINARY_DIR@/lib")
endif ()
endif()
# Setup VTK-m if it was enabled
set(VTK_HAS_VTKM @VTK_HAS_VTKM@)
if(VTK_HAS_VTKM AND NOT TARGET vtkm_cont)
set(VTKM_CMAKE_DIR "${VTK_CMAKE_DIR}")
if(NOT __vtk_install_tree)
set(VTKM_CMAKE_DIR "@VTKm_BINARY_DIR@/@VTK_INSTALL_PACKAGE_DIR@/vtkm")
endif()
get_filename_component(VTKM_CMAKE_DIR "${VTKM_CMAKE_DIR}" PATH)
find_package(VTKm
PATHS "${CMAKE_CURRENT_LIST_DIR}"
"${VTKM_CMAKE_DIR}"
"${VTK_RUNTIME_DIRS}"
NO_DEFAULT_PATH
)
endif()
#-----------------------------------------------------------------------------
# Load requested modules.
# List of available VTK modules.
set(VTK_MODULES_ENABLED "@VTK_CONFIG_MODULES_ENABLED@")
# Import VTK targets.
set(VTK_CONFIG_TARGETS_FILE "@VTK_CONFIG_TARGETS_FILE@")
if(NOT TARGET @VTK_COMMON_TARGET@)
include("${VTK_CONFIG_TARGETS_FILE}")
endif()
# Load module interface macros.
include("@VTK_CONFIG_MODULE_API_FILE@")
# Compute set of requested modules.
if(VTK_FIND_COMPONENTS)
# Specific modules requested by find_package(VTK).
set(VTK_MODULES_REQUESTED "${VTK_FIND_COMPONENTS}")
else()
# No specific modules requested. Use all of them.
set(VTK_MODULES_REQUESTED "${VTK_MODULES_ENABLED}")
endif()
# Load requested modules and their dependencies into variables:
# VTK_DEFINITIONS = Preprocessor definitions
# VTK_LIBRARIES = Libraries to link
# VTK_INCLUDE_DIRS = Header file search path
# VTK_LIBRARY_DIRS = Library search path (for outside dependencies)
vtk_module_config(VTK ${VTK_MODULES_REQUESTED})
#-----------------------------------------------------------------------------
# VTK global configuration options.
set(VTK_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
set(VTK_LEGACY_REMOVE "@VTK_LEGACY_REMOVE@")
set(VTK_LEGACY_SILENT "@VTK_LEGACY_SILENT@")
set(VTK_WRAP_PYTHON "@VTK_WRAP_PYTHON@")
set(VTK_WRAP_JAVA "@VTK_WRAP_JAVA@")
set(VTK_QT_VERSION "@VTK_QT_VERSION@")
set(VTK_ENABLE_KITS "@VTK_ENABLE_KITS@")
# Do not add options or information here that is specific to a
# particular module. Instead set <module>_EXPORT_OPTIONS and/or
# <module>_EXPORT_CODE_BUILD and <module>_EXPORT_CODE_INSTALL
# at the top of the module CMakeLists.txt file.
This diff is collapsed.
This diff is collapsed.
# This file is based off of the Platform/Darwin.cmake and Platform/UnixPaths.cmake
# files which are included with CMake 2.8.4
# It has been altered for iOS development
# Options:
#
# IOS_PLATFORM = OS (default) or SIMULATOR
# This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platform folders
# OS - the default, used to build for iPhone and iPad physical devices, which have an arm arch.
# SIMULATOR - used to build for the Simulator platforms, which have an x86 arch.
#
# CMAKE_IOS_DEVELOPER_ROOT = automatic(default) or /path/to/platform/Developer folder
# By default this location is automatcially chosen based on the IOS_PLATFORM value above.
# If set manually, it will override the default location and force the user of a particular Developer Platform
#
# CMAKE_IOS_SDK_ROOT = automatic(default) or /path/to/platform/Developer/SDKs/SDK folder
# By default this location is automatcially chosen based on the CMAKE_IOS_DEVELOPER_ROOT value.
# In this case it will always be the most up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path.
# If set manually, this will force the use of a specific SDK version
# Macros:
#
# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE)
# A convenience macro for setting xcode specific properties on targets
# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1")
#
# find_host_package (PROGRAM ARGS)
# A macro used to find executable programs on the host system, not within the iOS environment.
# Thanks to the android-cmake project for providing the command
# Standard settings
set (CMAKE_SYSTEM_NAME Darwin)
set (CMAKE_SYSTEM_VERSION 1)
set (UNIX True)
set (APPLE True)
set (IOS True)
set (APPLE_IOS True)
# make sure all executables are bundles otherwise try compiles will fail
set (CMAKE_MACOSX_BUNDLE True)
set (CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer" CACHE STRING "how to sign executables")
# Required as of cmake 2.8.10
set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE)
# Determine the cmake host system version so we know where to find the iOS SDKs
find_program (CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
if (CMAKE_UNAME)
exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
endif ()
# Force the compilers to gcc for iOS
include (CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER (/usr/bin/clang Apple)
CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Apple)
set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
# Skip the platform compiler checks for cross compiling
#set (CMAKE_CXX_COMPILER_WORKS TRUE)
#set (CMAKE_C_COMPILER_WORKS TRUE)
# All iOS/Darwin specific settings - some may be redundant
set (CMAKE_SHARED_LIBRARY_PREFIX "lib")
set (CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
set (CMAKE_SHARED_MODULE_PREFIX "lib")
set (CMAKE_SHARED_MODULE_SUFFIX ".so")
set (CMAKE_MODULE_EXISTS 1)
set (CMAKE_DL_LIBS "")
set (CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
set (CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
set (CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
set (CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
# Hidden visibilty is required for cxx on iOS
set (CMAKE_C_FLAGS_INIT "")
# use of CMAKE_OSX_SYSROOT is fine here even though it is set later on because this string
# is evaluated after at the end of the generate step where is has been set
set (CMAKE_CXX_FLAGS_INIT "-fvisibility=hidden -fvisibility-inlines-hidden -isysroot ${CMAKE_OSX_SYSROOT}")
set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
set (CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
set (CMAKE_PLATFORM_HAS_INSTALLNAME 1)
set (CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
set (CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names")
set (CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
set (CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
set (CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
# hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree
# (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache
# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun)
# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex
if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
endif ()
# Setup iOS platform unless specified manually with IOS_PLATFORM
if (NOT DEFINED IOS_PLATFORM)
set (IOS_PLATFORM "OS")
endif ()
set (IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform")
# Check the platform selection and setup for developer root
if (${IOS_PLATFORM} STREQUAL "OS")
set (IOS_PLATFORM_LOCATION "iPhoneOS.platform")
# This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")
# This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
else ()
message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR")
endif ()
# Setup iOS developer location unless specified manually with CMAKE_IOS_DEVELOPER_ROOT
# Note Xcode 4.3 changed the installation location, choose the most recent one available
set (XCODE_POST_43_ROOT "/Applications/Xcode.app/Contents/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
set (XCODE_PRE_43_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
if (EXISTS ${XCODE_POST_43_ROOT})
set (CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT})
elseif(EXISTS ${XCODE_PRE_43_ROOT})
set (CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT})
endif ()
endif ()
set (CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} CACHE PATH "Location of iOS Platform")
# Find and use the most recent iOS sdk unless specified manually with CMAKE_IOS_SDK_ROOT
if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
file (GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")
if (_CMAKE_IOS_SDKS)
list (SORT _CMAKE_IOS_SDKS)
list (REVERSE _CMAKE_IOS_SDKS)
list (GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
else ()
message (FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
endif ()
message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
endif ()
set (CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK")
# Set the sysroot default to the most recent SDK
set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support")
# set the architecture for iOS
# NOTE: Currently both ARCHS_STANDARD_32_BIT and ARCHS_UNIVERSAL_IPHONE_OS set armv7 only, so set both manually
if (${IOS_PLATFORM} STREQUAL "OS")
set (IOS_ARCH armv6 armv7)
else ()
set (IOS_ARCH i386)
endif ()
set (CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string "Build architecture for iOS")
# Set the find root to the iOS developer roots and to user defined paths
set (CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root")
# default to searching for frameworks first
set (CMAKE_FIND_FRAMEWORK FIRST)