[ismrmrd] 48/281: Split into two libraries, one for HDF5 RW and one for the XML XSD stuff.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:00:54 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag ismrmrd0.5
in repository ismrmrd.

commit c5f569d9a8a5354257525aa91efbc67de1dfd254
Author: Michael S. Hansen <michael.hansen at nih.gov>
Date:   Thu Sep 13 12:09:28 2012 -0400

    Split into two libraries, one for HDF5 RW and one for the XML XSD stuff.
---
 CMakeLists.txt          | 17 +++++++++++------
 cmake/FindIsmrmrd.cmake |  7 ++++++-
 ismrmrd_xsd_export.h    | 21 +++++++++++++++++++++
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3406a5a..946ed6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,11 +22,13 @@ find_package(HDF5 1.8 COMPONENTS C CXX REQUIRED)
 
 #Process the XSD files
 SET(XSDS schema/ismrmrd.xsd)
-SET(XSD_ARGS cxx-tree --generate-serialization --export-symbol EXPORTISMRMRD --hxx-prologue-file ${CMAKE_SOURCE_DIR}/ismrmrd_export.h)
+SET(XSD_ARGS cxx-tree --generate-serialization --export-symbol EXPORTISMRMRDXSD --hxx-prologue-file ${CMAKE_SOURCE_DIR}/ismrmrd_xsd_export.h)
 WRAP_XSD(XSDS_SOURCES XSD_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/schema ${XSDS} OPTIONS ${XSD_ARGS})
 INCLUDE_DIRECTORIES(${XSD_INCLUDES} ${XSD_INCLUDE_DIR} ${XERCESC_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${HDF5_INCLUDE_DIR} ${HDF5_INCLUDE_DIR}/cpp)
 LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
-add_library(ismrmrd SHARED ismrmrd_hdf5.cpp ${XSDS_SOURCES})
+
+add_library(ismrmrd SHARED ismrmrd_hdf5.cpp)
+add_library(ismrmrd_xsd SHARED ${XSDS_SOURCES})
 
 #The findHDF5.cmake does not work very well on Windows, let's help it out
 IF(WIN32)
@@ -44,20 +46,22 @@ IF(WIN32)
 	target_link_libraries(ismrmrd debug ${HDF5_LIB_DIR}/zlib_D.lib)
 	target_link_libraries(ismrmrd debug ${HDF5_LIB_DIR}/szip_D.lib)
 
-	target_link_libraries(ismrmrd ${XERCESC_LIBRARIES} ${Boost_LIBRARIES})
+	target_link_libraries(ismrmrd ${Boost_LIBRARIES})
 ELSE (WIN32)
-	target_link_libraries(ismrmrd ${HDF5_LIBRARIES} ${XERCESC_LIBRARIES} ${Boost_LIBRARIES})
+	target_link_libraries(ismrmrd ${HDF5_LIBRARIES} ${Boost_LIBRARIES})
 ENDIF(WIN32)
 
+target_link_libraries(ismrmrd_xsd ${XERCESC_LIBRARIES})
+
 find_package(FFTW3 COMPONENTS single)
 IF(FFTW3_FOUND)
 	MESSAGE("FFTW3 Found, building test applications")
 	INCLUDE_DIRECTORIES(${FFTW3_INCLUDE_DIR})
 	add_executable(ismrmrd_create_dataset test_create_dataset.cpp)
-	target_link_libraries(ismrmrd_create_dataset ${XERCESC_LIBRARIES} ismrmrd ${FFTW3_LIBRARIES})
+	target_link_libraries(ismrmrd_create_dataset ${XERCESC_LIBRARIES} ismrmrd ismrmrd_xsd ${FFTW3_LIBRARIES})
 	INSTALL(TARGETS ismrmrd_create_dataset DESTINATION bin)
 	add_executable(ismrmrd_recon_dataset test_recon_dataset.cpp)
-	target_link_libraries(ismrmrd_recon_dataset ${XERCESC_LIBRARIES} ismrmrd ${FFTW3_LIBRARIES})
+	target_link_libraries(ismrmrd_recon_dataset ${XERCESC_LIBRARIES} ismrmrd ismrmrd_xsd ${FFTW3_LIBRARIES})
 	INSTALL(TARGETS ismrmrd_recon_dataset DESTINATION bin)
 ELSE(FFTW3_FOUND)
 	MESSAGE("FFTW3 NOT Found....cannot build test applications")
@@ -67,5 +71,6 @@ INSTALL(FILES ismrmrd.h ${XSDS_SOURCES} ismrmrd_hdf5.h ismrmrd_hdf5_datatypes.h
 INSTALL(FILES schema/ismrmrd.xsd DESTINATION schema)
 INSTALL(FILES cmake/FindIsmrmrd.cmake DESTINATION cmake)
 INSTALL(TARGETS ismrmrd DESTINATION lib)
+INSTALL(TARGETS ismrmrd_xsd DESTINATION lib)
 
 add_subdirectory(doc)
diff --git a/cmake/FindIsmrmrd.cmake b/cmake/FindIsmrmrd.cmake
index 0532731..fc952ee 100644
--- a/cmake/FindIsmrmrd.cmake
+++ b/cmake/FindIsmrmrd.cmake
@@ -1,7 +1,8 @@
 # - Find ISMRMRRD
 #   ISMRMRD_FOUND        - True if ISMRMRD found.
 #   ISMRMRD_INCLUDE_DIR  - where to find ismrmrd.h, etc.
-#   ISMRMRD_LIBRARIES    - libismrmrd.so, etc.
+#   ISMRMRD_LIBRARIES    - libismrmrd.so.
+#   ISMRMRD_XSD_LIBRARIES    - libismrmrd.so.
 #   ISMRMRD_SCHEMA_DIR   - Where to find ismrmrd.xsd       
 
 FIND_PATH( ISMRMRD_INCLUDE_DIR ismrmrd.h PATHS /usr/local/ /usr/include /usr/local/include PATH_SUFFIXES ismrmrd ismrmrd/include)
@@ -11,6 +12,10 @@ FIND_LIBRARY( ISMRMRD_LIBRARIES
               NAMES "ismrmrd"
               PATHS  /usr/local/lib ${ISMRMRD_INCLUDE_DIR}/../lib /usr/lib )
 
+FIND_LIBRARY( ISMRMRD_XSD_LIBRARIES
+              NAMES "ismrmrd_xsd"
+              PATHS  /usr/local/lib ${ISMRMRD_INCLUDE_DIR}/../lib /usr/lib )
+
 INCLUDE( "FindPackageHandleStandardArgs" )
 FIND_PACKAGE_HANDLE_STANDARD_ARGS( "Ismrmrd" DEFAULT_MSG ISMRMRD_INCLUDE_DIR ISMRMRD_LIBRARIES ISMRMRD_SCHEMA_DIR)
 
diff --git a/ismrmrd_xsd_export.h b/ismrmrd_xsd_export.h
new file mode 100644
index 0000000..40c3a9a
--- /dev/null
+++ b/ismrmrd_xsd_export.h
@@ -0,0 +1,21 @@
+/*
+ * ismrmrd_xsd_export.h
+ *
+ *  Created on: Sep 13, 2012
+ *      Author: hansenms
+ */
+
+#ifndef ISMRMRD_XSD_EXPORT_H_
+#define ISMRMRD_XSD_EXPORT_H_
+
+#if defined (WIN32)
+#if defined (ismrmrd_EXPORTS)
+#define EXPORTISMRMRDXSD __declspec(dllexport)
+#else
+#define EXPORTISMRMRDXSD __declspec(dllimport)
+#endif
+#else
+#define EXPORTISMRMRDXSD
+#endif
+
+#endif /* ISMRMRD_XSD_EXPORT_H_ */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ismrmrd.git



More information about the debian-science-commits mailing list