###########################################################################
#
# Library: CTK
#
# Copyright (c) Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###########################################################################
cmake_minimum_required(VERSION 2.8.9)
foreach(p
CMP0054 # CMake 3.1
CMP0020 # CMake 2.8.11
)
if(POLICY ${p})
cmake_policy(SET ${p} NEW)
endif()
endforeach()
#-----------------------------------------------------------------------------
# Superbuild
#
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
set(SUPERBUILD_TOPLEVEL_PROJECT "CTK")
set(EXTERNAL_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/CMakeExternals)
set(EXTERNAL_PROJECT_FILE_PREFIX "")
include(ExternalProject)
include(ctkMacroCheckExternalProjectDependency)
#-----------------------------------------------------------------------------
if(APPLE)
# Note: By setting CMAKE_OSX_* variables before any enable_language() or project() calls,
# we ensure that the bitness will be properly detected.
include(ctkBlockSetCMakeOSXVariables)
mark_as_superbuild(
VARS CMAKE_OSX_ARCHITECTURES:STRING CMAKE_OSX_SYSROOT:PATH CMAKE_OSX_DEPLOYMENT_TARGET:STRING
ALL_PROJECTS
)
endif()
#-----------------------------------------------------------------------------
project(CTK)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Set defaults
#
if(NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH 1)
endif()
#-----------------------------------------------------------------------------
# Library mode: SHARED (default) or STATIC
#
set(CTK_LIBRARY_MODE "SHARED")
option(CTK_BUILD_SHARED_LIBS "Build CTK libraries as shared module." ON)
mark_as_advanced(CTK_BUILD_SHARED_LIBS)
mark_as_superbuild(CTK_BUILD_SHARED_LIBS)
if(NOT CTK_BUILD_SHARED_LIBS)
set(CTK_LIBRARY_MODE "STATIC")
endif()
#-----------------------------------------------------------------------------
# Set a default build type if none was specified
#
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
mark_as_advanced(CMAKE_BUILD_TYPE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()
if(NOT CMAKE_CONFIGURATION_TYPES)
mark_as_superbuild(VARS CMAKE_BUILD_TYPE ALL_PROJECTS)
else()
mark_as_superbuild(VARS CMAKE_CONFIGURATION_TYPES ALL_PROJECTS)
endif()
mark_as_superbuild(
VARS
CMAKE_PREFIX_PATH:STRING
CMAKE_DEBUG_POSTFIX:STRING
ALL_PROJECTS
)
#-----------------------------------------------------------------------------
# Superbuild Option - Enabled by default
#
option(CTK_SUPERBUILD "Build ${PROJECT_NAME} and the projects it depends on." ON)
mark_as_advanced(CTK_SUPERBUILD)
#-----------------------------------------------------------------------------
# Output directories.
#
foreach(type LIBRARY RUNTIME ARCHIVE)
# Make sure the directory exists
if(DEFINED CTK_CMAKE_${type}_OUTPUT_DIRECTORY
AND NOT EXISTS ${CTK_CMAKE_${type}_OUTPUT_DIRECTORY})
message(FATAL_ERROR "CTK_CMAKE_${type}_OUTPUT_DIRECTORY is set to a non-existing directory [${CTK_CMAKE_${type}_OUTPUT_DIRECTORY}]")
endif()
if(CTK_SUPERBUILD)
set(output_dir ${CTK_BINARY_DIR}/bin)
if(NOT DEFINED CTK_CMAKE_${type}_OUTPUT_DIRECTORY)
set(CTK_CMAKE_${type}_OUTPUT_DIRECTORY ${CTK_BINARY_DIR}/CTK-build/bin)
endif()
mark_as_superbuild(CTK_CMAKE_${type}_OUTPUT_DIRECTORY:PATH)
else()
if(NOT DEFINED CTK_CMAKE_${type}_OUTPUT_DIRECTORY)
set(output_dir ${CTK_BINARY_DIR}/bin)
else()
set(output_dir ${CTK_CMAKE_${type}_OUTPUT_DIRECTORY})
endif()
endif()
set(CMAKE_${type}_OUTPUT_DIRECTORY ${output_dir} CACHE INTERNAL "Single output directory for building all libraries.")
if(NOT DEFINED CTK_PLUGIN_${type}_OUTPUT_DIRECTORY)
set(CTK_PLUGIN_${type}_OUTPUT_DIRECTORY ${CMAKE_${type}_OUTPUT_DIRECTORY})
endif()
endforeach()
#-----------------------------------------------------------------------------
# CTK version number. An even minor number corresponds to releases.
#
set(CTK_MAJOR_VERSION 0)
set(CTK_MINOR_VERSION 1)
set(CTK_PATCH_VERSION 0)
set(CTK_VERSION
"${CTK_MAJOR_VERSION}.${CTK_MINOR_VERSION}.${CTK_PATCH_VERSION}")
# Append the library version information to the library target
# properties. A parent project may set its own properties and/or may
# block this.
if(NOT CTK_NO_LIBRARY_VERSION)
set(CTK_LIBRARY_PROPERTIES ${CTK_LIBRARY_PROPERTIES}
VERSION "${CTK_VERSION}"
SOVERSION "${CTK_MAJOR_VERSION}.${CTK_MINOR_VERSION}"
)
endif()
#-----------------------------------------------------------------------------
# Install directories, used for install rules.
#
if(NOT CTK_INSTALL_BIN_DIR)
set(CTK_INSTALL_BIN_DIR "bin")
endif()
if(NOT CTK_INSTALL_LIB_DIR)
set(CTK_INSTALL_LIB_DIR "lib/ctk-${CTK_MAJOR_VERSION}.${CTK_MINOR_VERSION}")
endif()
if(NOT CTK_INSTALL_PLUGIN_DIR)
set(CTK_INSTALL_PLUGIN_DIR "lib/ctk-${CTK_MAJOR_VERSION}.${CTK_MINOR_VERSION}/plugins")
endif()
if(NOT CTK_INSTALL_CMAKE_DIR)
set(CTK_INSTALL_CMAKE_DIR "lib/ctk-${CTK_MAJOR_VERSION}.${CTK_MINOR_VERSION}/CMake")
endif()
if(NOT CTK_INSTALL_INCLUDE_DIR)
set(CTK_INSTALL_INCLUDE_DIR "include/ctk-${CTK_MAJOR_VERSION}.${CTK_MINOR_VERSION}")
endif()
if(NOT CTK_INSTALL_PLUGIN_INCLUDE_DIR)
set(CTK_INSTALL_PLUGIN_INCLUDE_DIR ${CTK_INSTALL_INCLUDE_DIR})
endif()
if(NOT CTK_INSTALL_QTPLUGIN_DIR)
set(CTK_INSTALL_QTPLUGIN_DIR ${CTK_INSTALL_LIB_DIR})
endif()
if(NOT CTK_INSTALL_DOC_DIR)
set(CTK_INSTALL_DOC_DIR "doc")
endif()
mark_as_superbuild(
CTK_INSTALL_BIN_DIR:STRING
CTK_INSTALL_LIB_DIR:STRING
CTK_INSTALL_PLUGIN_DIR:STRING
CTK_INSTALL_CMAKE_DIR:STRING
CTK_INSTALL_INCLUDE_DIR:STRING
CTK_INSTALL_PLUGIN_INCLUDE_DIR:STRING
CTK_INSTALL_QTPLUGIN_DIR:STRING
CTK_INSTALL_DOC_DIR:STRING
)
#-----------------------------------------------------------------------------
# Update CMake module path
# Note: FindXXX.cmake script specific to utility should be copied into Utilities/CMake
#
set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/Utilities/CMake"
${CMAKE_MODULE_PATH})
#-----------------------------------------------------------------------------
# Clear CTK_BASE_LIBRARIES and CTK_WRAPPED_LIBRARIES_PYTHONQT
#
set(CTK_BASE_LIBRARIES CACHE INTERNAL "CTK base libraries" FORCE)
set(CTK_WRAPPED_LIBRARIES_PYTHONQT CACHE INTERNAL "CTK libraries wrapped using PythonQt" FORCE)
# Variable use in CTKConfig.cmake.in
set(CTK_LIBRARIES CACHE INTERNAL "CTK libraries" FORCE)
set(${PROJECT_NAME}_PLUGIN_LIBRARIES CACHE INTERNAL "CTK plugins" FORCE)
# Used by CTKGenerateCTKConfig.cmake and also used to reference script from other scripts
set(CTK_CMAKE_DIR ${CTK_SOURCE_DIR}/CMake)
set(CTK_CMAKE_UTILITIES_DIR ${CTK_SOURCE_DIR}/Utilities/CMake)
#-----------------------------------------------------------------------------
# CMake function(s) and macro(s)
#
foreach(file
CMake/ctkListToString.cmake
CMake/ctkMacroParseArguments.cmake
CMake/ctkMacroSetPaths.cmake
CMake/ctkMacroListFilter.cmake
CMake/ctkMacroOptionUtils.cmake
CMake/ctkMacroBuildLib.cmake
CMake/ctkMacroBuildLibWrapper.cmake
CMake/ctkMacroBuildPlugin.cmake
CMak
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
CTK,CTKData,CMake3.91 (2000个子文件)
CheckForPthreads.c 747B
CheckFunctionExists.c 449B
CMakeCCompilerABI.c 435B
CheckVariableExists.c 398B
main.c 261B
CMakeTestGNU.c 184B
VerifyC.c 70B
main.c 49B
foo.c 33B
my_module_.c 29B
MY_MODULE.c 28B
mymodule_.c 28B
MYMODULE.c 27B
ctkDICOMDatabase.cpp 62KB
ctkConsole.cpp 43KB
ctkDICOMBrowser.cpp 40KB
ctkWorkflow.cpp 38KB
ctkWorkflowWidgetTest2.cpp 34KB
ctkQImageView.cpp 34KB
ctkDICOMAppWidget.cpp 34KB
ctkDoubleSpinBox.cpp 33KB
ctkVTKDiscretizableColorTransferWidget.cpp 32KB
ctkDICOMItem.cpp 32KB
vtkLightBoxRendererManager.cpp 32KB
ctkPluginStorageSQL.cpp 32KB
ctkRangeWidget.cpp 31KB
ctkDICOMModel.cpp 29KB
ctkWorkflowWidgetTest1.cpp 29KB
ctkDoubleRangeSlider.cpp 27KB
ctkRangeSlider.cpp 27KB
ctkCommandLineParserTest1.cpp 27KB
ctkDoubleSpinBoxTest.cpp 27KB
ctkCommandLineParser.cpp 26KB
ctkCollapsibleButton.cpp 25KB
ctkPluginFrameworkTestSuite.cpp 25KB
ctkDICOMRetrieve.cpp 25KB
ctkDicomAppHostingTypesHelper.cpp 25KB
ctkBasePopupWidget.cpp 25KB
ctkPlugin_p.cpp 25KB
ctkPluginFrameworkLauncher.cpp 25KB
ctkPathListWidget.cpp 24KB
ctkVTKScalarsToColorsWidget.cpp 23KB
ctkXnatSession.cpp 23KB
ctkSliderWidget.cpp 23KB
ctkCoordinatesWidget.cpp 22KB
ctkModelTester.cpp 22KB
ctkPathListButtonsWidget.cpp 22KB
ctkCheckableModelHelper.cpp 21KB
ctkPathLineEdit.cpp 21KB
ctkAbstractPythonManager.cpp 21KB
ctkSettingsPanelTest.cpp 21KB
ctkEventDispatcherLocalTest.cpp 21KB
ctkVTKVolumePropertyWidget.cpp 21KB
ctkMessageBoxDontShowAgainTest.cpp 21KB
ctkPythonConsole.cpp 21KB
ctkVTKMagnifyView.cpp 21KB
ctkDependencyGraph.cpp 20KB
ctkSettingsPanelTest1.cpp 20KB
ctkVTKScalarsToColorsView.cpp 20KB
ctkMTDataParser.cpp 20KB
ctkDoubleSlider.cpp 19KB
ctkErrorLogModel.cpp 19KB
ctkWorkflowTest1.cpp 19KB
ctkLinearValueProxyTest.cpp 18KB
ctkCmdLineModuleQtXslTransformTest.cpp 18KB
ctkMenuComboBox.cpp 18KB
vtkDiscretizableColorTransferChart.cpp 18KB
ctkVTKDataSetModel.cpp 17KB
ctkDICOMQuery.cpp 17KB
ctkServiceListenerTestSuite.cpp 17KB
ctkLocationManager.cpp 17KB
ctkVTKRenderView.cpp 17KB
ctkVTKObjectEventsObserver.cpp 17KB
ctkCmdLineModuleExplorerMainWindow.cpp 17KB
ctkPopupWidget.cpp 17KB
ctkAbstractPythonManagerTest.cpp 17KB
ctkEventTranslatorPlayerWidget.cpp 17KB
ctkVTKMagnifyViewTest2.cpp 16KB
ctkVTKAbstractView.cpp 16KB
ctkLDAPExpr.cpp 16KB
ctkTransferFunctionRepresentation.cpp 16KB
ctkAddRemoveComboBox.cpp 16KB
ctkCmdLineModuleFutureTest.cpp 16KB
ctkFlowLayout.cpp 15KB
ctkMatrixWidget.cpp 15KB
ctkCheckableHeaderView.cpp 15KB
ctkTreeComboBox.cpp 15KB
ctkCmdLineModuleDirectoryWatcher.cpp 15KB
ctkSettingsDialog.cpp 15KB
ctkDICOMQueryRetrieveWidget.cpp 15KB
ctkActionsWidget.cpp 14KB
ctkVTKThresholdWidget.cpp 14KB
ctkVTKPropertyWidget.cpp 14KB
ctkVTKConnection.cpp 14KB
ctkVTKThumbnailView.cpp 14KB
ctkLayoutManager.cpp 14KB
ctkWorkflowButtonBoxWidget.cpp 14KB
ctkRangeWidgetValueProxyTest.cpp 14KB
ctkDependencyGraphTest2.cpp 14KB
ctkErrorLogModelTest1.cpp 14KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
坚强的小蚂蚁
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功