CMakeLists.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # Open Asset Import Library (assimp)
  2. # ----------------------------------------------------------------------
  3. #
  4. # Copyright (c) 2006-2016, assimp team
  5. # All rights reserved.
  6. #
  7. # Redistribution and use of this software in source and binary forms,
  8. # with or without modification, are permitted provided that the
  9. # following conditions are met:
  10. #
  11. # * Redistributions of source code must retain the above
  12. # copyright notice, this list of conditions and the
  13. # following disclaimer.
  14. #
  15. # * Redistributions in binary form must reproduce the above
  16. # copyright notice, this list of conditions and the
  17. # following disclaimer in the documentation and/or other
  18. # materials provided with the distribution.
  19. #
  20. # * Neither the name of the assimp team, nor the names of its
  21. # contributors may be used to endorse or promote products
  22. # derived from this software without specific prior
  23. # written permission of the assimp team.
  24. #
  25. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  26. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  27. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  28. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  29. # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  30. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  31. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  32. # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  33. # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  34. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  35. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  36. #
  37. #----------------------------------------------------------------------
  38. cmake_minimum_required( VERSION 2.6 )
  39. #INCLUDE( AddGTest )
  40. INCLUDE_DIRECTORIES(
  41. ../contrib/gtest/include
  42. ../contrib/gtest/
  43. ${Assimp_SOURCE_DIR}/include
  44. ${Assimp_SOURCE_DIR}/code
  45. )
  46. # Add the temporary output directories to the library path to make sure the
  47. # Assimp library can be found, even if it is not installed system-wide yet.
  48. LINK_DIRECTORIES( ${Assimp_BINARY_DIR} ${AssetImporter_BINARY_DIR}/lib )
  49. SOURCE_GROUP( unit FILES
  50. unit/CCompilerTest.c
  51. )
  52. SET( TEST_SRCS
  53. unit/AssimpAPITest.cpp
  54. unit/utBlenderIntermediate.cpp
  55. unit/utBlendImportAreaLight.cpp
  56. unit/utBlendImportMaterials.cpp
  57. unit/utColladaExportCamera.cpp
  58. unit/utColladaExportLight.cpp
  59. unit/utDefaultIOStream.cpp
  60. unit/utFastAtof.cpp
  61. unit/utFindDegenerates.cpp
  62. unit/utFindInvalidData.cpp
  63. unit/utFixInfacingNormals.cpp
  64. unit/utGenNormals.cpp
  65. unit/utImporter.cpp
  66. unit/utImproveCacheLocality.cpp
  67. unit/utIOSystem.cpp
  68. unit/utIOStreamBuffer.cpp
  69. unit/utIssues.cpp
  70. unit/utJoinVertices.cpp
  71. unit/utLimitBoneWeights.cpp
  72. unit/utMaterialSystem.cpp
  73. unit/utMatrix3x3.cpp
  74. unit/utMatrix4x4.cpp
  75. unit/SceneDiffer.h
  76. unit/SceneDiffer.cpp
  77. unit/utObjImportExport.cpp
  78. unit/utPretransformVertices.cpp
  79. unit/utRemoveComments.cpp
  80. unit/utRemoveComponent.cpp
  81. unit/utRemoveRedundantMaterials.cpp
  82. unit/utScenePreprocessor.cpp
  83. unit/utSharedPPData.cpp
  84. unit/utStringUtils.cpp
  85. unit/utSortByPType.cpp
  86. unit/utSplitLargeMeshes.cpp
  87. unit/utTargetAnimation.cpp
  88. unit/utTextureTransform.cpp
  89. unit/utTriangulate.cpp
  90. unit/utVertexTriangleAdjacency.cpp
  91. unit/utVersion.cpp
  92. )
  93. SOURCE_GROUP( tests FILES ${TEST_SRCS} )
  94. add_executable( unit
  95. ../contrib/gtest/src/gtest-all.cc
  96. unit/CCompilerTest.c
  97. unit/Main.cpp
  98. ../code/Version.cpp
  99. ${TEST_SRCS}
  100. )
  101. add_definitions(-DASSIMP_TEST_MODELS_DIR="${CMAKE_CURRENT_LIST_DIR}/models")
  102. SET_PROPERTY( TARGET assimp PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} )
  103. IF( WIN32 )
  104. SET( platform_libs )
  105. ELSE( WIN32 )
  106. SET( platform_libs pthread )
  107. ENDIF( WIN32 )
  108. target_link_libraries( unit assimp ${platform_libs} )
  109. add_subdirectory(headercheck)