Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

CMakeLists.txt 2.66 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
#
# CamiTK CMakeLists
#
# WARNING!
# CamiTK macros (component_extension, application_extension...) use GLOB to collect a 
# list of source files from your source tree, which means that if no CMakeLists.txt file changes 
# when a new source file is added or removed to your project then the generated build system 
# cannot know when to ask CMake to regenerate.
# => DO NOT FORGET to regenerate CMake in case you add/remove a source file to your project

# all CMake project names and variables should be in uppercase
12
project(CAMITK)
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

cmake_minimum_required(VERSION 2.6)

# Find Qt (Qt4 without Qt3 support!)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set (QT_USE_QT3SUPPORT OFF)

# Find VTK
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

# Configure CamiTK
# update module path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CAMITK_SOURCE_DIR}/cmake/modules)
# include CamiTK Internal Build environment
include(CamiTKInternalBuild)
# include CamiTK variables
include(CamiTKVariables)
# include CamiTK generic macros from CMAKE_MODULE_PATH directory
include(CamiTKMacros)
34
35
# include CamiTK test macros
include(CamiTKTestMacros)
36
37
38
39
40
41
# include CamiTK log configuration
include(CamiTKLog)
# include CamiTK auto-documentation generation
include(CamiTKApiDoc)
# include CamiTK package generation
include(CamiTKPackaging)
42
43
# enables to specify which target to launch to MSVC
include(CreateLaunchers)
44

45
46
47
# Create the Xml data for Project.xml description, fyi store in the global variable CAMITK_XML_PROJECT_DESCRIPTION
initXmlSubProject()

48
# add all subprojects
49
add_subdirectory(cmake) # rules for cmake install
50
51
52
53
54
add_subdirectory(applications)
add_subdirectory(actions)
add_subdirectory(components)
add_subdirectory(core)
add_subdirectory(tools)
55

56
57
58
59
60
61
62
# Validate and write down the Project.xml file
# This file contains all the CamiTK project description with subprojects and their CMake target dependencies
# This file is needed for CDash to correctly update the Dashboard accordingly to the project
# Thus, CDash continuous integration dashboard is automatically updated when adding a new extension 
# to CamiTK, using the corresponding macro
validateXmlSubProjects(${CAMITK_BUILD_DIR})

63
64
65
66
67
68
69
70
71
# For Microsoft Visual C++, sets the default application to imp for the "ALL_BUILD" project
# (i.e. launches imp when we you click on "Debug" or "Start Without Debugging" button on Visual)
# In addition, but not the least, sets the environment to the debug dll directory for VTK (and ITK)
#     to solve the dll incompatibility between debug and relase version of QVTK.dll and ITKCommon.dll
if ( MSVC )
	create_default_target_launcher(
		application-imp
		RUNTIME_LIBRARY_DIRS "%VTK_DIR%/bin/$(OutDir)" "%ITK_DIR%/bin/$(OutDir)"
	)		
72
endif( MSVC )