diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..ef8324d7 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,17 @@ +project(dcm2niix) + +cmake_minimum_required(VERSION 2.6) +# +# Zlib +# +find_package(ZLIB) + +# Predefined permission set to enforce proper permissions +# during install even if files in the sources have different +# settings +set(FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) + +## +## Sub-projects +## +add_subdirectory(console) diff --git a/console/CMakeLists.txt b/console/CMakeLists.txt new file mode 100644 index 00000000..3381d8f4 --- /dev/null +++ b/console/CMakeLists.txt @@ -0,0 +1,16 @@ +project(console) +set(PROGRAMS dcm2niix) + +add_executable(dcm2niix + main_console.cpp + nii_dicom.cpp + nifti1_io_core.cpp + nii_ortho.cpp + nii_dicom_batch.cpp) +if(ZLIB_FOUND) + TARGET_LINK_LIBRARIES(dcm2niix z) +else(ZLIB_FOUND) + ADD_DEFINITIONS(-DmyDisableZlib) +endif(ZLIB_FOUND) + +install(TARGETS ${PROGRAMS} DESTINATION bin)