2012-06-05 19:30:45 +00:00
|
|
|
# - Find Assimp Installation
|
|
|
|
#
|
|
|
|
# Users can set the following variables before calling the module:
|
|
|
|
# ASSIMP_DIR - The preferred installation prefix for searching for ASSIMP. Set by the user.
|
|
|
|
#
|
|
|
|
# ASSIMP_ROOT_DIR - the root directory where the installation can be found
|
|
|
|
# ASSIMP_CXX_FLAGS - extra flags for compilation
|
|
|
|
# ASSIMP_LINK_FLAGS - extra flags for linking
|
|
|
|
# ASSIMP_INCLUDE_DIRS - include directories
|
|
|
|
# ASSIMP_LIBRARY_DIRS - link directories
|
|
|
|
# ASSIMP_LIBRARIES - libraries to link plugins with
|
|
|
|
# ASSIMP_Boost_VERSION - the boost version assimp was compiled with
|
|
|
|
get_filename_component(_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
|
|
get_filename_component(_PREFIX "${_PREFIX}" PATH)
|
|
|
|
get_filename_component(_PREFIX "${_PREFIX}" PATH)
|
|
|
|
get_filename_component(ASSIMP_ROOT_DIR "${_PREFIX}" PATH)
|
|
|
|
|
|
|
|
if( MSVC )
|
|
|
|
# in order to prevent DLL hell, each of the DLLs have to be suffixed with the major version and msvc prefix
|
|
|
|
if( MSVC70 OR MSVC71 )
|
|
|
|
set(MSVC_PREFIX "vc70")
|
|
|
|
elseif( MSVC80 )
|
|
|
|
set(MSVC_PREFIX "vc80")
|
|
|
|
elseif( MSVC90 )
|
|
|
|
set(MSVC_PREFIX "vc90")
|
2015-02-08 11:26:29 +00:00
|
|
|
elseif( MSVC10 )
|
2012-06-05 19:30:45 +00:00
|
|
|
set(MSVC_PREFIX "vc100")
|
2015-02-08 11:26:29 +00:00
|
|
|
elseif( MSVC11 )
|
|
|
|
set(MSVC_PREFIX "vc110")
|
|
|
|
elseif( MSVC12 )
|
|
|
|
set(MSVC_PREFIX "vc120")
|
2015-12-09 20:58:29 +00:00
|
|
|
elseif( MSVC14 )
|
|
|
|
set(MSVC_PREFIX "vc140")
|
2015-02-08 11:26:29 +00:00
|
|
|
else()
|
2015-12-09 20:58:29 +00:00
|
|
|
set(MSVC_PREFIX "vc150")
|
2012-06-05 19:30:45 +00:00
|
|
|
endif()
|
2018-04-01 15:16:14 +00:00
|
|
|
set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the assimp windows library" )
|
2012-06-05 19:30:45 +00:00
|
|
|
else()
|
2018-04-01 15:16:14 +00:00
|
|
|
set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@" CACHE STRING "the suffix for the openrave libraries" )
|
2012-06-05 19:30:45 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set( ASSIMP_CXX_FLAGS ) # dynamically linked library
|
|
|
|
set( ASSIMP_LINK_FLAGS "" )
|
2013-02-26 05:02:35 +00:00
|
|
|
set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_LIB_INSTALL_DIR@")
|
|
|
|
set( ASSIMP_INCLUDE_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_INCLUDE_INSTALL_DIR@")
|
2012-07-11 12:53:04 +00:00
|
|
|
set( ASSIMP_LIBRARIES assimp${ASSIMP_LIBRARY_SUFFIX})
|
2015-01-23 18:10:36 +00:00
|
|
|
set( ASSIMP_LIBRARIES ${ASSIMP_LIBRARIES}@CMAKE_DEBUG_POSTFIX@)
|
2012-06-05 19:30:45 +00:00
|
|
|
|
2016-04-03 00:38:00 +00:00
|
|
|
# for compatibility with pkg-config
|
2012-06-05 19:30:45 +00:00
|
|
|
set(ASSIMP_CFLAGS_OTHER "${ASSIMP_CXX_FLAGS}")
|
|
|
|
set(ASSIMP_LDFLAGS_OTHER "${ASSIMP_LINK_FLAGS}")
|
|
|
|
|
|
|
|
MARK_AS_ADVANCED(
|
|
|
|
ASSIMP_ROOT_DIR
|
|
|
|
ASSIMP_CXX_FLAGS
|
|
|
|
ASSIMP_LINK_FLAGS
|
|
|
|
ASSIMP_INCLUDE_DIRS
|
|
|
|
ASSIMP_LIBRARIES
|
|
|
|
ASSIMP_CFLAGS_OTHER
|
|
|
|
ASSIMP_LDFLAGS_OTHER
|
|
|
|
ASSIMP_LIBRARY_SUFFIX
|
|
|
|
)
|