From 63f579ada04b47069e977c900e89b433e1aae95b Mon Sep 17 00:00:00 2001 From: malaterre Date: Fri, 10 Oct 2003 13:11:56 +0000 Subject: [PATCH] =?utf8?q?*=20FIX:=20make=20install=20should=20be=20ok=20n?= =?utf8?q?ow=20on=20=F9nix=20plateform?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 5 +-- Dicts/CMakeLists.txt | 8 +++-- Doc/CMakeLists.txt | 34 ++++++++----------- src/CMakeLists.txt | 57 ++++++++++---------------------- src/jpeg/libijg/CMakeLists.txt | 9 ++++- src/jpeg/libijg12/CMakeLists.txt | 17 ++++++---- src/jpeg/libijg8/CMakeLists.txt | 9 ++++- vtk/CMakeLists.txt | 16 +++++++-- 8 files changed, 79 insertions(+), 76 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4218ea9b..62a568a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,8 @@ PROJECT(GDCM) CMAKE_MINIMUM_REQUIRED(VERSION 1.8) -# The GDCM version number. +#----------------------------------------------------------------------------- +# GDCM version number, usefull for packaging and doxygen doc: SET(GDCM_VERSION_MAJOR 0) SET(GDCM_VERSION_MINOR 4) SET(GDCM_VERSION_PATCH 0) @@ -34,8 +35,8 @@ SET(GDCM_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) # Build directory on which many applications depend SUBDIRS( src - Test Dicts + Test ) #----------------------------------------------------------------------------- diff --git a/Dicts/CMakeLists.txt b/Dicts/CMakeLists.txt index d89e386b..e8650ae2 100644 --- a/Dicts/CMakeLists.txt +++ b/Dicts/CMakeLists.txt @@ -1,3 +1,6 @@ +#----------------------------------------------------------------------------- +# DICOM dictionary stuff + #SET(dictsdir # ${GDCM_SOURCE_DIR}/gdcm #) @@ -11,6 +14,5 @@ # dicomV3.dic #) -#IF(UNIX) - INSTALL_FILES(${GDCM_DATA_DIR} FILES dicomV3.dic README) -#ENDIF(UNIX) \ No newline at end of file +# For now INSTALL doesn't work on Win32 +INSTALL_FILES(${GDCM_DATA_DIR} FILES dicomV3.dic README) diff --git a/Doc/CMakeLists.txt b/Doc/CMakeLists.txt index cfa963fe..25076fcd 100644 --- a/Doc/CMakeLists.txt +++ b/Doc/CMakeLists.txt @@ -20,25 +20,17 @@ SET(TARGET_DIR IF(GDCM_DOXYGEN) -# ADD_CUSTOM_COMMAND( -# SOURCE ${GDCM_SOURCE_DIR}/Doc/DoxyfileDeveloppers -# COMMAND ${DOXYGEN} -# ARGS ${GDCM_SOURCE_DIR}/Doc/DoxyfileDeveloppers -# TARGET mathieu -# OUTPUT ${GDCM_BINARY_DIR}/gdcmPython/gdcm_wrap.cxx -#) - -# http://www.cmake.org/pipermail/cmake/2003-April/003673.html -# Too bad CMake doesn't support multiline "" -SET(GDCM_DOXYGEN_INPUT_COMMON - "${GDCM_SOURCE_DIR}/src ${GDCM_SOURCE_DIR}/Doc/DoxyPython.txt ${GDCM_SOURCE_DIR}/Doc/DoxyMainPage.txt ${GDCM_SOURCE_DIR}/Doc/DoxyInstallation.txt ${GDCM_SOURCE_DIR}/Doc/DoxyIntroduction.txt" -) -SET(GDCM_DOXYGEN_EXCLUDE_COMMON -) + # http://www.cmake.org/pipermail/cmake/2003-April/003673.html + # Too bad CMake doesn't support multiline "" + SET(GDCM_DOXYGEN_INPUT_COMMON + "${GDCM_SOURCE_DIR}/src ${GDCM_SOURCE_DIR}/Doc/DoxyPython.txt ${GDCM_SOURCE_DIR}/Doc/DoxyMainPage.txt ${GDCM_SOURCE_DIR}/Doc/DoxyInstallation.txt ${GDCM_SOURCE_DIR}/Doc/DoxyIntroduction.txt" + ) + SET(GDCM_DOXYGEN_EXCLUDE_COMMON + ) -#Should rewrote this thing with FOREACH: -#----------------------------------------------------------------------------- -# Build the documentation for developpers + #Should rewrote this thing with FOREACH: + #----------------------------------------------------------------------------- + # Build the documentation for developpers SET(GDCM_HTML_OUTPUT html.developper @@ -60,8 +52,8 @@ SET(GDCM_DOXYGEN_EXCLUDE_COMMON ${DOXYGEN} ${GDCM_BINARY_DIR}/Doc/DoxyfileDeveloppers) -#----------------------------------------------------------------------------- -# Build the documentation for user + #----------------------------------------------------------------------------- + # Build the documentation for user SET(GDCM_HTML_OUTPUT html.user @@ -85,7 +77,7 @@ SET(GDCM_DOXYGEN_EXCLUDE_COMMON INSTALL_FILES(${HTML_DIR} "\\.css$") - INSTALL_FILES(${HTML_DIR} "\\.gif$") + INSTALL_FILES(${HTML_DIR} "\\.png$") INSTALL_FILES(${HTML_DIR} "\\.html$") #INSTALL_FILES(${HTML_DIR} "\\.pl$") #INSTALL_FILES(${HTML_DIR} "\\.stop$") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4651a2e2..a2afadc2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,8 +1,7 @@ +#----------------------------------------------------------------------------- +# Build jpeg lib first: SUBDIRS(jpeg) -#CXXFLAGS = @CXXFLAGS@ -DPUB_DICT_PATH=\"$(datadir)/gdcm/\" \ -# -D__STDC_LIMIT_MACROS # Refer to stdint.h - INCLUDE_DIRECTORIES( ${GDCM_SOURCE_DIR}/jpeg/ ) @@ -28,48 +27,20 @@ SET(libgdcm_la_SOURCES gdcmParse.cxx gdcmJpegIdo.cxx ) -#Why one should not use ADD_DEFINITIONS -#http://www.cmake.org/pipermail/cmake/2003-September/004286.html -#ADD_DEFINITIONS(-DPUB_DICT_PATH=\\"${CMAKE_INSTALL_PREFIX}${GDCM_DATA_DIR}/\\") -#ADD_DEFINITIONS(-D__STDC_LIMIT_MACROS) - -#SET_SOURCE_FILES_PROPERTIES(${libgdcm_la_SOURCES} -# PROPERTIES -# COMPILE_FLAGS -D__STDC_LIMIT_MACROS -# COMPILE_FLAGS -DPUB_DICT_PATH=\\"${CMAKE_INSTALL_PREFIX}${GDCM_DATA_DIR}\\" -#) +#----------------------------------------------------------------------------- +# Why one should not use ADD_DEFINITIONS +# http://www.cmake.org/pipermail/cmake/2003-September/004286.html +#----------------------------------------------------------------------------- +# __STDC_LIMIT_MACROS -> Refer to stdint.h +# http://www.cmake.org/pipermail/cmake/2003-October/004369.html +# http://www.cmake.org/pipermail/cmake/2003-October/004373.html SET_SOURCE_FILES_PROPERTIES(${libgdcm_la_SOURCES} PROPERTIES COMPILE_FLAGS "-D__STDC_LIMIT_MACROS -DPUB_DICT_PATH=\\\"${CMAKE_INSTALL_PREFIX}${GDCM_DATA_DIR}\\\"" ) - - -#libgdcminclude_HEADERS = \ -# gdcmException.h \ -# gdcmHeader.h \ -# gdcmHeaderHelper.h \ -# gdcmCommon.h \ -# gdcm.h \ -# gdcmDictSet.h \ -# gdcmDict.h \ -# gdcmDictEntry.h \ -# gdcmElValue.h \ -# gdcmElValSet.h \ -# gdcmVR.h \ -# gdcmTS.h \ -# gdcmFile.h - -#EXTRA_DIST = \ -# gdcmUtil.h \ -# gdcmIdo.h \ -# iddcmjpeg.h - - - - ADD_LIBRARY(gdcm ${libgdcm_la_SOURCES} ) #TODO this is not working out of the box (on the first time) IF(UNIX) @@ -83,4 +54,12 @@ ELSE(UNIX) gdcmijpeg12 Wsock32.lib #doesn't exist on cygwin ) -ENDIF(UNIX) \ No newline at end of file +ENDIF(UNIX) + +#The following is not wroking because when a header file is not found it tries +#to find one in the binary dir +#INSTALL_FILES(/include .h ${libgdcm_la_SOURCES}) +#INSTALL_FILES(/include FILES gdcmIdo.h iddcmjpeg.h) +INSTALL_FILES(/include "\\.h$") + +INSTALL_TARGETS(/lib/ gdcm) \ No newline at end of file diff --git a/src/jpeg/libijg/CMakeLists.txt b/src/jpeg/libijg/CMakeLists.txt index d3f0727d..38a5346c 100644 --- a/src/jpeg/libijg/CMakeLists.txt +++ b/src/jpeg/libijg/CMakeLists.txt @@ -73,4 +73,11 @@ SET(libgdcmijpeg8include_HEADERS # jconfig.linux \ # jconfig.vc -ADD_LIBRARY(gdcmijpeg8 ${libgdcmijpeg8_la_SOURCES}) \ No newline at end of file +ADD_LIBRARY(gdcmijpeg8 ${libgdcmijpeg8_la_SOURCES}) + +#INSTALL_FILES(/include "\\.h$") +INSTALL_FILES(/include FILES ${libgdcmijpeg8include_HEADERS}) +#INSTALL_FILES(/include FILES jconfig.linux jconfig.vc) +INSTALL_FILES(/include FILES jconfig.linux) + +INSTALL_TARGETS(/lib/ gdcmijpeg8) \ No newline at end of file diff --git a/src/jpeg/libijg12/CMakeLists.txt b/src/jpeg/libijg12/CMakeLists.txt index 257f08a3..71d4f3e4 100644 --- a/src/jpeg/libijg12/CMakeLists.txt +++ b/src/jpeg/libijg12/CMakeLists.txt @@ -1,8 +1,5 @@ -#LTVERSION = 0:1:0 - -#lib_LTLIBRARIES = libgdcmijpeg12.la - -##CXXFLAGS = @CXXFLAGS@ +#----------------------------------------------------------------------------- +# Build jpeg lib for 12 bits: SET(libgdcmijpeg12_la_SOURCES jcapimin12.c @@ -53,7 +50,6 @@ SET(libgdcmijpeg12_la_SOURCES jmemnobs12.c ) -#libgdcmijpeg12includedir = $(includedir) SET(libgdcmijpeg12include_HEADERS jchuff12.h jconfig12.h @@ -72,4 +68,11 @@ SET(libgdcmijpeg12include_HEADERS # jconfig.linux \ # jconfig.vc -ADD_LIBRARY(gdcmijpeg12 ${libgdcmijpeg12_la_SOURCES}) \ No newline at end of file +ADD_LIBRARY(gdcmijpeg12 ${libgdcmijpeg12_la_SOURCES}) + +#INSTALL_FILES(/include "\\.h$") +INSTALL_FILES(/include FILES ${libgdcmijpeg12include_HEADERS}) +#INSTALL_FILES(/include FILES jconfig.linux jconfig.vc) +INSTALL_FILES(/include FILES jconfig.linux) + +INSTALL_TARGETS(/lib/ gdcmijpeg12) \ No newline at end of file diff --git a/src/jpeg/libijg8/CMakeLists.txt b/src/jpeg/libijg8/CMakeLists.txt index d3f0727d..38a5346c 100644 --- a/src/jpeg/libijg8/CMakeLists.txt +++ b/src/jpeg/libijg8/CMakeLists.txt @@ -73,4 +73,11 @@ SET(libgdcmijpeg8include_HEADERS # jconfig.linux \ # jconfig.vc -ADD_LIBRARY(gdcmijpeg8 ${libgdcmijpeg8_la_SOURCES}) \ No newline at end of file +ADD_LIBRARY(gdcmijpeg8 ${libgdcmijpeg8_la_SOURCES}) + +#INSTALL_FILES(/include "\\.h$") +INSTALL_FILES(/include FILES ${libgdcmijpeg8include_HEADERS}) +#INSTALL_FILES(/include FILES jconfig.linux jconfig.vc) +INSTALL_FILES(/include FILES jconfig.linux) + +INSTALL_TARGETS(/lib/ gdcmijpeg8) \ No newline at end of file diff --git a/vtk/CMakeLists.txt b/vtk/CMakeLists.txt index e5e30ff7..a9a19244 100644 --- a/vtk/CMakeLists.txt +++ b/vtk/CMakeLists.txt @@ -1,5 +1,8 @@ -#VTK GDCM subdir +#----------------------------------------------------------------------------- +# VTK GDCM Reader subdir +#----------------------------------------------------------------------------- +# Need gdcm header files INCLUDE_DIRECTORIES( ${GDCM_SOURCE_DIR}/src/ ) @@ -8,6 +11,8 @@ SET(VTKGDCM_LIB_SRCS vtkGdcmReader.cxx ) +#----------------------------------------------------------------------------- +# Create vtkgdcm library ADD_LIBRARY(vtkgdcm ${VTKGDCM_LIB_SRCS}) TARGET_LINK_LIBRARIES(vtkgdcm gdcm @@ -16,6 +21,8 @@ TARGET_LINK_LIBRARIES(vtkgdcm vtkFiltering ) +#----------------------------------------------------------------------------- +# See with frog why m4 didn't link to lib, and include cxx file instead ? SET(vtkgdcmdemo_SOURCES testvtkGdcmReader.cxx # vtkGdcmReader.cxx @@ -27,6 +34,8 @@ TARGET_LINK_LIBRARIES(vtkgdcmdemo vtkRendering ) +#----------------------------------------------------------------------------- +# See with frog why m4 didn't link to lib, and include cxx file instead ? SET(vtkgdcmViewer_SOURCES vtkgdcmViewer.cxx #vtkGdcmReader.cxx @@ -35,4 +44,7 @@ ADD_EXECUTABLE(vtkgdcmViewer ${vtkgdcmViewer_SOURCES}) TARGET_LINK_LIBRARIES(vtkgdcmViewer vtkgdcm vtkRendering -) \ No newline at end of file +) + +# Install vtk header +INSTALL_FILES(/include FILES vtkGdcmReader.h) \ No newline at end of file -- 2.45.1