mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 11:18:18 +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
+1
-14
@@ -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)
|
|
||||||
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)
|
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})
|
||||||
|
|
||||||
endif()
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
else()
|
||||||
|
message(STATUS "Autodesk 3ds Max SDK not found, is required to build IFCMax.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user