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 (
|
2015-05-19 03:44:54 +00:00
|
|
|
${Assimp_SOURCE_DIR}/include
|
|
|
|
${Assimp_SOURCE_DIR}/code
|
|
|
|
${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
|
2015-05-19 03:44:54 +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
|
|
|
|
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
|
|
|
)
|
|
|
|
|
2015-01-23 18:10:36 +00:00
|
|
|
SET_PROPERTY(TARGET assimp_viewer PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
2012-02-18 10:55:47 +00:00
|
|
|
|
2013-11-20 13:40:20 +00:00
|
|
|
|
|
|
|
IF ( MSVC )
|
2015-05-19 03:44:54 +00:00
|
|
|
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
|
|
|
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
2013-11-20 13:40:20 +00:00
|
|
|
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
|
|
|
#
|
2015-01-23 18:10:36 +00:00
|
|
|
ADD_CUSTOM_COMMAND(TARGET assimp_viewer
|
2015-05-19 03:44:54 +00:00
|
|
|
PRE_BUILD
|
|
|
|
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
|
2015-05-19 03:44:54 +00:00
|
|
|
DESTINATION "${ASSIMP_BIN_INSTALL_DIR}" COMPONENT assimp-dev
|
2012-07-17 22:56:15 +00:00
|
|
|
)
|