Skip to content

Commit

Permalink
ENH: OSX build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sang Kyoon Park authored and Sang Kyoon Park committed Jul 28, 2020
1 parent 855f488 commit 3ff4605
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
9 changes: 5 additions & 4 deletions DTIAtlasBuilder.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 )



Expand Down Expand Up @@ -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)

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion HierarchyModel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void CaseHierarchyModel::removeNode(QStandardItem* itm){
QString nn=itm->text();
QString pn=parent->text();
std::vector<std::string> 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;
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ $ docker run --rm -it -v $PWD/../:/work -w /work <image-name>

## 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.
Expand Down
2 changes: 1 addition & 1 deletion SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ list( APPEND ${LOCAL_PROJECT_NAME}_DEPENDENCIES ITKv4
ResampleDTIlogEuclidean
niral_utilities
CLAPACK
GLUT
#GLUT
MriWatcher
AtlasWerks
JSON
Expand Down
2 changes: 1 addition & 1 deletion SuperBuild/External_MriWatcher.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ff4605

Please sign in to comment.