mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 02:40:59 +00:00
cmake: move check fo 3ds max sdk to external file
This commit is contained in:
committed by
Thomas Krijnen
parent
5582bb2d4c
commit
addacd9ce5
+24
-37
@@ -883,13 +883,13 @@ if(BUILD_IFCGEOM)
|
|||||||
file(GLOB IFCGEOM_CPP_FILES ../src/ifcgeom/*.cpp)
|
file(GLOB IFCGEOM_CPP_FILES ../src/ifcgeom/*.cpp)
|
||||||
set(IFCGEOM_FILES ${IFCGEOM_CPP_FILES} ${IFCGEOM_H_FILES})
|
set(IFCGEOM_FILES ${IFCGEOM_CPP_FILES} ${IFCGEOM_H_FILES})
|
||||||
|
|
||||||
foreach(schema ${SCHEMA_VERSIONS})
|
foreach(schema ${SCHEMA_VERSIONS})
|
||||||
add_library(IfcGeom_ifc${schema} STATIC ${IFCGEOM_FILES})
|
add_library(IfcGeom_ifc${schema} STATIC ${IFCGEOM_FILES})
|
||||||
set_target_properties(IfcGeom_ifc${schema} PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS -DIfcSchema=Ifc${schema}")
|
set_target_properties(IfcGeom_ifc${schema} PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS -DIfcSchema=Ifc${schema}")
|
||||||
if (NOT WASM_BUILD)
|
if (NOT WASM_BUILD)
|
||||||
target_link_libraries(IfcGeom_ifc${schema} IfcParse ${OPENCASCADE_LIBRARIES})
|
target_link_libraries(IfcGeom_ifc${schema} IfcParse ${OPENCASCADE_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# IfcGeom (schema agnostic)
|
# IfcGeom (schema agnostic)
|
||||||
file(GLOB SCHEMA_AGNOSTIC_H_FILES ../src/ifcgeom_schema_agnostic/*.h)
|
file(GLOB SCHEMA_AGNOSTIC_H_FILES ../src/ifcgeom_schema_agnostic/*.h)
|
||||||
@@ -903,11 +903,11 @@ endforeach()
|
|||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WASM_BUILD)
|
if (WASM_BUILD)
|
||||||
target_link_libraries(IfcGeom ${IFCGEOM_SCHEMA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(IfcGeom ${IFCGEOM_SCHEMA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
else()
|
else()
|
||||||
target_link_libraries(IfcGeom IfcParse ${IFCGEOM_SCHEMA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(IfcGeom IfcParse ${IFCGEOM_SCHEMA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif(BUILD_IFCGEOM)
|
endif(BUILD_IFCGEOM)
|
||||||
|
|
||||||
@@ -920,16 +920,16 @@ if(BUILD_CONVERT OR BUILD_IFCPYTHON)
|
|||||||
file(GLOB SERIALIZERS_S_CPP_FILES ../src/serializers/schema_dependent/*.cpp)
|
file(GLOB SERIALIZERS_S_CPP_FILES ../src/serializers/schema_dependent/*.cpp)
|
||||||
set(SERIALIZERS_S_FILES ${SERIALIZERS_S_H_FILES} ${SERIALIZERS_S_CPP_FILES})
|
set(SERIALIZERS_S_FILES ${SERIALIZERS_S_H_FILES} ${SERIALIZERS_S_CPP_FILES})
|
||||||
|
|
||||||
foreach(schema ${SCHEMA_VERSIONS})
|
foreach(schema ${SCHEMA_VERSIONS})
|
||||||
add_library(Serializers_ifc${schema} STATIC ${SERIALIZERS_S_FILES})
|
add_library(Serializers_ifc${schema} STATIC ${SERIALIZERS_S_FILES})
|
||||||
set_target_properties(Serializers_ifc${schema} PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS -DIfcSchema=Ifc${schema}")
|
set_target_properties(Serializers_ifc${schema} PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS -DIfcSchema=Ifc${schema}")
|
||||||
|
|
||||||
if (WASM_BUILD)
|
if (WASM_BUILD)
|
||||||
target_link_libraries(Serializers_ifc${schema} ${HDF5_LIBRARIES})
|
target_link_libraries(Serializers_ifc${schema} ${HDF5_LIBRARIES})
|
||||||
else()
|
else()
|
||||||
target_link_libraries(Serializers_ifc${schema} IfcGeom ${OPENCASCADE_LIBRARIES} ${HDF5_LIBRARIES})
|
target_link_libraries(Serializers_ifc${schema} IfcGeom ${OPENCASCADE_LIBRARIES} ${HDF5_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
add_library(Serializers ${SERIALIZERS_FILES})
|
add_library(Serializers ${SERIALIZERS_FILES})
|
||||||
set_target_properties(Serializers PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS" VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
set_target_properties(Serializers PROPERTIES COMPILE_FLAGS "-DIFC_GEOM_EXPORTS" VERSION "${PROJECT_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||||
@@ -1027,21 +1027,8 @@ if(BUILD_EXAMPLES)
|
|||||||
add_subdirectory(../src/examples examples)
|
add_subdirectory(../src/examples examples)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT MINIMAL_BUILD AND BUILD_IFCMAX)
|
if(BUILD_IFCMAX)
|
||||||
foreach(max_year RANGE 2014 2030)
|
add_subdirectory(../src/ifcmax ifcmax)
|
||||||
set(max_sdk "$ENV{ADSK_3DSMAX_SDK_${max_year}}")
|
|
||||||
|
|
||||||
if(NOT "${max_sdk}" STREQUAL "")
|
|
||||||
message(STATUS "Autodesk 3ds Max SDK found at ${max_sdk}")
|
|
||||||
set(HAS_MAX TRUE)
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
if(HAS_MAX)
|
|
||||||
add_subdirectory(../src/ifcmax ifcmax)
|
|
||||||
else()
|
|
||||||
message(STATUS "Autodesk 3ds Max SDK not found, is required to build IFCMax.")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT MINIMAL_BUILD)
|
if(NOT MINIMAL_BUILD)
|
||||||
|
|||||||
@@ -16,9 +16,24 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||||
# #
|
# #
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
# check for 3ds Max SDK
|
||||||
foreach(max_year RANGE 2014 2030)
|
foreach(max_year RANGE 2014 2030)
|
||||||
set(max_sdk "$ENV{ADSK_3DSMAX_SDK_${max_year}}")
|
set(max_sdk "$ENV{ADSK_3DSMAX_SDK_${max_year}}")
|
||||||
if (NOT "${max_sdk}" STREQUAL "")
|
|
||||||
|
if(NOT "${max_sdk}" STREQUAL "")
|
||||||
|
message(STATUS "Autodesk 3ds Max SDK ${max_year} found at ${max_sdk}")
|
||||||
|
list(APPEND FOUND_MAX_YEARS ${max_year})
|
||||||
|
list(APPEND FOUND_MAX_SDKS ${max_sdk})
|
||||||
|
set(HAS_MAX TRUE)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(HAS_MAX)
|
||||||
|
# build libraray for each found 3ds Max SDK
|
||||||
|
foreach(max_year max_sdk IN ZIP_LISTS FOUND_MAX_YEARS FOUND_MAX_SDKS)
|
||||||
|
|
||||||
|
message(STATUS "Building IFCMax library for Autodesk 3ds Max SDK ${max_year}")
|
||||||
|
|
||||||
include_directories(${INCLUDE_DIRECTORIES} ${OCC_INCLUDE_DIR} ${OPENCOLLADA_INCLUDE_DIRS} ${ICU_INCLUDE_DIR}
|
include_directories(${INCLUDE_DIRECTORIES} ${OCC_INCLUDE_DIR} ${OPENCOLLADA_INCLUDE_DIRS} ${ICU_INCLUDE_DIR}
|
||||||
${Boost_INCLUDE_DIRS} ${max_sdk}/include
|
${Boost_INCLUDE_DIRS} ${max_sdk}/include
|
||||||
@@ -65,6 +80,8 @@ foreach(max_year RANGE 2014 2030)
|
|||||||
set_target_properties(IfcMax_${max_year} PROPERTIES SUFFIX ".dli")
|
set_target_properties(IfcMax_${max_year} PROPERTIES SUFFIX ".dli")
|
||||||
|
|
||||||
install(TARGETS IfcMax_${max_year} RUNTIME DESTINATION ${BINDIR})
|
install(TARGETS IfcMax_${max_year} RUNTIME DESTINATION ${BINDIR})
|
||||||
|
endforeach()
|
||||||
|
else()
|
||||||
|
message(STATUS "Autodesk 3ds Max SDK not found, is required to build IFCMax.")
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
Reference in New Issue
Block a user