add some ASSIMP_INSTALL checks (#5545)
parent
85f084a4ce
commit
b71b8f77ee
|
@ -452,6 +452,7 @@ configure_package_config_file(
|
||||||
INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
|
INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(ASSIMP_INSTALL)
|
||||||
install(
|
install(
|
||||||
FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}"
|
FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}"
|
||||||
DESTINATION "${CONFIG_INSTALL_DIR}"
|
DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||||
|
@ -464,6 +465,7 @@ install(
|
||||||
DESTINATION "${CONFIG_INSTALL_DIR}"
|
DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||||
COMPONENT ${LIBASSIMP-DEV_COMPONENT}
|
COMPONENT ${LIBASSIMP-DEV_COMPONENT}
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
IF( ASSIMP_BUILD_DOCS )
|
IF( ASSIMP_BUILD_DOCS )
|
||||||
ADD_SUBDIRECTORY(doc)
|
ADD_SUBDIRECTORY(doc)
|
||||||
|
@ -481,7 +483,7 @@ IF(ASSIMP_HUNTER_ENABLED)
|
||||||
set(ASSIMP_BUILD_MINIZIP TRUE)
|
set(ASSIMP_BUILD_MINIZIP TRUE)
|
||||||
ELSE()
|
ELSE()
|
||||||
# If the zlib is already found outside, add an export in case assimpTargets can't find it.
|
# If the zlib is already found outside, add an export in case assimpTargets can't find it.
|
||||||
IF( ZLIB_FOUND )
|
IF( ZLIB_FOUND AND ASSIMP_INSTALL)
|
||||||
INSTALL( TARGETS zlib zlibstatic
|
INSTALL( TARGETS zlib zlibstatic
|
||||||
EXPORT "${TARGETS_EXPORT_NAME}")
|
EXPORT "${TARGETS_EXPORT_NAME}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -705,6 +707,7 @@ ELSE()
|
||||||
set(draco_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/draco/src")
|
set(draco_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/draco/src")
|
||||||
|
|
||||||
# This is probably wrong
|
# This is probably wrong
|
||||||
|
if (ASSIMP_INSTALL)
|
||||||
INSTALL( TARGETS ${draco_LIBRARIES}
|
INSTALL( TARGETS ${draco_LIBRARIES}
|
||||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||||
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||||
|
@ -714,6 +717,7 @@ ELSE()
|
||||||
COMPONENT ${LIBASSIMP_COMPONENT}
|
COMPONENT ${LIBASSIMP_COMPONENT}
|
||||||
INCLUDES DESTINATION include
|
INCLUDES DESTINATION include
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
|
@ -1400,7 +1400,7 @@ IF (RT_FOUND AND ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC)
|
||||||
TARGET_LINK_LIBRARIES(assimp rt)
|
TARGET_LINK_LIBRARIES(assimp rt)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
|
IF(ASSIMP_INSTALL)
|
||||||
INSTALL( TARGETS assimp
|
INSTALL( TARGETS assimp
|
||||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||||
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR} COMPONENT ${LIBASSIMP_COMPONENT}
|
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR} COMPONENT ${LIBASSIMP_COMPONENT}
|
||||||
|
@ -1411,8 +1411,9 @@ INSTALL( TARGETS assimp
|
||||||
)
|
)
|
||||||
INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev)
|
INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev)
|
||||||
INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev)
|
INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
if (ASSIMP_ANDROID_JNIIOSYSTEM)
|
if (ASSIMP_ANDROID_JNIIOSYSTEM AND ASSIMP_INSTALL)
|
||||||
INSTALL(FILES ${HEADER_PATH}/${ASSIMP_ANDROID_JNIIOSYSTEM_PATH}/AndroidJNIIOSystem.h
|
INSTALL(FILES ${HEADER_PATH}/${ASSIMP_ANDROID_JNIIOSYSTEM_PATH}/AndroidJNIIOSystem.h
|
||||||
DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}
|
DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}
|
||||||
COMPONENT assimp-dev)
|
COMPONENT assimp-dev)
|
||||||
|
|
|
@ -198,9 +198,11 @@ endif(MINGW)
|
||||||
|
|
||||||
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||||
|
|
||||||
|
IF(ASSIMP_INSTALL)
|
||||||
INSTALL( TARGETS zlibstatic
|
INSTALL( TARGETS zlibstatic
|
||||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||||
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||||
ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||||
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR}
|
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR}
|
||||||
COMPONENT ${LIBASSIMP_COMPONENT})
|
COMPONENT ${LIBASSIMP_COMPONENT})
|
||||||
|
ENDIF()
|
||||||
|
|
Loading…
Reference in New Issue