X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=CMakeLists.txt;h=cdccd4aa9e73dc06b94c60710267cff9c083351f;hb=b71e9a746583fe68d453a42e38408fc4b8893e74;hp=ba9f86f449b3d9ea1f8ac1be5112bc68603611fa;hpb=f540ed5835e7b89478e6048a577d494c0e156f2a;p=gdcm.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ba9f86f4..cdccd4aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.0) # GDCM version number, usefull for packaging and doxygen doc: SET(GDCM_MAJOR_VERSION 1) SET(GDCM_MINOR_VERSION 3) -SET(GDCM_BUILD_VERSION 1) +SET(GDCM_BUILD_VERSION 2) SET(GDCM_VERSION "${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}") @@ -17,6 +17,13 @@ OPTION(GDCM_LEGACY_REMOVE "Remove all legacy code completely." OFF) OPTION(GDCM_LEGACY_SILENT "Silence all legacy code messages." OFF) MARK_AS_ADVANCED(GDCM_LEGACY_REMOVE GDCM_LEGACY_SILENT) +# VS 2005 declared that some C functions were deprecated... +IF(CMAKE_COMPILER_2005) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) + ADD_DEFINITIONS(-D_SCL_SECURE_NO_DEPRECATE) +ENDIF(CMAKE_COMPILER_2005) + + #----------------------------------------------------------------------------- # Build shared lib by default OPTION(BUILD_SHARED_LIBS "Build GDCM with shared libraries." ON) @@ -29,6 +36,9 @@ SET(GDCM_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES}) OPTION(GDCM_DEBUG "Turn verbosity of some statement ON." OFF) MARK_AS_ADVANCED(GDCM_DEBUG) +# -------------------------------------------------------------------------- +SET (GDCM_NAME_SPACE gdcm CACHE STRING "name space") + # -------------------------------------------------------------------------- # Install directories STRING(TOLOWER ${PROJECT_NAME} project_name) @@ -82,7 +92,7 @@ ENDIF(GDCM_BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- SET (EXECUTABLE_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.") -SET (LIBRARY_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.") +SET (LIBRARY_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.") MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) @@ -152,6 +162,10 @@ FIND_PATH(GDCM_DATA_ROOT gdcm-ACR-LibIDO.acr $ENV{GDCM_DATA} $ENV{PUB_DICT_PATH}/../../gdcmData ) +# Adding GDCM_DATA_ROOT +FIND_PATH(GDCM_DATA_EXTRA_ROOT gdcmData.tar.gz + ${GDCM_SOURCE_DIR}/../gdcmDataExtra +) # Set the place for the public dictionary, must be set before gdcmConfigure.h FIND_PATH(GDCM_PUB_DICT_PATH dicomV3.dic @@ -238,12 +252,15 @@ ENDIF( ${CMAKE_HAVE_SYS_SOCKET_H} ) #----------------------------------------------------------------------------- # Force Big Endian emulation on little endian: -OPTION(GDCM_FORCE_BIGENDIAN_EMULATION "Force Big Endian Emulation. Do use if you don't know what you are doing." OFF) +OPTION(GDCM_FORCE_BIGENDIAN_EMULATION "Force Big Endian Emulation. Don't use if you don't know what you are doing." OFF) CONFIGURE_FILE(${GDCM_SOURCE_DIR}/gdcmConfigure.h.in - ${GDCM_BINARY_DIR}/gdcmConfigure.h @ONLY IMMEDIATE) + ${GDCM_BINARY_DIR}/gdcmConfigure.h @ONLY IMMEDIATE + ) -INSTALL_FILES(/include/gdcm .h gdcmConfigure.h) +IF(NOT GDCM_INSTALL_NO_DEVELOPMENT) + INSTALL_FILES(${GDCM_INSTALL_INCLUDE_DIR} FILES gdcmConfigure.h) +ENDIF(NOT GDCM_INSTALL_NO_DEVELOPMENT) #----------------------------------------------------------------------------- # Add the testing directories @@ -251,7 +268,7 @@ OPTION(BUILD_TESTING "Build testing." ON) IF(BUILD_TESTING) CONFIGURE_FILE(${GDCM_SOURCE_DIR}/CMake/CTestCustom.ctest.in - ${GDCM_BINARY_DIR}/CMake/CTestCustom.ctest @ONLY) + ${GDCM_BINARY_DIR}/CTestCustom.ctest @ONLY) ENABLE_TESTING() INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake) MARK_AS_ADVANCED(DART_ROOT)