[ismrmrd] 266/281: merge from xml

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:01:22 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 a76dfb647b1d39e2ae57ac317453d7fef926c275
Author: Hui Xue <hui.xue at nih.gov>
Date:   Fri Aug 22 15:22:07 2014 -0400

    merge from xml
---
 CMakeLists.txt | 127 ++++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 75 insertions(+), 52 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d2eacca..1d27911 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,13 @@ project(ISMRMRD)
 
 enable_testing()
 
+#Set the build type to Release if not specified
+IF(NOT CMAKE_BUILD_TYPE)
+  SET(CMAKE_BUILD_TYPE Release CACHE STRING
+      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+      FORCE)
+ENDIF(NOT CMAKE_BUILD_TYPE)
+
 # define install paths globally
 set(ISMRMRD_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/ismrmrd)
 set(ISMRMRD_INSTALL_LIB_DIR ${ISMRMRD_INSTALL_PREFIX}/lib)
@@ -17,58 +24,63 @@ set(ISMRMRD_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
 set(ISMRMRD_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
 set(ISMRMRD_SCHEMA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/schema)
 set(ISMRMRD_SCHEMA_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/xsd)
-                                                                    
-IF(NOT CMAKE_BUILD_TYPE)
-  SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
-ENDIF(NOT CMAKE_BUILD_TYPE)
+
+# add project specific cmake find modules
+list(APPEND CMAKE_MODULE_PATH ${ISMRMRD_MODULE_DIR})
 
 if (WIN32)
-    ADD_DEFINITIONS(-DWIN32 -D_WIN32 -D_WINDOWS)
-    ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
-    ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
-    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
-    SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
-    SET (CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
-    SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
-    SET (CMAKE_STATIC_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
-    SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
+    add_definitions(-DWIN32 -D_WIN32 -D_WINDOWS)
+    add_definitions(-DUNICODE -D_UNICODE)
+    add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
+    set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
+    set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
+    set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
+    set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
 endif (WIN32)
 
-set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/ismrmrd)
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
-
-find_package(XSD REQUIRED)
-find_package(XercesC REQUIRED)
+# required packages for main library
+find_package(Boost COMPONENTS thread system REQUIRED)
+find_package(HDF5 1.8 COMPONENTS C CXX HL REQUIRED)
 
-if(WIN32)
-    set(Boost_NO_BOOST_CMAKE ON)
-endif(WIN32)
+# necessary for Windows and RHEL <=6 systems
+set(Boost_NO_BOOST_CMAKE ON)
 
 if(WIN32)
   add_definitions( -DBOOST_ALL_NO_LIB )
   add_definitions( -DBOOST_ALL_DYN_LINK )
 endif(WIN32)
 
-find_package(Boost COMPONENTS thread system program_options REQUIRED)
+add_library(ismrmrd SHARED ismrmrd_hdf5.cpp)
+include_directories(${HDF5_C_INCLUDE_DIR} ${HDF5_CXX_INCLUDE_DIR}
+    ${Boost_INCLUDE_DIR})
+
+#The findHDF5.cmake does not work very well on Windows, let's help it out
+if(WIN32)
+    target_link_libraries(ismrmrd optimized ${HDF5_hdf5_LIBRARY_RELEASE}
+        optimized ${HDF5_hdf5_cpp_LIBRARY_RELEASE})
+    target_link_libraries(ismrmrd debug ${HDF5_hdf5_LIBRARY_DEBUG}
+        debug ${HDF5_hdf5_cpp_LIBRARY_DEBUG})
+    target_link_libraries(ismrmrd ${Boost_LIBRARIES})
+else(WIN32)
+    target_link_libraries(ismrmrd ${HDF5_LIBRARIES} ${Boost_THREAD_LIBRARY}
+        ${Boost_SYSTEM_LIBRARY})
+endif(WIN32)
 
-find_package(HDF5 1.8 COMPONENTS C CXX REQUIRED)
+install(TARGETS ismrmrd
+    DESTINATION ${ISMRMRD_INSTALL_LIB_DIR})
 
-#Process the XSD files
-SET(XSDS schema/ismrmrd.xsd)
-SET(XSD_ARGS cxx-tree --generate-serialization)
-#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(${CMAKE_CURRENT_BINARY_DIR}/src/xsd ${XSD_INCLUDE_DIR} ${XERCESC_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${HDF5_CXX_INCLUDE_DIR} ${HDF5_C_INCLUDE_DIR})
-LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+install(FILES ${ISMRMRD_SOURCE_DIR}/ismrmrd.h
+    ${ISMRMRD_SOURCE_DIR}/ismrmrd_hdf5.h
+    ${ISMRMRD_SOURCE_DIR}/ismrmrd_hdf5_datatypes.h
+    ${ISMRMRD_SOURCE_DIR}/ismrmrd_export.h
+    DESTINATION ${ISMRMRD_INSTALL_INCLUDE_DIR})
 
-<<<<<<< HEAD
-# This dummy is required to trigger autogeneration of ${XSDS_SOURCES}
-add_library(dummy SHARED ${XSDS_SOURCES})
-target_link_libraries(dummy ${XERCESC_LIBRARIES})
+# required packages for support xsd library
+find_package(XSD REQUIRED)
+find_package(XercesC REQUIRED)
 
-# Add library ismrmrd
-add_library(ismrmrd SHARED ismrmrd_hdf5.cpp schema/ismrmrd.xsd)
-=======
 # process the XSD files
 set(XSDS ${ISMRMRD_SCHEMA_DIR}/ismrmrd.xsd)
 set(XSD_ARGS cxx-tree --generate-serialization)
@@ -90,22 +102,33 @@ if ( WIN32 )
 elseif (WIN32)
     wrap_xsd(XSDS_SOURCES XSD_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/schema ${XSDS} OPTIONS ${XSD_ARGS})
 endif (WIN32)
->>>>>>> dev_xml_reorg
 
-#The findHDF5.cmake does not work very well on Windows, let's help it out
-IF(WIN32)
-    target_link_libraries(ismrmrd optimized ${HDF5_hdf5_LIBRARY_RELEASE} optimized ${HDF5_hdf5_cpp_LIBRARY_RELEASE})
-    target_link_libraries(ismrmrd debug ${HDF5_hdf5_LIBRARY_DEBUG} debug ${HDF5_hdf5_cpp_LIBRARY_DEBUG})
-    target_link_libraries(ismrmrd ${Boost_LIBRARIES})
-ELSE (WIN32)
-    target_link_libraries(ismrmrd ${HDF5_LIBRARIES} ${Boost_LIBRARIES})
-ENDIF(WIN32)
+if ( WIN32 )
+    include_directories(${ISMRMRD_SCHEMA_SOURCE_DIR} ${XSD_INCLUDE_DIR}
+        ${XERCESC_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${HDF5_CXX_INCLUDE_DIR}
+        ${HDF5_C_INCLUDE_DIR})
+    link_directories(${Boost_LIBRARY_DIRS})
+endif ( WIN32 )
+
+if ( NOT WIN32 )
+    add_library(ismrmrd_xsd SHARED ${XSDS_SOURCES})
+    include_directories(${XERCESC_INCLUDE_DIR})
+    target_link_libraries(ismrmrd_xsd ${XERCESC_LIBRARIES})
+endif ( NOT WIN32 )
+
+install(FILES ${XSDS} ${XSDS_SOURCES}
+    DESTINATION ${ISMRMRD_INSTALL_SCHEMA_DIR})
+
+if ( NOT WIN32 )
+    install(TARGETS ismrmrd_xsd DESTINATION ${ISMRMRD_INSTALL_LIB_DIR})
+endif ( NOT WIN32 )
 
-INSTALL(FILES ismrmrd.h ismrmrd_hdf5.h ismrmrd_hdf5_datatypes.h ismrmrd_export.h DESTINATION include)
-INSTALL(FILES schema/ismrmrd.xsd ${XSDS_SOURCES} DESTINATION schema)
-INSTALL(FILES cmake/FindIsmrmrd.cmake cmake/FindFFTW3.cmake cmake/FindXSD.cmake
-        cmake/FindXercesC.cmake cmake/FindNumPy.cmake DESTINATION cmake)
-INSTALL(TARGETS ismrmrd DESTINATION lib)
+install(FILES ${ISMRMRD_MODULE_DIR}/FindIsmrmrd.cmake
+    ${ISMRMRD_MODULE_DIR}/FindFFTW3.cmake
+    ${ISMRMRD_MODULE_DIR}/FindXSD.cmake
+    ${ISMRMRD_MODULE_DIR}/FindXercesC.cmake
+    ${ISMRMRD_MODULE_DIR}/FindNumPy.cmake
+    DESTINATION ${ISMRMRD_INSTALL_MODULE_DIR})
 
 add_subdirectory(examples/c++)
 add_subdirectory(utilities)
@@ -113,4 +136,4 @@ add_subdirectory(tests)
 add_subdirectory(doc)
 add_subdirectory(matlab)
 add_subdirectory(bindings)
-add_subdirectory(xml)
+add_subdirectory(xml)
\ No newline at end of file

-- 
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