mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
make conditional switch between original implementation of zlib suffix and new depending on conda packaging or not
This commit is contained in:
+30
-18
@@ -444,6 +444,31 @@ if(HDF5_SUPPORT)
|
|||||||
# Find zlib using cmake find_library. How should this be implemented?
|
# Find zlib using cmake find_library. How should this be implemented?
|
||||||
# FIND_LIBRARY(NAMES z libz libz_debug PATHS ... NO_DEFAULT_PATH)
|
# FIND_LIBRARY(NAMES z libz libz_debug PATHS ... NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
|
||||||
|
if ("$ENV{CONDA_BUILD}" STREQUAL "")
|
||||||
|
# result of the HDF5 ctest package
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
set(zlib_post lib)
|
||||||
|
set(lib_ext lib)
|
||||||
|
else()
|
||||||
|
set(lib_ext a)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||||
|
set(debug_postfix "_debug")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
SET(HDF5_LIBRARIES
|
||||||
|
"${HDF5_LIBRARY_DIR}/libhdf5_cpp${debug_postfix}.${lib_ext}"
|
||||||
|
"${HDF5_LIBRARY_DIR}/libhdf5${debug_postfix}.${lib_ext}"
|
||||||
|
"${HDF5_LIBRARY_DIR}/libz${zlib_post}${debug_postfix}.${lib_ext}"
|
||||||
|
"${HDF5_LIBRARY_DIR}/libsz${debug_postfix}.${lib_ext}"
|
||||||
|
"${HDF5_LIBRARY_DIR}/libaec${debug_postfix}.${lib_ext}"
|
||||||
|
)
|
||||||
|
|
||||||
|
ELSE()
|
||||||
|
MESSAGE(STATUS "Packaging hdf5 and zlib for conda distribution")
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
# Windows
|
# Windows
|
||||||
set(zlib_post zlib)
|
set(zlib_post zlib)
|
||||||
@@ -458,28 +483,15 @@ if(HDF5_SUPPORT)
|
|||||||
set(lib_ext so)
|
set(lib_ext so)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ("$ENV{CONDA_BUILD}" STREQUAL "")
|
|
||||||
if (WIN32)
|
|
||||||
# Should we use dynamic dll for windows also?
|
|
||||||
#set(lib_ext dll)
|
|
||||||
else()
|
|
||||||
set(lib_ext a)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
|
||||||
set(debug_postfix "_debug")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
SET(HDF5_LIBRARIES
|
SET(HDF5_LIBRARIES
|
||||||
"${HDF5_LIBRARY_DIR}/libhdf5_cpp${debug_postfix}.${lib_ext}"
|
"${HDF5_LIBRARY_DIR}/libhdf5_cpp.${lib_ext}"
|
||||||
"${HDF5_LIBRARY_DIR}/libhdf5${debug_postfix}.${lib_ext}"
|
"${HDF5_LIBRARY_DIR}/libhdf5.${lib_ext}"
|
||||||
"${HDF5_LIBRARY_DIR}/${zlib_post}${debug_postfix}.${lib_ext}"
|
"${HDF5_LIBRARY_DIR}/${zlib_post}.${lib_ext}"
|
||||||
# "${HDF5_LIBRARY_DIR}/libsz${debug_postfix}.${lib_ext}"
|
|
||||||
# "${HDF5_LIBRARY_DIR}/libaec${debug_postfix}.${lib_ext}"
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT HDF5_LIBRARIES)
|
if (NOT HDF5_LIBRARIES)
|
||||||
# debian default
|
# debian default
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user