mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
run-cmake.bat - use cgal config instead of explicit paths
This commit is contained in:
@@ -197,11 +197,6 @@ foreach(option_flag IN LISTS option_flags)
|
|||||||
convert_env_var_to_bool("${option_flag}")
|
convert_env_var_to_bool("${option_flag}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(WITH_CGAL)
|
|
||||||
find_package(CGAL REQUIRED)
|
|
||||||
set(CGAL_LIBRARIES CGAL::CGAL_INTERFACE)
|
|
||||||
list(APPEND GEOMETRY_KERNELS cgal)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(BUILD_IFCGEOM AND WITH_OPENCASCADE)
|
if(BUILD_IFCGEOM AND WITH_OPENCASCADE)
|
||||||
find_package(OpenCASCADE REQUIRED)
|
find_package(OpenCASCADE REQUIRED)
|
||||||
@@ -306,6 +301,15 @@ if(USE_MMAP)
|
|||||||
add_definitions(-DUSE_MMAP)
|
add_definitions(-DUSE_MMAP)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Handle CGAL after Boost settings are set, since CGAL will use them too.
|
||||||
|
# Do `find_package(Boost)` only after this, to make sure `FindBoost` finds correct components.
|
||||||
|
# Otherwise it will find components needed for CGAL and we might some libraries.
|
||||||
|
if(WITH_CGAL)
|
||||||
|
find_package(CGAL REQUIRED)
|
||||||
|
set(CGAL_LIBRARIES CGAL::CGAL_INTERFACE)
|
||||||
|
list(APPEND GEOMETRY_KERNELS cgal)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||||
message(STATUS "Boost include files found in ${Boost_INCLUDE_DIRS}")
|
message(STATUS "Boost include files found in ${Boost_INCLUDE_DIRS}")
|
||||||
message(STATUS "Boost libraries found in ${Boost_LIBRARY_DIRS}")
|
message(STATUS "Boost libraries found in ${Boost_LIBRARY_DIRS}")
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ else()
|
|||||||
else()
|
else()
|
||||||
set(CGAL_Boost_USE_STATIC_LIBS "${Boost_USE_STATIC_LIBS}")
|
set(CGAL_Boost_USE_STATIC_LIBS "${Boost_USE_STATIC_LIBS}")
|
||||||
endif()
|
endif()
|
||||||
|
# Annoyingly this is producing CMP0167 boost warnings, because it's unsetting cmake policies
|
||||||
|
# and using FindBoost module. But there's nothing we can do about it,
|
||||||
|
# since everything happens in the scope of CGAL config. I guess it's be resolved in CGAL 6.1.0.
|
||||||
find_package(CGAL CONFIG)
|
find_package(CGAL CONFIG)
|
||||||
if(NOT CGAL_FOUND)
|
if(NOT CGAL_FOUND)
|
||||||
message(
|
message(
|
||||||
|
|||||||
+8
-12
@@ -107,12 +107,9 @@ if not defined SWIG_INSTALL_DIR set SWIG_INSTALL_DIR=%INSTALL_DIR%\swigwin
|
|||||||
set JSON_INCLUDE_DIR=%INSTALL_DIR%\json
|
set JSON_INCLUDE_DIR=%INSTALL_DIR%\json
|
||||||
if not defined ADD_COMMIT_SHA set ADD_COMMIT_SHA=Off
|
if not defined ADD_COMMIT_SHA set ADD_COMMIT_SHA=Off
|
||||||
|
|
||||||
set CGAL_INCLUDE_DIR=%INSTALL_DIR%\cgal\include
|
set CGAL_INSTALL_DIR=%INSTALL_DIR%\cgal
|
||||||
:: set CGAL_LIBRARY_DIR=%INSTALL_DIR%\cgal\lib
|
set GMP_INSTALL_DIR=%INSTALL_DIR%\mpir
|
||||||
set GMP_INCLUDE_DIR=%INSTALL_DIR%\mpir
|
set MPFR_INSTALL_DIR=%INSTALL_DIR%\mpfr
|
||||||
set GMP_LIBRARY_DIR=%INSTALL_DIR%\mpir
|
|
||||||
set MPFR_INCLUDE_DIR=%INSTALL_DIR%\mpfr
|
|
||||||
set MPFR_LIBRARY_DIR=%INSTALL_DIR%\mpfr
|
|
||||||
:: We don't install Eigen currently,
|
:: We don't install Eigen currently,
|
||||||
:: so there's no Eigen3config.cmake and therefore we provide path explicitly.
|
:: so there's no Eigen3config.cmake and therefore we provide path explicitly.
|
||||||
set EIGEN_DIR=%INSTALL_DIR%\Eigen
|
set EIGEN_DIR=%INSTALL_DIR%\Eigen
|
||||||
@@ -146,12 +143,10 @@ echo PYTHON_EXECUTABLE = %PYTHON_EXECUTABLE%
|
|||||||
echo SWIG_INSTALL_DIR = %SWIG_INSTALL_DIR%
|
echo SWIG_INSTALL_DIR = %SWIG_INSTALL_DIR%
|
||||||
echo JSON_INCLUDE_DIR = %JSON_INCLUDE_DIR%
|
echo JSON_INCLUDE_DIR = %JSON_INCLUDE_DIR%
|
||||||
echo.
|
echo.
|
||||||
echo CGAL_INCLUDE_DIR = %CGAL_INCLUDE_DIR%
|
echo CGAL_INSTALL_DIR = %CGAL_INSTALL_DIR%
|
||||||
:: echo CGAL_LIBRARY_DIR = %CGAL_LIBRARY_DIR%
|
:: echo CGAL_LIBRARY_DIR = %CGAL_LIBRARY_DIR%
|
||||||
echo GMP_INCLUDE_DIR = %GMP_INCLUDE_DIR%
|
echo GMP_INSTALL_DIR = %GMP_INSTALL_DIR%
|
||||||
echo GMP_LIBRARY_DIR = %GMP_LIBRARY_DIR%
|
echo MPFR_INSTALL_DIR = %MPFR_INSTALL_DIR%
|
||||||
echo MPFR_INCLUDE_DIR = %MPFR_INCLUDE_DIR%
|
|
||||||
echo MPFR_LIBRARY_DIR = %MPFR_LIBRARY_DIR%
|
|
||||||
echo EIGEN_DIR = %EIGEN_DIR%
|
echo EIGEN_DIR = %EIGEN_DIR%
|
||||||
echo TBB_INSTALL_DIR = %TBB_INSTALL_DIR%
|
echo TBB_INSTALL_DIR = %TBB_INSTALL_DIR%
|
||||||
echo USD_INSTALL_DIR = %USD_INSTALL_DIR%
|
echo USD_INSTALL_DIR = %USD_INSTALL_DIR%
|
||||||
@@ -171,7 +166,8 @@ set CMAKE_PREFIX_PATH=%HDF5_INSTALL_DIR%;%OPENCOLLADA_INSTALL_DIR%;%SWIG_INSTALL
|
|||||||
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH%;%ROCKSDB_INSTALL_DIR%;%ZSTD_INSTALL_DIR%
|
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH%;%ROCKSDB_INSTALL_DIR%;%ZSTD_INSTALL_DIR%
|
||||||
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH%;%BOOST_INSTALL_DIR%;%CCACHE_INSTALL_DIR%
|
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH%;%BOOST_INSTALL_DIR%;%CCACHE_INSTALL_DIR%
|
||||||
set CMake_PREFIX_PATH=%CMAKE_PREFIX_PATH%;%USD_INSTALL_DIR%;%TBB_INSTALL_DIR%
|
set CMake_PREFIX_PATH=%CMAKE_PREFIX_PATH%;%USD_INSTALL_DIR%;%TBB_INSTALL_DIR%
|
||||||
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH%;%OCC_INSTALL_DIR%
|
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH%;%OCC_INSTALL_DIR%;%CGAL_INSTALL_DIR%
|
||||||
|
set CMAKE_PREFIX_PATH=%CMAKE_PREFIX_PATH%;%GMP_INSTALL_DIR%;%MPFR_INSTALL_DIR%
|
||||||
|
|
||||||
:: Not fully supported - not available from install-ifcopenshell
|
:: Not fully supported - not available from install-ifcopenshell
|
||||||
:: and some logs are still showing Visual Studio generators.
|
:: and some logs are still showing Visual Studio generators.
|
||||||
|
|||||||
Reference in New Issue
Block a user