From 3ff4605a25a307a565ff359666d91b8df4efe773 Mon Sep 17 00:00:00 2001 From: Sang Kyoon Park Date: Mon, 27 Jul 2020 22:49:50 -0400 Subject: [PATCH] ENH: OSX build fix --- DTIAtlasBuilder.cmake | 9 +++++---- HierarchyModel.cxx | 2 +- README.md | 6 ++++++ SuperBuild.cmake | 2 +- SuperBuild/External_MriWatcher.cmake | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/DTIAtlasBuilder.cmake b/DTIAtlasBuilder.cmake index 125cff0..30f3ee2 100755 --- a/DTIAtlasBuilder.cmake +++ b/DTIAtlasBuilder.cmake @@ -26,13 +26,14 @@ endif() find_package(Qt5 COMPONENTS Core Widgets Gui) + if(Qt5_FOUND) find_package(Qt5 COMPONENTS Widgets REQUIRED) include_directories(${Qt5Widgets_INCLUDE_DIRS}) add_definitions(${Qt5Widgets_DEFINITIONS}) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") + set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") set(QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) qt5_add_resources(RCC_SRCS DTIAtlasBuilder.qrc) @@ -150,7 +151,7 @@ SEMMacroBuildCLI( export(TARGETS ${LOCAL_NAME} APPEND FILE ${CMAKE_BINARY_DIR}/${PRIMARY_PROJECT_NAME}-exports.cmake) set_target_properties(DTIAtlasBuilder PROPERTIES COMPILE_FLAGS "-DDTIAtlasBuilder_BUILD_SLICER_EXTENSION=${SlicerExtCXXVar}")# Add preprocessor definitions - +set_property(TARGET DTIAtlasBuilder PROPERTY CXX_STANDARD 11 ) @@ -186,7 +187,7 @@ file(COPY ${teem_BINARY_DIR}/../ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/teem) file(COPY ${niral_utilities_BINARY_DIR}/../ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/niral_utilities) file(COPY ${BRAINSTools_BINARY_DIR}/../ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/BRAINSTools) file(COPY ${ResampleDTIlogEuclidean_BINARY_DIR}/../ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/ResampleDTIlogEuclidean) -file(COPY ${MriWatcher_BINARY_DIR}/../ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/MriWatcher) +#file(COPY ${MriWatcher_BINARY_DIR}/../ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/MriWatcher) file(COPY ${ITKTransformTools_BINARY_DIR}/../ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/ITKTransformTools) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/Stylesheet/ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/Stylesheet) @@ -200,7 +201,7 @@ set(CropDTIPath ${CMAKE_INSTALL_PREFIX}/bin/niral_utilities/bin/CropDTI) set(ImageMathPath ${CMAKE_INSTALL_PREFIX}/bin/niral_utilities/bin/ImageMath) set(BRAINSFitPath ${CMAKE_INSTALL_PREFIX}/bin/BRAINSTools/bin/BRAINSFit) set(ResampleDTIlogEuclideanPath ${CMAKE_INSTALL_PREFIX}/bin/ResampleDTIlogEuclidean/bin/ResampleDTIlogEuclidean) -set(MriWatcherPath ${CMAKE_INSTALL_PREFIX}/bin/MriWatcher/bin/MriWatcher) +#set(MriWatcherPath ${CMAKE_INSTALL_PREFIX}/bin/MriWatcher/bin/MriWatcher) set(ITKTransformToolsPath ${CMAKE_INSTALL_PREFIX}/bin/ITKTransformTools/bin/ITKTransformTools) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/DTIAtlasBuilderSoftConfig.txt.in ${CMAKE_INSTALL_PREFIX}/bin/DTIAtlasBuilderSoftConfig.txt) diff --git a/HierarchyModel.cxx b/HierarchyModel.cxx index 7f14b00..e5067f1 100644 --- a/HierarchyModel.cxx +++ b/HierarchyModel.cxx @@ -159,7 +159,7 @@ void CaseHierarchyModel::removeNode(QStandardItem* itm){ QString nn=itm->text(); QString pn=parent->text(); std::vector v; - foreach(auto &str, m_CaseHierarchy["build"][pn.toStdString()]["components"]){ + foreach(const std::string &str, m_CaseHierarchy["build"][pn.toStdString()]["components"]){ std::string s=std::string(str); if(nn!=QString(s.c_str())){ //std::cout << "remainingNode " << s << std::endl; diff --git a/README.md b/README.md index 733b700..b67091f 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,12 @@ $ docker run --rm -it -v $PWD/../:/work -w /work ## Change Log: +#### [v1.6.4a](http://github.com/NIRALUser/DTIAtlasBuilder/tree/v1.6.4a) (07/26/2020) +- json related conversion ambiguity resolved. +- glut is not going to be build. Freeglut needs to be installed as described in Dockerfile +- OSX build bug fixed. + + #### [v1.6.4](http://github.com/NIRALUser/DTIAtlasBuilder/tree/v1.6.4) (06/27/2020) - DTIAtlasBuilderResults.csv is now being generated for all the sub atlases - DTIAtlasBuilderResults.csv for the concatenated displacement fields is generated in the project root directory with the same name. This file has the original images' paths, the first level intermediate files and the concatenated displacement field file path from the final atlas to the individual images. diff --git a/SuperBuild.cmake b/SuperBuild.cmake index b2b6ff6..0e1cafa 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -200,7 +200,7 @@ list( APPEND ${LOCAL_PROJECT_NAME}_DEPENDENCIES ITKv4 ResampleDTIlogEuclidean niral_utilities CLAPACK - GLUT + #GLUT MriWatcher AtlasWerks JSON diff --git a/SuperBuild/External_MriWatcher.cmake b/SuperBuild/External_MriWatcher.cmake index d82550f..e202cfb 100644 --- a/SuperBuild/External_MriWatcher.cmake +++ b/SuperBuild/External_MriWatcher.cmake @@ -40,7 +40,7 @@ endif() if(NOT ( DEFINED "USE_SYSTEM_${extProjName}" AND "${USE_SYSTEM_${extProjName}}" ) ) # option(USE_SYSTEM_VTK "Build using an externally defined version of VTK" OFF) # Set dependency list - set(${proj}_DEPENDENCIES ITKv4 GLUT) + set(${proj}_DEPENDENCIES ITKv4) # Include dependent projects if any SlicerMacroCheckExternalProjectDependency(${proj}) # Set CMake OSX variable to pass down the external project