From: malaterre Date: Sun, 5 Feb 2006 23:13:31 +0000 (+0000) Subject: ENH: Redo the BUILD_SHARED_LIBS -one more time- hopefully this time for real X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=667333afd16875acc88fbeb620a8c01ff345d704;p=gdcm.git ENH: Redo the BUILD_SHARED_LIBS -one more time- hopefully this time for real --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 462a37f5..4bc3d87f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,8 +25,7 @@ MARK_AS_ADVANCED(GDCM_LEGACY_REMOVE GDCM_LEGACY_SILENT) #----------------------------------------------------------------------------- # Build shared lib by default -OPTION(GDCM_BUILD_SHARED_LIBS "Build GDCM with shared libraries." ON) -SET(BUILD_SHARED_LIBS ${GDCM_BUILD_SHARED_LIBS}) +OPTION(BUILD_SHARED_LIBS "Build GDCM with shared libraries." ON) OPTION(GDCM_DEBUG "Turn verbosity of some statement ON." OFF) MARK_AS_ADVANCED(GDCM_DEBUG) diff --git a/Example/CMakeLists.txt b/Example/CMakeLists.txt index b98cf114..bc720d75 100644 --- a/Example/CMakeLists.txt +++ b/Example/CMakeLists.txt @@ -34,6 +34,7 @@ SET(EXAMPLE_SOURCES ReWrite RawToDicom TestValidate + #BatchUncompress #the following will be transformed into 'examples', or 'utilities' # or will be removed diff --git a/GDCMConfig.cmake.in b/GDCMConfig.cmake.in index 0e895c4b..8987890d 100644 --- a/GDCMConfig.cmake.in +++ b/GDCMConfig.cmake.in @@ -2,7 +2,7 @@ SET(GDCM_MAJOR_VERSION "@GDCM_MAJOR_VERSION@") SET(GDCM_MINOR_VERSION "@GDCM_MINOR_VERSION@") SET(GDCM_BUILD_VERSION "@GDCM_BUILD_VERSION@") -SET(GDCM_BUILD_SHARED_LIBS "@GDCM_BUILD_SHARED_LIBS@") +SET(GDCM_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@") SET(GDCM_USE_FILE "@GDCM_USE_FILE@") SET(GDCM_INCLUDE_DIRS "@GDCM_INCLUDE_DIRS@") diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index c8b94ef4..6be1a375 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -200,13 +200,13 @@ FILE(WRITE "${GDCM_BINARY_DIR}/gdcmDataSeqImages.h" #----------------------------------------------------------------------------- # Trying to solve a bizarre problem when loading shared lib if gdcm is static # Therefore I disable the test when building SHAREDLIBS -IF(UNIX AND NOT GDCM_BUILD_SHARED_LIBS) +IF(UNIX AND NOT BUILD_SHARED_LIBS) ADD_LIBRARY(dynmodule MODULE dynmodule.cxx) TARGET_LINK_LIBRARIES(dynmodule gdcm) ADD_EXECUTABLE(loadmodule loadmodule.cxx ) TARGET_LINK_LIBRARIES(loadmodule gdcm -ldl) ADD_TEST(loadmodule ${CXX_TEST_PATH}/loadmodule) -ENDIF(UNIX AND NOT GDCM_BUILD_SHARED_LIBS) +ENDIF(UNIX AND NOT BUILD_SHARED_LIBS) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cb360f29..b00eb68a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -73,6 +73,14 @@ SET(libgdcm_la_SOURCES ${GDCM_BINARY_DIR}/src/gdcmDefaultDicts.cxx ) +# Since OpenJPEG does not used configured headers we have to +# do the -D alternative +IF(NOT BUILD_SHARED_LIBS) + SET_SOURCE_FILES_PROPERTIES( + ${GDCM_SOURCE_DIR}/src/gdcmJpeg2000.cxx + COMPILE_FLAGS -DOPJ_STATIC) +ENDIF(NOT BUILD_SHARED_LIBS) + ADD_LIBRARY(gdcm ${libgdcm_la_SOURCES}) TARGET_LINK_LIBRARIES(gdcm gdcmjpeg8 diff --git a/src/gdcmSerieHelper.cxx b/src/gdcmSerieHelper.cxx index 9ba06874..5d7b6c48 100644 --- a/src/gdcmSerieHelper.cxx +++ b/src/gdcmSerieHelper.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHelper.cxx,v $ Language: C++ - Date: $Date: 2006/01/31 11:29:41 $ - Version: $Revision: 1.45 $ + Date: $Date: 2006/02/05 23:13:36 $ + Version: $Revision: 1.46 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -971,7 +971,7 @@ std::string SerieHelper::CreateUserDefinedFileIdentifier( File * inFile ) { const ExDetail &r = *it2; s = inFile->GetEntryString( r.group, r.elem ); - + // User is allowed to ask 'convertion', to allow further ordering // e.g : 100 would be *before* 20; 000020.00 vs 00100.00 : OK if (it2->convert) diff --git a/src/gdcmopenjpeg/CMakeLists.txt b/src/gdcmopenjpeg/CMakeLists.txt index fb070f58..a2b8d36e 100644 --- a/src/gdcmopenjpeg/CMakeLists.txt +++ b/src/gdcmopenjpeg/CMakeLists.txt @@ -21,6 +21,10 @@ SET(OPENJPEG_BUILD_VERSION 0) SET(OPENJPEG_VERSION "${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}") +#----------------------------------------------------------------------------- +# OpenJPEG build configuration options. +OPTION(BUILD_SHARED_LIBS "Build OpenJPEG with shared libraries." OFF) + #----------------------------------------------------------------------------- # For the codec... OPTION(BUILD_EXAMPLES "Build the Examples (codec...)." OFF)