X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=CMakeLists.txt;h=b63a646df2292ec6e2bf2cf24206a53a3a3dc54a;hb=d176ceb6e7a8ef21890696313d0e232ae50e9ad9;hp=2b40cf5d979f785836197f54b50d26be29598800;hpb=7b90a94638699fec1143d1928f6a6b6f3c769d54;p=gdcm.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b40cf5d..b63a646d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,31 +1,48 @@ PROJECT(GDCM) -CMAKE_MINIMUM_REQUIRED(VERSION 1.6) +CMAKE_MINIMUM_REQUIRED(VERSION 1.8) -# The GDCM version number. -SET(GDCM_VERSION_MAJOR 1) -SET(GDCM_VERSION_MINOR 9) +#----------------------------------------------------------------------------- +# GDCM version number, usefull for packaging and doxygen doc: +SET(GDCM_VERSION_MAJOR 0) +SET(GDCM_VERSION_MINOR 4) SET(GDCM_VERSION_PATCH 0) SET(GDCM_VERSION "${GDCM_VERSION_MAJOR}.${GDCM_VERSION_MINOR}") SET(GDCM_VERSION_FULL "${GDCM_VERSION}.${GDCM_VERSION_PATCH}") -SET(GDCM_DATA_DIR "/share/gdcm" CACHE STRING +#----------------------------------------------------------------------------- +# Output directories. +SET (LIBRARY_OUTPUT_PATH ${GDCM_SOURCE_DIR}/lib CACHE PATH "Single output directory for building all libraries.") +SET (EXECUTABLE_OUTPUT_PATH ${GDCM_SOURCE_DIR}/lib CACHE PATH "Single output directory for building all executables.") +MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) +SET(GDCM_LIBRARY_PATH "${LIBRARY_OUTPUT_PATH}") +SET(GDCM_EXECUTABLE_PATH "${EXECUTABLE_OUTPUT_PATH}") + +#----------------------------------------------------------------------------- +# datadir in CMake: +SET(GDCM_DATA_DIR "/share/gdcm/" CACHE INTERNAL "Install location for data (relative to prefix).") MARK_AS_ADVANCED(GDCM_DATA_DIR) - +#----------------------------------------------------------------------------- +# Build shared lib by default OPTION(BUILD_SHARED_LIBS "Build GDCM with shared libraries." ON) SET(GDCM_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) -INCLUDE_DIRECTORIES( -) +#INCLUDE_DIRECTORIES( +#) -#Build directory on which many applications depend -SUBDIRS(src - Test - Dicts) +#----------------------------------------------------------------------------- +# Build directory on which many applications depend +SUBDIRS( + src + Dicts + Test +) +#----------------------------------------------------------------------------- +# Search VTK FIND_PACKAGE(VTK) -#If vtk found +# If vtk found IF(VTK_FOUND) OPTION(GDCM_VTK "Build VTK-GDCM Lib." OFF) IF(GDCM_VTK) @@ -34,8 +51,10 @@ IF(VTK_FOUND) ENDIF(GDCM_VTK) ENDIF(VTK_FOUND) +#----------------------------------------------------------------------------- +# Search Python libs: FIND_PACKAGE(PythonLibs) -#If PythonLibs found +# If PythonLibs found IF(PYTHON_LIBRARY) OPTION(GDCM_WRAP_PYTHON "Wrap GDCM classes into the Python language." OFF) #if wrapping enable @@ -44,9 +63,27 @@ IF(PYTHON_LIBRARY) ENDIF(GDCM_WRAP_PYTHON) ENDIF(PYTHON_LIBRARY) -#Doxygen stuff -# SUBDIRS(Doc) +#----------------------------------------------------------------------------- +# Search Doxygen: +FIND_PACKAGE(Doxygen) +IF(DOXYGEN) + OPTION(GDCM_DOXYGEN "Build source documentation using doxygen." OFF) + # if doxygen enable + IF(GDCM_DOXYGEN) + SUBDIRS(Doc) + ENDIF(GDCM_DOXYGEN) +ENDIF(DOXYGEN) + +#----------------------------------------------------------------------------- +# Configure files with settings for use by the build. + +# to be rewritten to include only the necessary +#CONFIGURE_FILE(${GDCM_SOURCE_DIR}/UseGdcm.cmake.in +# ${GDCM_BINARY_DIR}/UseGdcm.cmake COPYONLY IMMEDIATE) + +#----------------------------------------------------------------------------- +# Copy / paste from old m4 script: # EXTRA_DIST = \ # AUTHORS \ @@ -57,7 +94,7 @@ ENDIF(PYTHON_LIBRARY) # README \ # TODO \ # gdcm.spec \ -# gdcm.dsw +# gdcm.dsw #release: # $(MAKE) dist distdir=$(PACKAGE)-$(VERSION)