CMakeLists.txt 1.55 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#=========================================================================
#
#  Copyright Leiden University Medical Center, Erasmus University Medical 
#  Center and contributors
#
#  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 3.0.2 )
21
project(SuperElastixApplications)
22
23
24

if( NOT CMAKE_PROJECT_NAME STREQUAL "SuperElastix" )
  # Examples are build as an external project, need to import dependencies
25
26
27

  set(CMAKE_CXX_STANDARD 11)
  
28
29
30
31
32
33
34
35
36
37
38
  # -----------------------------------------------------------------
  # Compiler-dependent settings

  # GCC
  if( ${CMAKE_CXX_COMPILER_ID} STREQUAL GNU )
    add_definitions(
      -DVCL_CAN_STATIC_CONST_INIT_FLOAT=0
      -DVCL_CAN_STATIC_CONST_INIT_INT=0
    )
  endif()

39
40
41
42
43
44
45
46
47
48
49
  find_package( SuperElastix )
  include( ${SUPERELASTIX_USE_FILE} )

  find_package( ITK )
  include( ${ITK_USE_FILE} )

  message( STATUS "ELASTIX_USE_FILE: ${ELASTIX_USE_FILE}")
  include( ${ELASTIX_USE_FILE} )
endif()

add_subdirectory( CommandlineProgram )