Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Lib/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@

cmake_minimum_required(VERSION 2.8)
project(MRiLab)

set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./cmake folder has not only FindMatlab.cmake but also files for IPP, Framewave etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you, I should keep this line,

and combine ${CMAKE_SOURCE_DIR}/cmake with old CMAKE_MODULE_PATH like,

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH } ${CMAKE_SOURCE_DIR}/cmake)

or

list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

#set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set(CMAKE_SIZEOF_VOID_P 8) # use 64-bit by default
set(CMAKE_BUILD_TYPE Release) # use Release version by default

add_definitions(/DMATLAB_MEX_FILE) #define matlab macros
add_definitions(/DMX_COMPAT_32)

find_package(Matlab REQUIRED)
find_package(Matlab REQUIRED MX_LIBRARY ENG_LIBRARY MAIN_PROGRAM)
find_package(IPP)
find_package(Framewave)
find_package(OpenMP)
find_package(CUDA)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed you comment CUDA. Did you test CPU-only mode?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe, I am not sure, it seems this line should not be deleted

find_package(VTK)
find_package(Ismrmrd)
find_package(Boost COMPONENTS thread system)
find_package(Boost)

IF(MATLAB_FOUND)
add_subdirectory(engine)
Expand Down
1 change: 0 additions & 1 deletion Lib/src/recon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

add_subdirectory(DoGridding)
20 changes: 1 addition & 19 deletions Lib/src/recon/DoGridding/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@

INCLUDE_DIRECTORIES(${MATLAB_INCLUDE_DIR})

add_library(DoGridding SHARED DoGridding.cpp ${CMAKE_SOURCE_DIR}/Matlabdef.def)
target_link_libraries(DoGridding ${MATLAB_LIBRARIES})

if(WIN32)
if (CMAKE_CL_64)
SET_TARGET_PROPERTIES(DoGridding PROPERTIES SUFFIX .mexw64)
else(CMAKE_CL_64)
SET_TARGET_PROPERTIES(DoGridding PROPERTIES SUFFIX .mexw32)
endif(CMAKE_CL_64)
else(WIN32)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
SET_TARGET_PROPERTIES(DoGridding PROPERTIES SUFFIX .mexa64 PREFIX "")
else(CMAKE_SIZEOF_VOID_P MATCHES "8")
SET_TARGET_PROPERTIES(DoGridding PROPERTIES SUFFIX .mexglx PREFIX "")
endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
endif(WIN32)
matlab_add_mex(NAME DoGridding SRC DoGridding.cpp ${CMAKE_SOURCE_DIR}/Matlabdef.def LINK_TO ${Matlab_LIBRARIES})

install(TARGETS DoGridding DESTINATION ../bin)
1 change: 0 additions & 1 deletion Lib/src/renderer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

include(${VTK_USE_FILE})

if (VTK_FOUND)
Expand Down
18 changes: 1 addition & 17 deletions Lib/src/renderer/DoKSpaceTrajVTK/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@

add_library(DoKSpaceTrajVTK SHARED DoKSpaceTrajVTK.cpp ${CMAKE_SOURCE_DIR}/Matlabdef.def)
target_link_libraries(DoKSpaceTrajVTK ${MATLAB_LIBRARIES})

if(WIN32)
if (CMAKE_CL_64)
SET_TARGET_PROPERTIES(DoKSpaceTrajVTK PROPERTIES SUFFIX .mexw64)
else(CMAKE_CL_64)
SET_TARGET_PROPERTIES(DoKSpaceTrajVTK PROPERTIES SUFFIX .mexw32)
endif(CMAKE_CL_64)
else(WIN32)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
SET_TARGET_PROPERTIES(DoKSpaceTrajVTK PROPERTIES SUFFIX .mexa64 PREFIX "")
else(CMAKE_SIZEOF_VOID_P MATCHES "8")
SET_TARGET_PROPERTIES(DoKSpaceTrajVTK PROPERTIES SUFFIX .mexglx PREFIX "")
endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
endif(WIN32)
matlab_add_mex(NAME DoKSpaceTrajVTK SRC DoKSpaceTrajVTK.cpp ${CMAKE_SOURCE_DIR}/Matlabdef.def LINK_TO ${Matlab_LIBRARIES})

if(VTK_LIBRARIES)
target_link_libraries(DoKSpaceTrajVTK ${VTK_LIBRARIES})
Expand Down
22 changes: 2 additions & 20 deletions Lib/src/utilities/DoSARAverageAtCPU/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
matlab_add_mex(NAME DoSARAverageAtCPU SRC DoSARAverageAtCPU.cpp ${CMAKE_SOURCE_DIR}/Matlabdef.def LINK_TO ${Matlab_LIBRARIES})

INCLUDE_DIRECTORIES(${MATLAB_INCLUDE_DIR})

add_library(DoSARAverageAtCPU SHARED DoSARAverageAtCPU.cpp ${CMAKE_SOURCE_DIR}/Matlabdef.def)
target_link_libraries(DoSARAverageAtCPU ${MATLAB_LIBRARIES})

if(WIN32)
if (CMAKE_CL_64)
SET_TARGET_PROPERTIES(DoSARAverageAtCPU PROPERTIES SUFFIX .mexw64)
else(CMAKE_CL_64)
SET_TARGET_PROPERTIES(DoSARAverageAtCPU PROPERTIES SUFFIX .mexw32)
endif(CMAKE_CL_64)
else(WIN32)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
SET_TARGET_PROPERTIES(DoSARAverageAtCPU PROPERTIES SUFFIX .mexa64 PREFIX "")
else(CMAKE_SIZEOF_VOID_P MATCHES "8")
SET_TARGET_PROPERTIES(DoSARAverageAtCPU PROPERTIES SUFFIX .mexglx PREFIX "")
endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
endif(WIN32)

install(TARGETS DoSARAverageAtCPU DESTINATION ../bin)
install(TARGETS DoSARAverageAtCPU DESTINATION ../bin)