adding assimp #3857
This commit is contained in:
parent
a57bd32cd2
commit
e2e0c38a21
|
@ -0,0 +1,50 @@
|
||||||
|
all: installed
|
||||||
|
|
||||||
|
REVISION=258
|
||||||
|
PACKAGE_NAME=`rospack find assimp`
|
||||||
|
# Regular download
|
||||||
|
TARBALL_NAME = assimp-r$(REVISION)
|
||||||
|
TARBALL = build/$(TARBALL_NAME).tar.gz
|
||||||
|
TARBALL_URL = http://pr.willowgarage.com/downloads/$(TARBALL_NAME).tar.gz
|
||||||
|
TARBALL_PATCH = assimp.patch
|
||||||
|
UNPACK_CMD = tar xzf
|
||||||
|
SOURCE_DIR = build/assimp_svn
|
||||||
|
include $(shell rospack find mk)/download_unpack_build.mk
|
||||||
|
|
||||||
|
# SVN checkout (only for package maintainers)
|
||||||
|
SVN_DIR = $(SOURCE_DIR)
|
||||||
|
#build/assimp_svn
|
||||||
|
SVN_REVISION = -r $(REVISION)
|
||||||
|
SVN_URL = https://assimp.svn.sourceforge.net/svnroot/assimp/trunk
|
||||||
|
include $(shell rospack find mk)/svn_checkout.mk
|
||||||
|
|
||||||
|
ASSIMP_DIR = $(shell rospack find assimp)
|
||||||
|
BOOST_INCLUDE_DIRS = $(shell rosboost-cfg --include_dirs)
|
||||||
|
BOOST_LIBRARY_DIRS = $(shell rosboost-cfg --lib_dirs signals,thread)
|
||||||
|
BOOST_LIBRARIES = $(shell rosboost-cfg --lflags signals,thread)
|
||||||
|
CMAKE_ARGS = -D CMAKE_INSTALL_PREFIX=$(PACKAGE_NAME) \
|
||||||
|
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
|
-D boost_include_dirs=$(BOOST_INCLUDE_DIRS) \
|
||||||
|
-D boost_library_dirs=$(BOOST_LIBRARY_DIRS) \
|
||||||
|
-D boost_libraries="$(BOOST_LIBRARIES)"
|
||||||
|
|
||||||
|
# Build tarball (only for package maintainers)
|
||||||
|
build_tarball: $(SVN_DIR)
|
||||||
|
-cd $(SVN_DIR)/build && make clean
|
||||||
|
-cd $(SVN_DIR) && rm -rf build
|
||||||
|
cd build && tar --exclude="test" --exclude="workspaces" --exclude="tools" --exclude="scripts" --exclude="samples" --exclude="port" --exclude="obj" --exclude="bin" --exclude=".svn" -czf ../$(TARBALL) assimp_svn
|
||||||
|
|
||||||
|
installed: $(SOURCE_DIR)/unpacked
|
||||||
|
cd $(SOURCE_DIR) && mkdir -p build && cd build && cmake $(CMAKE_ARGS) .. && export PARALLEL_JOBS=ROS_PARALLEL_JOBS && make $(ROS_PARALLEL_JOBS) && make install
|
||||||
|
mkdir -p $(PACKAGE_NAME)/include/assimp
|
||||||
|
cp -r $(SOURCE_DIR)/include/* $(PACKAGE_NAME)/include/assimp/
|
||||||
|
#touch installed
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-cd $(SVN_DIR)/build && make clean
|
||||||
|
-rm -f installed
|
||||||
|
-rm -rf include lib
|
||||||
|
|
||||||
|
wipe: clean
|
||||||
|
rm -rf build
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
Index: code/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- code/CMakeLists.txt (revision 526)
|
||||||
|
+++ code/CMakeLists.txt (working copy)
|
||||||
|
@@ -1,6 +1,16 @@
|
||||||
|
|
||||||
|
SET( HEADER_PATH ../include/ )
|
||||||
|
|
||||||
|
+message(status " debug: ${boost_include_dirs}" )
|
||||||
|
+INCLUDE_DIRECTORIES(
|
||||||
|
+ include
|
||||||
|
+ ${boost_include_dirs}
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
+LINK_DIRECTORIES(
|
||||||
|
+ ${boost_library_dirs}
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
SOURCE_GROUP( Logging FILES
|
||||||
|
${HEADER_PATH}/DefaultLogger.h
|
||||||
|
${HEADER_PATH}/IOStream.h
|
||||||
|
@@ -583,6 +593,10 @@
|
||||||
|
)
|
||||||
|
ADD_DEFINITIONS(-DASSIMP_BUILD_DLL_EXPORT)
|
||||||
|
|
||||||
|
+TARGET_LINK_LIBRARIES( assimp ${boost_libraries})
|
||||||
|
+
|
||||||
|
+INSTALL (TARGETS assimp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
|
+
|
||||||
|
if (WIN32)
|
||||||
|
if ( MSVC80 )
|
||||||
|
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
||||||
|
Index: CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- CMakeLists.txt (revision 526)
|
||||||
|
+++ CMakeLists.txt (working copy)
|
||||||
|
@@ -1,13 +1,24 @@
|
||||||
|
cmake_minimum_required( VERSION 2.6 )
|
||||||
|
PROJECT( AssetImporter )
|
||||||
|
|
||||||
|
+SET (boost_include_dirs "" CACHE STRING "Boost include paths. Use this to override automatic detection.")
|
||||||
|
+SET (boost_library_dirs "" CACHE STRING "Boost library paths. Use this to override automatic detection.")
|
||||||
|
+SET (boost_libraries "" CACHE STRING "Boost libraries. Use this to override automatic detection.")
|
||||||
|
+
|
||||||
|
+message(status " debug: ${boost_include_dirs}" )
|
||||||
|
+
|
||||||
|
SET( CMAKE_CURRENT_SOURCE_DIR ${CMAKE_HOME_DIRECTORY}/code )
|
||||||
|
SET( CMAKE_CURRENT_BINARY_DIR ${CMAKE_HOME_DIRECTORY}/bin )
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
include
|
||||||
|
+ ${boost_include_dirs}
|
||||||
|
)
|
||||||
|
|
||||||
|
+LINK_DIRECTORIES(
|
||||||
|
+ ${boost_library_dirs}
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/lib )
|
||||||
|
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/bin )
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<package>
|
||||||
|
<description brief="assimp">
|
||||||
|
|
||||||
|
Open Asset Import Library (Short name: Assimp) is a free library to import various well-known 3D model formats
|
||||||
|
into applications. The library has been designed for maximum stability and efficiency. Written in C++, it is
|
||||||
|
licensed under the BSD license. The API is provided for both C and C++. Wrappers for Python and D are available,
|
||||||
|
more bindings are in development.
|
||||||
|
|
||||||
|
The library loads models in a straightforward in-memory format that can be easily read and processed by applications.
|
||||||
|
Various post processing steps can be executed on the imported data to optimize it for a particular purpose.
|
||||||
|
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<author>ASSIMP Development Team</author>
|
||||||
|
<license>BSD</license>
|
||||||
|
<review status="3rdparty" notes=""/>
|
||||||
|
<url>http://assimp.sourceforge.net/</url>
|
||||||
|
<export>
|
||||||
|
<cpp cflags="-I${prefix}/include" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lassimp" />
|
||||||
|
<doxymaker external="http://assimp.sourceforge.net/main_doc.html"/>
|
||||||
|
</export>
|
||||||
|
</package>
|
Loading…
Reference in New Issue