2014-05-10 08:31:42 +00:00
|
|
|
cmake_minimum_required( VERSION 2.6 )
|
2012-07-17 22:56:15 +00:00
|
|
|
|
2014-05-10 08:31:42 +00:00
|
|
|
FIND_PACKAGE(DirectX REQUIRED)
|
2013-09-18 11:52:49 +00:00
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES (
|
2010-03-03 22:07:59 +00:00
|
|
|
${Assimp_SOURCE_DIR}/include
|
|
|
|
${Assimp_SOURCE_DIR}/code
|
2012-07-17 22:56:15 +00:00
|
|
|
${DirectX_INCLUDE_DIR}
|
2009-04-18 00:10:16 +00:00
|
|
|
)
|
|
|
|
|
2013-09-18 11:52:49 +00:00
|
|
|
# Make sure the linker can find the Assimp library once it is built.
|
|
|
|
LINK_DIRECTORIES (${Assimp_BINARY_DIR} ${AssetImporter_BINARY_DIR}/lib)
|
2009-04-18 00:10:16 +00:00
|
|
|
|
2013-09-18 11:52:49 +00:00
|
|
|
ADD_EXECUTABLE( assimp_viewer WIN32
|
2009-04-18 00:10:16 +00:00
|
|
|
AnimEvaluator.cpp
|
|
|
|
Background.cpp
|
|
|
|
Display.cpp
|
|
|
|
HelpDialog.cpp
|
|
|
|
Input.cpp
|
|
|
|
LogDisplay.cpp
|
|
|
|
LogWindow.cpp
|
|
|
|
Material.cpp
|
|
|
|
MeshRenderer.cpp
|
|
|
|
MessageProc.cpp
|
|
|
|
Normals.cpp
|
|
|
|
SceneAnimator.cpp
|
|
|
|
Shaders.cpp
|
|
|
|
assimp_view.cpp
|
|
|
|
stdafx.cpp
|
2009-04-18 22:21:14 +00:00
|
|
|
assimp_view.rc
|
|
|
|
banner.bmp
|
|
|
|
banner_pure.bmp
|
|
|
|
base_anim.bmp
|
|
|
|
base_display.bmp
|
|
|
|
base_inter.bmp
|
|
|
|
base_rendering.bmp
|
|
|
|
base_stats.bmp
|
|
|
|
fx.bmp
|
|
|
|
n.bmp
|
|
|
|
root.bmp
|
|
|
|
tx.bmp
|
|
|
|
txi.bmp
|
2009-04-18 00:10:16 +00:00
|
|
|
)
|
|
|
|
|
2012-07-17 22:56:15 +00:00
|
|
|
SET_PROPERTY(TARGET assimp_viewer PROPERTY DEBUG_POSTFIX ${ASSIMP_DEBUG_POSTFIX})
|
2012-02-18 10:55:47 +00:00
|
|
|
|
2013-11-20 13:40:20 +00:00
|
|
|
|
|
|
|
IF ( MSVC )
|
|
|
|
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
|
|
|
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
|
|
|
ENDIF ( MSVC )
|
2013-09-18 12:10:26 +00:00
|
|
|
|
2009-04-18 00:10:16 +00:00
|
|
|
|
2013-09-18 11:52:49 +00:00
|
|
|
#
|
|
|
|
ADD_CUSTOM_COMMAND(TARGET assimp_viewer
|
|
|
|
PRE_BUILD
|
2013-09-18 12:42:42 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:assimp> $<TARGET_FILE_DIR:assimp_viewer>
|
|
|
|
MAIN_DEPENDENCY assimp)
|
2013-09-18 11:52:49 +00:00
|
|
|
|
|
|
|
# Link the executable to the assimp + dx libs.
|
2013-11-20 13:40:20 +00:00
|
|
|
TARGET_LINK_LIBRARIES ( assimp_viewer assimp ${DirectX_LIBRARY} ${DirectX_D3DX9_LIBRARY} comctl32.lib winmm.lib )
|
2009-04-18 00:10:16 +00:00
|
|
|
|
2012-02-18 10:55:47 +00:00
|
|
|
INSTALL( TARGETS assimp_viewer
|
2012-07-17 22:56:15 +00:00
|
|
|
DESTINATION "${ASSIMP_BIN_INSTALL_DIR}" COMPONENT assimp-dev
|
|
|
|
)
|