]> Creatis software - gdcm.git/blobdiff - CMakeLists.txt
ENH: Add Example stuff with real main:
[gdcm.git] / CMakeLists.txt
index a3ab0d5c34551ead0c67316de9d4a402a748fcb0..9bf969e28f4cccc05e138e5d07913a4000a179b9 100644 (file)
@@ -5,7 +5,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 1.8)
 # GDCM version number, usefull for packaging and doxygen doc:\r
 SET(GDCM_VERSION_MAJOR 0)\r
 SET(GDCM_VERSION_MINOR 4)\r
-SET(GDCM_VERSION_PATCH 0)\r
+SET(GDCM_VERSION_PATCH 1)\r
 SET(GDCM_VERSION "${GDCM_VERSION_MAJOR}.${GDCM_VERSION_MINOR}")\r
 SET(GDCM_VERSION_FULL "${GDCM_VERSION}.${GDCM_VERSION_PATCH}")\r
 \r
@@ -20,28 +20,13 @@ MARK_AS_ADVANCED(GDCM_DATA_DIR)
 OPTION(BUILD_SHARED_LIBS "Build GDCM with shared libraries." ON)\r
 SET(GDCM_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})\r
 \r
-#-----------------------------------------------------------------------------\r
-# Does not work as of 2004/04/05\r
-#SET(CMAKE_CONFIGURATION_TYPES\r
-#  Debug\r
-#  Release\r
-#)\r
-#SET(CMAKE_BUILD_TYPE_INIT Debug)\r
 \r
 #-----------------------------------------------------------------------------\r
-# Output directories.\r
-#Put all stuff in one single dir for Win32, otherwise dll are a pain:\r
-#IF(WIN32 AND GDCM_BUILD_SHARED_LIBS)\r
-#  SET(OUTPUT_LIB_DIR ${GDCM_SOURCE_DIR}/bin)\r
-#ELSE(WIN32 AND GDCM_BUILD_SHARED_LIBS)\r
-#  SET(OUTPUT_LIB_DIR ${GDCM_SOURCE_DIR}/lib)\r
-#ENDIF(WIN32 AND GDCM_BUILD_SHARED_LIBS)\r
-\r
-#SET (EXECUTABLE_OUTPUT_PATH ${GDCM_SOURCE_DIR}/bin CACHE PATH "Single output directory for building all executables.")\r
-#SET (LIBRARY_OUTPUT_PATH ${OUTPUT_LIB_DIR} CACHE PATH "Single output directory for building all libraries.")\r
+SET (EXECUTABLE_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.")\r
+SET (LIBRARY_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.")\r
 #MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)\r
-SET(GDCM_LIBRARY_PATH "${LIBRARY_OUTPUT_PATH}")\r
-SET(GDCM_EXECUTABLE_PATH "${EXECUTABLE_OUTPUT_PATH}")\r
+#SET(GDCM_LIBRARY_PATH "${LIBRARY_OUTPUT_PATH}")\r
+#SET(GDCM_EXECUTABLE_PATH "${EXECUTABLE_OUTPUT_PATH}")\r
 \r
 #-----------------------------------------------------------------------------\r
 # Build directory on which many applications depend\r
@@ -49,6 +34,7 @@ SUBDIRS(
   src\r
   Dicts\r
   Test\r
+  Example\r
 )\r
 \r
 #-----------------------------------------------------------------------------\r
@@ -60,20 +46,7 @@ FIND_PATH(GDCM_DATA_ROOT gdcm-ACR-LibIDO.acr
 )\r
 \r
 #-----------------------------------------------------------------------------\r
-# Deals with problem on SunOS:\r
-# ostrstream vs. ostringstream\r
-\r
-#-----------------------------------------------------------------------------\r
-# Why one should not use ADD_DEFINITIONS\r
-# http://www.cmake.org/pipermail/cmake/2003-September/004286.html\r
-\r
-#-----------------------------------------------------------------------------\r
-# __STDC_LIMIT_MACROS -> Refer to stdint.h\r
-# http://www.cmake.org/pipermail/cmake/2003-October/004369.html\r
-# http://www.cmake.org/pipermail/cmake/2003-October/004373.html\r
-\r
-#SET(GDCM_COMPILE_FLAGS  "-D__STDC_LIMIT_MACROS  -DPUB_DICT_PATH=\\\"${CMAKE_INSTALL_PREFIX}${GDCM_DATA_DIR}\\\""  )\r
-\r
+# Set the place for the public dictionary\r
 SET( GDCM_PUB_DICT_PATH "${CMAKE_INSTALL_PREFIX}${GDCM_DATA_DIR}")\r
 \r
 # SunOS + old gcc fixes:\r
@@ -83,7 +56,7 @@ IF(CMAKE_NO_ANSI_STRING_STREAM)
 ENDIF(CMAKE_NO_ANSI_STRING_STREAM)\r
 \r
 INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)\r
-CHECK_INCLUDE_FILE("stdint.h"    CMAKE_HAVE_STDINT_H)\r
+CHECK_INCLUDE_FILE("stdint.h" CMAKE_HAVE_STDINT_H)\r
 \r
 IF(NOT CMAKE_HAVE_STDINT_H)\r
   SET(GDCM_HAVE_NO_STDINT_H 1)\r
@@ -139,34 +112,3 @@ IF(GDCM_DOXYGEN)
   ENDIF(DOXYGEN)\r
 ENDIF(GDCM_DOXYGEN)\r
 \r
-#-----------------------------------------------------------------------------\r
-# Configure files with settings for use by the build.\r
-# for third party to access gdcm through cmake\r
-# to be rewritten to include only the necessary\r
-\r
-CONFIGURE_FILE(\r
-  ${GDCM_SOURCE_DIR}/gdcmConfig.cmake.in \r
-  ${GDCM_BINARY_DIR}/gdcmConfig.cmake @ONLY IMMEDIATE\r
-  )\r
-\r
-# Export our build settings and library\r
-# dependencies for the use by the user projects.\r
-INCLUDE(\r
-  ${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake)\r
-\r
-CMAKE_EXPORT_BUILD_SETTINGS(\r
-  ${GDCM_BINARY_DIR}/gdcmBuildSettings.cmake\r
-  )\r
-\r
-EXPORT_LIBRARY_DEPENDENCIES(\r
-  ${GDCM_BINARY_DIR}/gdcmLibraryDepends.cmake\r
-  )\r
-\r
-# Intall the packaging files for use by FIND_PACKAGE(GDCM) in user projects.\r
-INSTALL_FILES(/lin/gdcm FILES\r
-  ${GDCM_SOURCE_DIR}/gdcmUse.cmake\r
-  ${GDCM_BINARY_DIR}/gdcmConfig.cmake\r
-  ${GDCM_BINARY_DIR}/gdcmBuildSettings.cmake\r
-  ${GDCM_BINARY_DIR}/gdcmLibraryDepends.cmake\r
-  )\r
-\r