- Add cmake buildfile for unitests ( currently no cppunit is part of the makefile ).

- Add cmake buildfile for assimp_cmd application.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@463 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
kimmi 2009-08-02 20:53:30 +00:00
parent af725fd545
commit 82bb2313f0
3 changed files with 220 additions and 1 deletions

View File

@ -13,7 +13,8 @@ SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/bin )
# Libs
add_subdirectory( code/ )
add_subdirectory( test/ )
add_subdirectory( tools/assimp_cmd/ )
IF( WIN32 )
add_subdirectory( tools/assimp_view/ )
ENDIF( WIN32 )

142
test/CMakeLists.txt 100644
View File

@ -0,0 +1,142 @@
include_directories (
${AssetImporter_SOURCE_DIR}/include
${AssetImporter_SOURCE_DIR}/code
)
# Make sure the linker can find the Hello library once it is built.
link_directories (${AssetImporter_BINARY_DIR} ${AssetImporter_BINARY_DIR}/lib)
SOURCE_GROUP( unit FILES
unit/CCompilerTest.c
unit/BoostWorkaround/tupletest.cpp
)
SOURCE_GROUP( tests FILES
unit/Main.cpp
unit/UnitTestPCH.cpp
unit/UnitTestPCH.h
unit/utFindDegenerates.cpp
unit/utFindDegenerates.h
unit/utFindInvalidData.cpp
unit/utFindInvalidData.h
unit/utFixInfacingNormals.cpp
unit/utGenNormals.cpp
unit/utGenNormals.h
unit/utImporter.cpp
unit/utImporter.h
unit/utImproveCacheLocality.cpp
unit/utJoinVertices.cpp
unit/utJoinVertices.h
unit/utLimitBoneWeights.cpp
unit/utLimitBoneWeights.h
unit/utMaterialSystem.cpp
unit/utMaterialSystem.h
unit/utPretransformVertices.cpp
unit/utPretransformVertices.h
unit/utRemoveComments.cpp
unit/utRemoveComments.h
unit/utRemoveComponent.cpp
unit/utRemoveComponent.h
unit/utRemoveRedundantMaterials.cpp
unit/utRemoveRedundantMaterials.h
unit/utScenePreprocessor.cpp
unit/utScenePreprocessor.h
unit/utSharedPPData.cpp
unit/utSharedPPData.h
unit/utSortByPType.cpp
unit/utSortByPType.h
unit/utSplitLargeMeshes.cpp
unit/utSplitLargeMeshes.h
unit/utTargetAnimation.cpp
unit/utTargetAnimation.h
unit/utTextureTransform.cpp
unit/utTriangulate.cpp
unit/utTriangulate.h
unit/utVertexTriangleAdjacency.cpp
unit/utVertexTriangleAdjacency.h
)
add_executable( unit
unit/CCompilerTest.c
unit/Main.cpp
unit/UnitTestPCH.cpp
unit/UnitTestPCH.h
unit/utFindDegenerates.cpp
unit/utFindDegenerates.h
unit/utFindInvalidData.cpp
unit/utFindInvalidData.h
unit/utFixInfacingNormals.cpp
unit/utGenNormals.cpp
unit/utGenNormals.h
unit/utImporter.cpp
unit/utImporter.h
unit/utImproveCacheLocality.cpp
unit/utJoinVertices.cpp
unit/utJoinVertices.h
unit/utLimitBoneWeights.cpp
unit/utLimitBoneWeights.h
unit/utMaterialSystem.cpp
unit/utMaterialSystem.h
unit/utPretransformVertices.cpp
unit/utPretransformVertices.h
unit/utRemoveComments.cpp
unit/utRemoveComments.h
unit/utRemoveComponent.cpp
unit/utRemoveComponent.h
unit/utRemoveRedundantMaterials.cpp
unit/utRemoveRedundantMaterials.h
unit/utScenePreprocessor.cpp
unit/utScenePreprocessor.h
unit/utSharedPPData.cpp
unit/utSharedPPData.h
unit/utSortByPType.cpp
unit/utSortByPType.h
unit/utSplitLargeMeshes.cpp
unit/utSplitLargeMeshes.h
unit/utTargetAnimation.cpp
unit/utTargetAnimation.h
unit/utTextureTransform.cpp
unit/utTriangulate.cpp
unit/utTriangulate.h
unit/utVertexTriangleAdjacency.cpp
unit/utVertexTriangleAdjacency.h
unit/BoostWorkaround/tupletest.cpp
)
IF( WIN32 )
SET( PSDK_PATH "C:/Program Files/Microsoft Platform SDK/Bin" )
SET( PSDK_INC "C:/Program Files/Microsoft Platform SDK/Include" )
FIND_PATH(DX9_INCLUDE_PATH d3d9.h
PATHS
"$ENV{DXSDK_DIR}/Include"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK/Include"
DOC "The directory where D3D9.h resides")
FIND_LIBRARY(D3D9_LIBRARY d3d9.lib
PATHS
"$ENV{DXSDK_DIR}/Lib/x86"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK/Lib/x86"
DOC "The directory where d3d9.lib resides")
FIND_LIBRARY(D3DX9_LIBRARY d3dx9.lib
PATHS
"$ENV{DXSDK_DIR}/Lib/x86"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK/Lib/x86"
DOC "The directory where d3dx9.lib resides")
SET( DX9_LIBRARIES ${D3D9_LIBRARY} ${D3DX9_LIBRARY} )
FIND_LIBRARY( WIN32_COMCTRL comctl32.lib
PATHS
"C:/Programme/Microsoft Platform SDK for Windows Server 2003 R2/Lib"
DOC "Path to psdk"
)
ENDIF( WIN32 )
# Link the executable to the Hello library.
target_link_libraries ( unit assimp ${DX9_LIBRARIES} comctl32.lib Winmm.lib )

View File

@ -0,0 +1,76 @@
# Make sure the compiler can find include files from our Hello library.
include_directories (
${AssetImporter_SOURCE_DIR}/include
${AssetImporter_SOURCE_DIR}/code
)
# Make sure the linker can find the Hello library once it is built.
link_directories (${AssetImporter_BINARY_DIR} ${AssetImporter_BINARY_DIR}/lib)
# Add executable called "helloDemo" that is built from the source files
# "demo.cxx" and "demo_b.cxx". The extensions are automatically found.
add_executable( assimp_cmd
../../contrib/zlib/adler32.c
../../contrib/zlib/compress.c
../../contrib/zlib/crc32.c
../../contrib/zlib/crc32.h
../../contrib/zlib/deflate.c
../../contrib/zlib/deflate.h
../../contrib/zlib/inffast.c
../../contrib/zlib/inffast.h
../../contrib/zlib/inffixed.h
../../contrib/zlib/inflate.c
../../contrib/zlib/inflate.h
../../contrib/zlib/inftrees.c
../../contrib/zlib/inftrees.h
../../contrib/zlib/trees.c
../../contrib/zlib/trees.h
../../contrib/zlib/zconf.h
../../contrib/zlib/zconf.in.h
../../contrib/zlib/zlib.h
../../contrib/zlib/zutil.c
../../contrib/zlib/zutil.h
assimp_cmd.rc
CompareDump.cpp
ImageExtractor.cpp
Main.cpp
Main.h
resource.h
WriteDumb.cpp
)
IF( WIN32 )
SET( PSDK_PATH "C:/Program Files/Microsoft Platform SDK/Bin" )
SET( PSDK_INC "C:/Program Files/Microsoft Platform SDK/Include" )
FIND_PATH(DX9_INCLUDE_PATH d3d9.h
PATHS
"$ENV{DXSDK_DIR}/Include"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK/Include"
DOC "The directory where D3D9.h resides")
FIND_LIBRARY(D3D9_LIBRARY d3d9.lib
PATHS
"$ENV{DXSDK_DIR}/Lib/x86"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK/Lib/x86"
DOC "The directory where d3d9.lib resides")
FIND_LIBRARY(D3DX9_LIBRARY d3dx9.lib
PATHS
"$ENV{DXSDK_DIR}/Lib/x86"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK/Lib/x86"
DOC "The directory where d3dx9.lib resides")
SET( DX9_LIBRARIES ${D3D9_LIBRARY} ${D3DX9_LIBRARY} )
FIND_LIBRARY( WIN32_COMCTRL comctl32.lib
PATHS
"C:/Programme/Microsoft Platform SDK for Windows Server 2003 R2/Lib"
DOC "Path to psdk"
)
ENDIF( WIN32 )
# Link the executable to the Hello library.
target_link_libraries ( assimp_cmd assimp ${DX9_LIBRARIES} comctl32.lib Winmm.lib )