Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FindNIFTICLIB.cmake module which only requires NIFTICLIB_DIR #29

Open
schuhschuh opened this issue Dec 15, 2015 · 1 comment
Open

Comments

@schuhschuh
Copy link
Member

We should use a custom FindNIFTICLIB.cmake module (if necessary) to find the NIfTI library components which mainly asks the user for the installation directory of the library. The current module requires to specify the include directory and CDF, IO, and ZNZ libraries separately.

The FindNiftiCLib.cmake module of CMake BASIS could be used.

@schuhschuh
Copy link
Member Author

As a side note, the code expects to find the NIfTI headers in the NIFTICLIB_INCLUDE_DIR directly, but my installation has them in <prefix>/include/nifti. The question is if it wouldn't be better to change the include statements to #include <nifti/nifti1_io.h>.

EDIT: This is BTW handled by my Find module, by simply adding both, the top-level include/ directory and the include/nifti/ directory.

# ----------------------------------------------------------------------------
# aliases / backwards compatibility
if (NiftiCLib_INCLUDE_DIR)
  set (NiftiCLib_INCLUDE_DIRS "${NiftiCLib_INCLUDE_DIR}")
  if (NOT NiftiCLib_INCLUDE_DIR MATCHES "/nifti/?$")
    list (APPEND NiftiCLib_INCLUDE_DIRS "${NiftiCLib_INCLUDE_DIR}/nifti")
  endif ()
  set (NiftiCLib_INCLUDES "${NiftiCLib_INCLUDE_DIRS}")
endif ()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant