fixed the broken cmake config files (assimp-cmake), adding version suffix libraries
parent
de7b1aaa50
commit
16744d78d7
|
@ -2,10 +2,9 @@ cmake_minimum_required( VERSION 2.6 )
|
|||
PROJECT( Assimp )
|
||||
|
||||
# Define here the needed parameters
|
||||
set (ASSIMP_SV_REVISION 1264)
|
||||
set (ASSIMP_VERSION_MAJOR 3)
|
||||
set (ASSIMP_VERSION_MINOR 0)
|
||||
set (ASSIMP_VERSION_PATCH ${ASSIMP_SV_REVISION}) # subversion revision?
|
||||
set (ASSIMP_VERSION_PATCH 1) # subversion revision?
|
||||
set (ASSIMP_VERSION ${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH})
|
||||
set (ASSIMP_SOVERSION 3)
|
||||
SET ( PROJECT_VERSION "${ASSIMP_VERSION}" )
|
||||
|
@ -14,9 +13,10 @@ set(ASSIMP_PACKAGE_VERSION "0" CACHE STRING "the package-specific version used f
|
|||
|
||||
option(ASSIMP_OPT_BUILD_PACKAGES "Set to ON to generate CPack configuration files and packaging targets" OFF)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
|
||||
set(LIBASSIMP_COMPONENT libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}-r${ASSIMP_SV_REVISION})
|
||||
set(LIBASSIMP-DEV_COMPONENT libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}-r${ASSIMP_SV_REVISION}-dev)
|
||||
set(LIBASSIMP_COMPONENT libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH})
|
||||
set(LIBASSIMP-DEV_COMPONENT libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH}-dev)
|
||||
set(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} ${LIBASSIMP-DEV_COMPONENT} assimp-dev)
|
||||
set(ASSIMP_LIBRARY_SUFFIX "${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" CACHE STRING "Suffix to append to library names")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions(-fPIC) # this is a very important switch and some libraries seem now to have it....
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
set( ASSIMP_PACKAGE_VERSION "@ASSIMP_VERSION@" )
|
||||
if( "${ASSIMP_PACKAGE_FIND_VERSION}" VERSION_EQUAL "@ASSIMP_VERSION@")
|
||||
set(ASSIMP_PACKAGE_VERSION_EXACT 1)
|
||||
set( PACKAGE_VERSION "@ASSIMP_VERSION@" )
|
||||
if( "${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@ASSIMP_VERSION@")
|
||||
set(PACKAGE_VERSION_EXACT 1)
|
||||
endif()
|
||||
if( "${ASSIMP_PACKAGE_FIND_VERSION_MAJOR}.${ASSIMP_PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_SOVERSION@" )
|
||||
set(ASSIMP_PACKAGE_VERSION_COMPATIBLE 1)
|
||||
elseif( "${ASSIMP_PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@ASSIMP_VERSION_MAJOR@" )
|
||||
if( "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_SOVERSION@" )
|
||||
set(PACKAGE_VERSION_COMPATIBLE 1)
|
||||
elseif( "${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@ASSIMP_VERSION_MAJOR@" )
|
||||
# for now backward compatible if minor version is less
|
||||
if( ${ASSIMP_PACKAGE_FIND_VERSION_MINOR} LESS @ASSIMP_VERSION_MINOR@ )
|
||||
set(ASSIMP_PACKAGE_VERSION_COMPATIBLE 1)
|
||||
if( ${PACKAGE_FIND_VERSION_MINOR} LESS @ASSIMP_VERSION_MINOR@ )
|
||||
set(PACKAGE_VERSION_COMPATIBLE 1)
|
||||
endif()
|
||||
endif()
|
||||
set( ASSIMP_STATIC_LIB "@ASSIMP_BUILD_STATIC_LIB@")
|
||||
|
|
|
@ -37,8 +37,8 @@ if( WIN32 )
|
|||
set( ASSIMP_CXX_FLAGS " -DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB")
|
||||
endif()
|
||||
set( ASSIMP_LINK_FLAGS "" )
|
||||
set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}/@LIB_INSTALL_DIR@")
|
||||
set( ASSIMP_INCLUDE_DIRS "${ASSIMP_ROOT_DIR}/@INCLUDE_INSTALL_DIR@")
|
||||
set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_LIB_INSTALL_DIR@")
|
||||
set( ASSIMP_INCLUDE_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_INCLUDE_INSTALL_DIR@")
|
||||
set( ASSIMP_LIBRARIES assimp${ASSIMP_LIBRARY_SUFFIX})
|
||||
|
||||
# the boost version assimp was compiled with
|
||||
|
|
|
@ -696,6 +696,7 @@ TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES})
|
|||
SET_TARGET_PROPERTIES( assimp PROPERTIES
|
||||
VERSION ${ASSIMP_VERSION}
|
||||
SOVERSION ${ASSIMP_SOVERSION} # use full version
|
||||
OUTPUT_NAME assimp${ASSIMP_LIBRARY_SUFFIX}
|
||||
)
|
||||
# Build against external unzip, or add ../contrib/unzip so
|
||||
# assimp can #include "unzip.h"
|
||||
|
|
Loading…
Reference in New Issue