File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727
2828set (HDF4_LIBRARIES df mfhdf)
2929
30- find_library (HDF4_LIBRARIES NAMES df mfhdf HINTS ENV HDF4_ROOT PATH_SUFFIXES hdf )
30+ #------------------------------------------------------------------------------
31+ # find the runtime binaries of the HDF4 library
32+ #------------------------------------------------------------------------------
33+ find_library (HDF4_LIBRARIES NAMES df mfhdf
34+ HINTS ENV HDF4_ROOT
35+ PATH_SUFFIXES hdf )
36+
37+ find_library (_HDF4_DF_LIBRARY NAMES df hdf
38+ HINTS ENV
39+ HDF4_ROOT PATH_SUFFIXES hdf )
3140
32- find_library (_HDF4_DF_LIBRARY NAMES df hdf HINTS ENV HDF4_ROOT PATH_SUFFIXES hdf )
41+ #if the binaries have been found their parent directory has to be
42+ #extracted from the total path
3343get_filename_component (HDF4_LIBRARY_DIRS ${_HDF4_DF_LIBRARY} PATH )
3444
35- find_path ( HDF4_INCLUDE_DIR mfhdf.h PATH /usr/include /usr/include/hdf HINTS ENV HDF4_ROOT )
45+ #------------------------------------------------------------------------------
46+ # find the HDF4 header file
47+ #------------------------------------------------------------------------------
48+ find_path (HDF4_INCLUDE_DIR mfhdf.h HINTS ENV HDF4_ROOT PATH_SUFFIXES hdf )
3649
3750include ( FindPackageHandleStandardArgs )
3851find_package_handle_standard_args ( HDF4 DEFAULT_MSG HDF4_LIBRARIES HDF4_INCLUDE_DIR )
Original file line number Diff line number Diff line change 2525#
2626#==============================================================================
2727
28- find_module (MXML
29- LIB_NAMES mxml mxml1
30- HEADER_NAMES mxml.h
31- MOD_NAME mxml )
28+
29+ if (CMAKE_HOST_UNIX )
30+ find_module (MXML
31+ LIB_NAMES mxml
32+ HEADER_NAMES mxml.h
33+ MOD_NAME mxml )
34+ else ()
35+ find_module (MXML
36+ LIB_NAMES mxml mxml1
37+ HEADER_NAMES mxml.h
38+ MOD_NAME mxml )
39+ endif ()
3240
3341if (NOT HAVE_MXML)
3442 #the user has explicitely requested to build with MXML - as we could not
3543 #find the library we have to exit the configuration
3644 message (FATAL_ERROR "User requested MXML not found!" )
3745endif ()
3846
39- list (APPEND NAPI_LINK_LIBS ${MXML_LIBFILES} )
47+ if (CMAKE_HOST_UNIX )
48+ list (APPEND NAPI_LINK_LIBS mxml)
49+ else ()
50+ list (APPEND NAPI_LINK_LIBS mxml mxml1)
51+ endif ()
You can’t perform that action at this time.
0 commit comments