CMakeLists.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Open Asset Import Library (assimp)
  2. # ----------------------------------------------------------------------
  3. #
  4. # Copyright (c) 2006-2022, 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 3.10 )
  39. INCLUDE_DIRECTORIES (
  40. ${Assimp_SOURCE_DIR}/include
  41. ${Assimp_SOURCE_DIR}/code
  42. ${DirectX_INCLUDE_DIR}
  43. )
  44. # Make sure the linker can find the Assimp library once it is built.
  45. LINK_DIRECTORIES (${Assimp_BINARY_DIR} ${AssetImporter_BINARY_DIR}/lib)
  46. ADD_EXECUTABLE( assimp_viewer WIN32
  47. AnimEvaluator.cpp
  48. Background.cpp
  49. Display.cpp
  50. HelpDialog.cpp
  51. Input.cpp
  52. LogDisplay.cpp
  53. LogWindow.cpp
  54. Material.cpp
  55. MeshRenderer.cpp
  56. MessageProc.cpp
  57. Normals.cpp
  58. SceneAnimator.cpp
  59. Shaders.cpp
  60. assimp_view.h
  61. AnimEvaluator.h
  62. SceneAnimator.h
  63. MaterialManager.h
  64. AssetHelper.h
  65. assimp_view.cpp
  66. stdafx.cpp
  67. assimp_view.rc
  68. banner.bmp
  69. banner_pure.bmp
  70. base_anim.bmp
  71. base_display.bmp
  72. base_inter.bmp
  73. base_rendering.bmp
  74. base_stats.bmp
  75. fx.bmp
  76. n.bmp
  77. root.bmp
  78. tx.bmp
  79. txi.bmp
  80. )
  81. TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp_viewer)
  82. SET_PROPERTY(TARGET assimp_viewer PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
  83. IF ( MSVC )
  84. ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
  85. ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
  86. # assimp_viewer is ANSI (MBCS) throughout
  87. REMOVE_DEFINITIONS( -DUNICODE -D_UNICODE )
  88. ENDIF ()
  89. # Link the executable to the assimp + dx libs.
  90. TARGET_LINK_LIBRARIES ( assimp_viewer assimp ${DirectX_LIBRARY} ${DirectX_D3DX9_LIBRARY} comctl32 winmm )
  91. INSTALL( TARGETS assimp_viewer
  92. DESTINATION "${ASSIMP_BIN_INSTALL_DIR}" COMPONENT assimp-dev
  93. )