CMake: Fixed building tools when the Boost headers are not in the default include path; fixed pkg-config file installation for out-of-source builds.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@802 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
9d70caef0a
commit
b0196db29f
|
@ -21,14 +21,33 @@ SET( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH
|
|||
SET( BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH
|
||||
"Path the tool executables are installed to." )
|
||||
|
||||
CONFIGURE_FILE (assimp.pc.in assimp.pc @ONLY )
|
||||
INSTALL( FILES assimp.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/ )
|
||||
# Generate a pkg-config .pc for the Assimp library.
|
||||
CONFIGURE_FILE( "${CMAKE_SOURCE_DIR}/assimp.pc.in" "${CMAKE_BINARY_DIR}/assimp.pc" @ONLY )
|
||||
INSTALL( FILES "${CMAKE_BINARY_DIR}/assimp.pc" DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/ )
|
||||
|
||||
# Globally enbale Boost resp. the Boost workaround – it is also needed by the
|
||||
# tools which include the Assimp headers.
|
||||
IF ( ENABLE_BOOST_WORKAROUND )
|
||||
INCLUDE_DIRECTORIES( BoostWorkaround )
|
||||
ADD_DEFINITIONS( -DASSIMP_BUILD_BOOST_WORKAROUND )
|
||||
MESSAGE( STATUS "Building a non-boost version of Assimp." )
|
||||
ELSE ( ENABLE_BOOST_WORKAROUND )
|
||||
FIND_PACKAGE( Boost 1.35 )
|
||||
|
||||
IF ( NOT Boost_FOUND )
|
||||
MESSAGE( FATAL_ERROR
|
||||
"Boost libraries (http://www.boost.org/) not found. "
|
||||
"You can build a non-boost version of Assimp with slightly reduced "
|
||||
"functionality by specifying -DENABLE_BOOST_WORKAROUND=ON."
|
||||
)
|
||||
ENDIF ( NOT Boost_FOUND )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} )
|
||||
ENDIF ( ENABLE_BOOST_WORKAROUND )
|
||||
|
||||
# Libs
|
||||
ADD_SUBDIRECTORY( code/ )
|
||||
IF ( WIN32 )
|
||||
ADD_SUBDIRECTORY( test/ )
|
||||
ADD_SUBDIRECTORY( tools/assimp_view/ )
|
||||
ENDIF ( WIN32 )
|
||||
|
||||
ADD_SUBDIRECTORY( tools/assimp_cmd/ )
|
||||
|
|
Loading…
Reference in New Issue