mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
Cmake find voxels
This commit is contained in:
+11
-2
@@ -43,6 +43,7 @@ OPTION(BUILD_GEOMSERVER "Build IfcGeomServer executable." ON)
|
|||||||
OPTION(BUILD_CONVERT "Build IfcConvert executable." ON)
|
OPTION(BUILD_CONVERT "Build IfcConvert executable." ON)
|
||||||
OPTION(USE_VLD "Use Visual Leak Detector for debugging memory leaks, MSVC-only." OFF)
|
OPTION(USE_VLD "Use Visual Leak Detector for debugging memory leaks, MSVC-only." OFF)
|
||||||
OPTION(USE_MMAP "Adds a command line options to parse IFC files from memory mapped files using Boost.Iostreams" OFF)
|
OPTION(USE_MMAP "Adds a command line options to parse IFC files from memory mapped files using Boost.Iostreams" OFF)
|
||||||
|
OPTION(USE_VOXELS "Use voxelized geometries as a fallback mechanism to calculate quantities in IfcGeomServer" OFF)
|
||||||
if (${HAS_MAX})
|
if (${HAS_MAX})
|
||||||
OPTION(BUILD_IFCMAX "Build IfcMax, a 3ds Max plug-in, Windows-only." ON)
|
OPTION(BUILD_IFCMAX "Build IfcMax, a 3ds Max plug-in, Windows-only." ON)
|
||||||
endif()
|
endif()
|
||||||
@@ -115,6 +116,8 @@ UNIFY_ENVVARS_AND_CACHE(GMP_INCLUDE_DIR)
|
|||||||
UNIFY_ENVVARS_AND_CACHE(GMP_LIBRARY_DIR)
|
UNIFY_ENVVARS_AND_CACHE(GMP_LIBRARY_DIR)
|
||||||
UNIFY_ENVVARS_AND_CACHE(MPFR_INCLUDE_DIR)
|
UNIFY_ENVVARS_AND_CACHE(MPFR_INCLUDE_DIR)
|
||||||
UNIFY_ENVVARS_AND_CACHE(MPFR_LIBRARY_DIR)
|
UNIFY_ENVVARS_AND_CACHE(MPFR_LIBRARY_DIR)
|
||||||
|
UNIFY_ENVVARS_AND_CACHE(VOXEL_INCLUDE_DIR)
|
||||||
|
UNIFY_ENVVARS_AND_CACHE(VOXEL_LIBRARY_DIR)
|
||||||
|
|
||||||
if (GLTF_SUPPORT)
|
if (GLTF_SUPPORT)
|
||||||
UNIFY_ENVVARS_AND_CACHE(JSON_INCLUDE_DIR)
|
UNIFY_ENVVARS_AND_CACHE(JSON_INCLUDE_DIR)
|
||||||
@@ -172,6 +175,12 @@ if (IFCXML_SUPPORT)
|
|||||||
add_definitions(-DWITH_IFCXML)
|
add_definitions(-DWITH_IFCXML)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (USE_VOXELS)
|
||||||
|
FIND_LIBRARY(libvoxel NAMES voxel libvoxel PATHS ${VOXEL_LIBRARY_DIR} NO_DEFAULT_PATH)
|
||||||
|
FIND_LIBRARY(libvoxec NAMES voxec libvoxec PATHS ${VOXEL_LIBRARY_DIR} NO_DEFAULT_PATH)
|
||||||
|
set(VOXEL_LIBRARIES ${libvoxel} ${libvoxec})
|
||||||
|
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}")
|
||||||
@@ -497,7 +506,7 @@ endif()
|
|||||||
|
|
||||||
INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${OCC_INCLUDE_DIR} ${OPENCOLLADA_INCLUDE_DIRS}
|
INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${OCC_INCLUDE_DIR} ${OPENCOLLADA_INCLUDE_DIRS}
|
||||||
${Boost_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR} ${JSON_INCLUDE_DIR}
|
${Boost_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR} ${JSON_INCLUDE_DIR}
|
||||||
${CGAL_INCLUDE_DIR} ${GMP_INCLUDE_DIR} ${MPFR_INCLUDE_DIR}
|
${CGAL_INCLUDE_DIR} ${GMP_INCLUDE_DIR} ${MPFR_INCLUDE_DIR} ${VOXEL_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
function(files_for_ifc_version IFC_VERSION RESULT_NAME)
|
function(files_for_ifc_version IFC_VERSION RESULT_NAME)
|
||||||
@@ -688,7 +697,7 @@ file(GLOB CPP_FILES ../src/ifcgeomserver/*.cpp)
|
|||||||
file(GLOB H_FILES ../src/ifcgeomserver/*.h)
|
file(GLOB H_FILES ../src/ifcgeomserver/*.h)
|
||||||
set(SOURCE_FILES ${CPP_FILES} ${H_FILES})
|
set(SOURCE_FILES ${CPP_FILES} ${H_FILES})
|
||||||
ADD_EXECUTABLE(IfcGeomServer ${SOURCE_FILES})
|
ADD_EXECUTABLE(IfcGeomServer ${SOURCE_FILES})
|
||||||
TARGET_LINK_LIBRARIES(IfcGeomServer ${IFCOPENSHELL_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${Boost_LIBRARIES})
|
TARGET_LINK_LIBRARIES(IfcGeomServer ${IFCOPENSHELL_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${Boost_LIBRARIES} ${VOXEL_LIBRARIES})
|
||||||
|
|
||||||
if ((NOT WIN32) AND BUILD_SHARED_LIBS)
|
if ((NOT WIN32) AND BUILD_SHARED_LIBS)
|
||||||
SET_INSTALL_RPATHS(IfcGeomServer "${IFCOPENSHELL_LIBARY_DIR};${OCC_LIBRARY_DIR};${Boost_LIBRARY_DIRS}")
|
SET_INSTALL_RPATHS(IfcGeomServer "${IFCOPENSHELL_LIBARY_DIR};${OCC_LIBRARY_DIR};${Boost_LIBRARY_DIRS}")
|
||||||
|
|||||||
+5
-1
@@ -84,6 +84,8 @@ set GMP_INCLUDE_DIR=%INSTALL_DIR%\mpir
|
|||||||
set GMP_LIBRARY_DIR=%INSTALL_DIR%\mpir
|
set GMP_LIBRARY_DIR=%INSTALL_DIR%\mpir
|
||||||
set MPFR_INCLUDE_DIR=%INSTALL_DIR%\mpfr
|
set MPFR_INCLUDE_DIR=%INSTALL_DIR%\mpfr
|
||||||
set MPFR_LIBRARY_DIR=%INSTALL_DIR%\mpfr
|
set MPFR_LIBRARY_DIR=%INSTALL_DIR%\mpfr
|
||||||
|
set VOXEL_INCLUDE_DIR=%INSTALL_DIR%\voxel\include
|
||||||
|
set VOXEL_LIBRARY_DIR=%INSTALL_DIR%\voxel\lib
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
call cecho.cmd 0 10 "Script configuration:"
|
call cecho.cmd 0 10 "Script configuration:"
|
||||||
@@ -111,6 +113,8 @@ echo GMP_INCLUDE_DIR = %GMP_INCLUDE_DIR%
|
|||||||
echo GMP_LIBRARY_DIR = %GMP_LIBRARY_DIR%
|
echo GMP_LIBRARY_DIR = %GMP_LIBRARY_DIR%
|
||||||
echo MPFR_INCLUDE_DIR = %MPFR_INCLUDE_DIR%
|
echo MPFR_INCLUDE_DIR = %MPFR_INCLUDE_DIR%
|
||||||
echo MPFR_LIBRARY_DIR = %MPFR_LIBRARY_DIR%
|
echo MPFR_LIBRARY_DIR = %MPFR_LIBRARY_DIR%
|
||||||
|
echo VOXEL_INCLUDE_DIR = %VOXEL_INCLUDE_DIR%
|
||||||
|
echo VOXEL_LIBRARY_DIR = %VOXEL_LIBRARY_DIR%
|
||||||
echo.
|
echo.
|
||||||
echo CMAKE_INSTALL_PREFIX = %CMAKE_INSTALL_PREFIX%
|
echo CMAKE_INSTALL_PREFIX = %CMAKE_INSTALL_PREFIX%
|
||||||
echo.
|
echo.
|
||||||
@@ -119,7 +123,7 @@ set CMAKELISTS_DIR=..\cmake
|
|||||||
:: Delete CMakeCache.txt if command-line options were provided for this batch script.
|
:: Delete CMakeCache.txt if command-line options were provided for this batch script.
|
||||||
if not (%1)==() if exist CMakeCache.txt. del /Q CMakeCache.txt
|
if not (%1)==() if exist CMakeCache.txt. del /Q CMakeCache.txt
|
||||||
call cecho.cmd 0 13 "Running CMake for %PROJECT_NAME%."
|
call cecho.cmd 0 13 "Running CMake for %PROJECT_NAME%."
|
||||||
cmake.exe %CMAKELISTS_DIR% -G %GENERATOR% -DCMAKE_INSTALL_PREFIX="%CMAKE_INSTALL_PREFIX%" %ARGUMENTS%
|
cmake.exe %CMAKELISTS_DIR% -G %GENERATOR% -DCMAKE_INSTALL_PREFIX="%CMAKE_INSTALL_PREFIX%" -DUSE_VOXELS=On %ARGUMENTS%
|
||||||
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
|
|||||||
Reference in New Issue
Block a user