X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=cmake%2Fcommon.cmake;h=226064867e3e23cc3563abcc4b5b87c394af33fb;hb=3679ae18afeecb43cc9deab389723e69a64c5daf;hp=771467b0780a567cae2dd975cf28339560c06685;hpb=afede09ad631dcf7297e3189aeb1d2288fb25902;p=clitk.git diff --git a/cmake/common.cmake b/cmake/common.cmake index 771467b..2260648 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -1,7 +1,7 @@ #========================================================= -MACRO (DD in) - MESSAGE(${in}=${${in}}) -ENDMACRO(DD) +macro(DD in) + message(${in}=${${in}}) +endmacro(DD) #========================================================= #========================================================= @@ -11,32 +11,32 @@ if (NOT CMAKE_BUILD_TYPE) endif (NOT CMAKE_BUILD_TYPE) #========================================================= -INCLUDE_DIRECTORIES(${CLITK_SOURCE_DIR}/itk +include_directories(${CLITK_SOURCE_DIR}/itk ${CLITK_SOURCE_DIR}/filters ${CLITK_SOURCE_DIR}/segmentation ${CLITK_SOURCE_DIR}/registration ${CLITK_SOURCE_DIR}/tools ${CLITK_SOURCE_DIR}/common ${PROJECT_BINARY_DIR}) -SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) -LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lib) -INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/tools) #For _ggo.h includes from other directories -INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/segmentation) #For _ggo.h includes from other directories -INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/registration) #For _ggo.h includes from other directories +set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) +set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) +link_directories(${PROJECT_BINARY_DIR}/lib) +include_directories(${PROJECT_BINARY_DIR}/tools) #For _ggo.h includes from other directories +include_directories(${PROJECT_BINARY_DIR}/segmentation) #For _ggo.h includes from other directories +include_directories(${PROJECT_BINARY_DIR}/registration) #For _ggo.h includes from other directories #========================================================= #========================================================= # Building in the source tree is forbidden -IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR}) - MESSAGE(FATAL_ERROR "Building in the source tree is not allowed ! Quit; remove the file 'CMakeCache.txt' and the folder 'CMakeFiles' an +if(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR}) + message(FATAL_ERROR "Building in the source tree is not allowed ! Quit; remove the file 'CMakeCache.txt' and the folder 'CMakeFiles' an d build outside the sources (for example 'mkdir build ; cmake '.") -ENDIF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR}) +endif(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR}) #========================================================= #========================================================= # Remove some MS Visual c++ flags -IF(MSVC) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS) -ENDIF(MSVC) +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS) +endif(MSVC) #=========================================================