2 CMAKE_MINIMUM_REQUIRED(VERSION 1.8)
4 #-----------------------------------------------------------------------------
5 # GDCM version number, usefull for packaging and doxygen doc:
6 SET(GDCM_MAJOR_VERSION 0)
7 SET(GDCM_MINOR_VERSION 7)
8 SET(GDCM_BUILD_VERSION 0)
10 "${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}")
12 #-----------------------------------------------------------------------------
14 SET(GDCM_DATA_DIR "/share/gdcm/" CACHE INTERNAL
15 "Install location for data (relative to prefix).")
16 MARK_AS_ADVANCED(GDCM_DATA_DIR)
18 #-----------------------------------------------------------------------------
19 # Build shared lib by default
20 OPTION(BUILD_SHARED_LIBS "Build GDCM with shared libraries." ON)
22 OPTION(GDCM_DEBUG "Turn verbosity of some statement ON." OFF)
23 MARK_AS_ADVANCED(GDCM_DEBUG)
25 #-----------------------------------------------------------------------------
26 SET (EXECUTABLE_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.")
27 SET (LIBRARY_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.")
28 MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
30 #-----------------------------------------------------------------------------
31 # Build directory on which many applications depend
36 #-----------------------------------------------------------------------------
39 OPTION(BUILD_EXAMPLES "Build GDCM examples." ON)
44 #-----------------------------------------------------------------------------
45 # Adding GDCM_DATA_ROOT
46 FIND_PATH(GDCM_DATA_ROOT gdcm-ACR-LibIDO.acr
47 ${GDCM_SOURCE_DIR}/../gdcmData
49 $ENV{PUB_DICT_PATH}/../../gdcmData
52 # Set the place for the public dictionary, must be set before gdcmConfigure.h
53 SET( GDCM_PUB_DICT_PATH "${CMAKE_INSTALL_PREFIX}${GDCM_DATA_DIR}")
55 #-----------------------------------------------------------------------------
56 # SunOS + old gcc fixes:
57 INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
58 IF(CMAKE_NO_ANSI_STRING_STREAM)
59 SET(GDCM_NO_ANSI_STRING_STREAM 1)
60 ENDIF(CMAKE_NO_ANSI_STRING_STREAM)
61 INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
62 TEST_BIG_ENDIAN(GDCM_WORDS_BIGENDIAN)
64 INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
65 CHECK_INCLUDE_FILE("stdint.h" GDCM_HAVE_STDINT_H)
67 CONFIGURE_FILE(${GDCM_SOURCE_DIR}/gdcmConfigure.h.in
68 ${GDCM_BINARY_DIR}/gdcmConfigure.h @ONLY IMMEDIATE)
70 INSTALL_FILES(/include .h gdcmConfigure.h)
72 #-----------------------------------------------------------------------------
73 # Add the testing directories
74 OPTION(BUILD_TESTING "Build testing." ON)
78 INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake)
79 MARK_AS_ADVANCED(DART_ROOT)
84 #-----------------------------------------------------------------------------
85 OPTION(GDCM_VTK "Build VTK-GDCM Lib." OFF)
91 #INCLUDE(${VTK_USE_FILE})
96 #-----------------------------------------------------------------------------
97 OPTION(GDCM_WRAP_PYTHON "Wrap GDCM classes into the Python language." OFF)
100 # Search Python libs:
101 FIND_PACKAGE(PythonLibs)
102 # If PythonLibs found
105 ENDIF(PYTHON_LIBRARY)
106 ENDIF(GDCM_WRAP_PYTHON)
108 #-----------------------------------------------------------------------------
109 OPTION(GDCM_DOCUMENTATION "Build source documentation using doxygen." OFF)
111 IF(GDCM_DOCUMENTATION)
113 FIND_PACKAGE(Doxygen)
117 ENDIF(GDCM_DOCUMENTATION)