File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -59,11 +59,11 @@ if(UNIX)
5959 if (ARM_CRC)
6060 # wrong answer for Apple Silicon: check_cxx_compiler_flag(-msse2 HAS_SSE2)
6161 else ()
62- check_cxx_compiler_flag(-msse2 HAS_SSE2)
63- if (HAS_SSE2)
64- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse" )
65- endif ()
66- endif ()
62+ check_cxx_compiler_flag(-msse2 HAS_SSE2)
63+ if (HAS_SSE2)
64+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse" )
65+ endif ()
66+ endif ()
6767endif ()
6868
6969set (PROGRAMS dcm2niix)
@@ -86,12 +86,14 @@ set(DCM2NIIX_SRCS
8686 main_console.cpp
8787 nii_dicom.cpp
8888 jpg_0XC3.cpp
89- ujpeg.cpp
9089 nifti1_io_core.cpp
9190 nii_foreign.cpp
9291 nii_ortho.cpp
9392 nii_dicom_batch.cpp)
9493
94+ if (NOT USE_TURBOJPEG)
95+ set (DCM2NIIX_SRCS ${DCM2NIIX_SRCS} ujpeg.cpp)
96+ endif ()
9597
9698option (USE_JNIFTI "Build with JNIfTI support" ON )
9799if (USE_JNIFTI)
@@ -101,6 +103,8 @@ endif()
101103
102104if (BUILD_DCM2NIIXFSLIB)
103105 set (DCM2NIIXFSLIB dcm2niixfs)
106+ # BUILD_DCM2NIIXFSLIB and USE_TURBOJPEG are not allowed to be enabled at
107+ # the same time, so ujpeg.cpp is unconditionaly in this sources list:
104108 set (DCM2NIIXFSLIB_SRCS
105109 dcm2niix_fswrapper.cpp
106110 nii_dicom.cpp
@@ -195,12 +199,15 @@ if(BATCH_VERSION)
195199 main_console_batch.cpp
196200 nii_dicom.cpp
197201 jpg_0XC3.cpp
198- ujpeg.cpp
199202 nifti1_io_core.cpp
200203 nii_foreign.cpp
201204 nii_ortho.cpp
202205 nii_dicom_batch.cpp)
203206
207+ if (NOT USE_TURBOJPEG)
208+ set (DCM2NIIBATCH_SRCS ${DCM2NIIBATCH_SRCS} ujpeg.cpp)
209+ endif ()
210+
204211 if (USE_JNIFTI)
205212 set (DCM2NIIBATCH_SRCS ${DCM2NIIBATCH_SRCS} cJSON.cpp base64.cpp)
206213 endif ()
You can’t perform that action at this time.
0 commit comments