mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 03:10:56 +00:00
Fix compilation
This commit is contained in:
+20
-8
@@ -391,23 +391,35 @@ if(HDF5_SUPPORT)
|
|||||||
ElSE()
|
ElSE()
|
||||||
SET(HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIR}" CACHE FILEPATH "HDF5 header files")
|
SET(HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIR}" CACHE FILEPATH "HDF5 header files")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
MESSAGE(STATUS "---------------------------------------------------------------------------------------------------------------------------")
|
||||||
|
|
||||||
|
MESSAGE(STATUS HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIR}")
|
||||||
IF("${HDF5_LIBRARY_DIR}" STREQUAL "")
|
IF("${HDF5_LIBRARY_DIR}" STREQUAL "")
|
||||||
MESSAGE(STATUS "No HDF5 library directory specified")
|
MESSAGE(STATUS "No HDF5 library directory specified")
|
||||||
ElSE()
|
ElSE()
|
||||||
SET(HDF5_LIBRARY_DIR "${HDF5_LIBRARY_DIR}" CACHE FILEPATH "HDF5 library files")
|
SET(HDF5_LIBRARY_DIR "${HDF5_LIBRARY_DIR}" CACHE FILEPATH "HDF5 library files")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
MESSAGE(STATUS HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIR}")
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
|
MESSAGE(STATUS "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
|
||||||
|
MESSAGE(STATUS HDF5_LIBRARY_DIR_DIR "${HDF5_LIBRARY_DIR}")
|
||||||
# An additional lib- prefix is added by HDF5 to denote static libraries
|
# An additional lib- prefix is added by HDF5 to denote static libraries
|
||||||
SET(HDF5_LIBRARIES
|
SET(HDF5_LIBRARIES
|
||||||
"${HDF5_LIBRARY_DIR}/libhdf5_cpp"
|
"${HDF5_LIBRARY_DIR}/libhdf5_cpp.lib"
|
||||||
"${HDF5_LIBRARY_DIR}/libhdf5"
|
"${HDF5_LIBRARY_DIR}/libhdf5.lib"
|
||||||
"${HDF5_LIBRARY_DIR}/libzlib")
|
"${HDF5_LIBRARY_DIR}/libzlib.lib"
|
||||||
|
"${HDF5_LIBRARY_DIR}/libsz.lib"
|
||||||
|
"${HDF5_LIBRARY_DIR}/libaec.lib")
|
||||||
ELSE()
|
ELSE()
|
||||||
|
MESSAGE(STATUS "NOT WIN 32 :)")
|
||||||
SET(HDF5_LIBRARIES
|
SET(HDF5_LIBRARIES
|
||||||
"${HDF5_LIBRARY_DIR}/hdf5_cpp"
|
"${HDF5_LIBRARY_DIR}/hdf5_cpp.lib"
|
||||||
"${HDF5_LIBRARY_DIR}/hdf5"
|
"${HDF5_LIBRARY_DIR}/hdf5.lib"
|
||||||
|
"${HDF5_LIBRARY_DIR}/libzlib.lib"
|
||||||
|
"${HDF5_LIBRARY_DIR}/libsz.lib"
|
||||||
|
"${HDF5_LIBRARY_DIR}/libaec.lib"
|
||||||
zlib)
|
zlib)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
endif()
|
endif()
|
||||||
@@ -653,7 +665,7 @@ set(IFCCONVERT_FILES ${IFCCONVERT_CPP_FILES} ${IFCCONVERT_H_FILES})
|
|||||||
ADD_EXECUTABLE(IfcConvert ${IFCCONVERT_FILES})
|
ADD_EXECUTABLE(IfcConvert ${IFCCONVERT_FILES})
|
||||||
set_target_properties(IfcConvert PROPERTIES COMPILE_FLAGS "${CONVERT_PRECISION}")
|
set_target_properties(IfcConvert PROPERTIES COMPILE_FLAGS "${CONVERT_PRECISION}")
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(IfcConvert ${IFCOPENSHELL_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${Boost_LIBRARIES} ${OPENCOLLADA_LIBRARIES})
|
TARGET_LINK_LIBRARIES(IfcConvert ${IFCOPENSHELL_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${Boost_LIBRARIES} ${OPENCOLLADA_LIBRARIES} ${HDF5_LIBRARIES})
|
||||||
|
|
||||||
if ((NOT WIN32) AND BUILD_SHARED_LIBS)
|
if ((NOT WIN32) AND BUILD_SHARED_LIBS)
|
||||||
# Only set RPATHs when building shared libraries (i.e. IfcParse and
|
# Only set RPATHs when building shared libraries (i.e. IfcParse and
|
||||||
|
|||||||
+2
-11
@@ -184,20 +184,11 @@ IF NOT %ERRORLEVEL%==0 GOTO :Error
|
|||||||
call :ExtractArchive %HDF5_CMAKE_ZIP% "%DEPS_DIR%" "%DEPS_DIR%\CMake-hdf5-%HDF5_VERSION%"
|
call :ExtractArchive %HDF5_CMAKE_ZIP% "%DEPS_DIR%" "%DEPS_DIR%\CMake-hdf5-%HDF5_VERSION%"
|
||||||
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
||||||
pushd "%DEPS_DIR%\CMake-hdf5-%HDF5_VERSION%"
|
pushd "%DEPS_DIR%\CMake-hdf5-%HDF5_VERSION%"
|
||||||
copy /y "%~dp0patches\HDF5config.cmake" HDF5config.cmake
|
|
||||||
copy /y "%~dp0patches\hdf5-src-CMakeLists.txt" hdf5-%HDF5_VERSION%\CMakeLists.txt
|
|
||||||
REM This will build ZLIB initially linking against dynamic runtime
|
|
||||||
ctest -S HDF5config.cmake,BUILD_GENERATOR=VS%VS_VER%%ARCH_BITS_64% -C %BUILD_CFG% -V -O hdf5.log
|
ctest -S HDF5config.cmake,BUILD_GENERATOR=VS%VS_VER%%ARCH_BITS_64% -C %BUILD_CFG% -V -O hdf5.log
|
||||||
call :ExtractArchive %HDF5_INSTALL_ZIP_NAME%.zip "%INSTALL_DIR%" "%INSTALL_DIR%\%HDF5_INSTALL_ZIP_NAME%"
|
call :ExtractArchive %HDF5_INSTALL_ZIP_NAME%.zip "%INSTALL_DIR%" "%INSTALL_DIR%\%HDF5_INSTALL_ZIP_NAME%"
|
||||||
pushd build\ZLIB-prefix\src\ZLIB
|
echo HDF5_VERSION=%HDF5_VERSION%>>"%~dp0\%BUILD_DEPS_CACHE_PATH%"
|
||||||
copy /y "%~dp0patches\hdf5-zlib-CMakeLists.txt" CMakeLists.txt
|
|
||||||
pushd ..\ZLIB-build
|
|
||||||
cmake ..\ZLIB "-DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%\%HDF5_INSTALL_ZIP_NAME%"
|
|
||||||
cmake --build . --config %BUILD_CFG% --target INSTALL
|
|
||||||
popd
|
|
||||||
popd
|
|
||||||
echo HDF5_VERSION=%HDF5_VERSION%>>"%~dp0\BuildDepsCache-%TARGET_ARCH%.txt"
|
|
||||||
popd
|
popd
|
||||||
|
goto :Successful
|
||||||
|
|
||||||
:: Note all of the dependencies have appropriate label so that user can easily skip something if wanted
|
:: Note all of the dependencies have appropriate label so that user can easily skip something if wanted
|
||||||
:: by modifying this file and using goto.
|
:: by modifying this file and using goto.
|
||||||
|
|||||||
Reference in New Issue
Block a user