1 #=========================================================
3 MESSAGE(${in}=${${in}})
5 #=========================================================
7 #=========================================================
8 #Set a reasonable build mode default if the user hasn't set any
9 if (NOT CMAKE_BUILD_TYPE)
10 set(CMAKE_BUILD_TYPE Release)
11 endif (NOT CMAKE_BUILD_TYPE)
13 #=========================================================
14 INCLUDE_DIRECTORIES(${CLITK_SOURCE_DIR}/itk
15 ${CLITK_SOURCE_DIR}/filters
16 ${CLITK_SOURCE_DIR}/segmentation
17 ${CLITK_SOURCE_DIR}/registration
18 ${CLITK_SOURCE_DIR}/tools
19 ${CLITK_SOURCE_DIR}/common
20 ${PROJECT_BINARY_DIR})
21 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
22 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
23 LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lib)
24 INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/tools) #For _ggo.h includes from other directories
25 INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/segmentation) #For _ggo.h includes from other directories
26 INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/registration) #For _ggo.h includes from other directories
27 #=========================================================
29 #=========================================================
30 # Building in the source tree is forbidden
31 IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
32 MESSAGE(FATAL_ERROR "Building in the source tree is not allowed ! Quit; remove the file 'CMakeCache.txt' and the folder 'CMakeFiles' an
33 d build outside the sources (for example 'mkdir build ; cmake <CLITK_DIR>'.")
34 ENDIF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
35 #=========================================================
37 #=========================================================
38 # Remove some MS Visual c++ flags
40 ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
42 #=========================================================