CMake: make assimp_view/assimp_cmd's file copying DEPEND on assimp.
parent
de03173e6d
commit
69acdabdef
|
@ -22,7 +22,8 @@ SET_PROPERTY(TARGET assimp_cmd PROPERTY DEBUG_POSTFIX ${ASSIMP_DEBUG_POSTFIX})
|
||||||
IF( WIN32 )
|
IF( WIN32 )
|
||||||
ADD_CUSTOM_COMMAND(TARGET assimp_cmd
|
ADD_CUSTOM_COMMAND(TARGET assimp_cmd
|
||||||
PRE_BUILD
|
PRE_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:assimp> $<TARGET_FILE_DIR:assimp_cmd>)
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:assimp> $<TARGET_FILE_DIR:assimp_cmd>
|
||||||
|
MAIN_DEPENDENCY assimp)
|
||||||
ENDIF( WIN32 )
|
ENDIF( WIN32 )
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES})
|
TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES})
|
||||||
|
|
|
@ -50,7 +50,8 @@ ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
||||||
#
|
#
|
||||||
ADD_CUSTOM_COMMAND(TARGET assimp_viewer
|
ADD_CUSTOM_COMMAND(TARGET assimp_viewer
|
||||||
PRE_BUILD
|
PRE_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:assimp> $<TARGET_FILE_DIR:assimp_viewer>)
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:assimp> $<TARGET_FILE_DIR:assimp_viewer>
|
||||||
|
MAIN_DEPENDENCY assimp)
|
||||||
|
|
||||||
# Link the executable to the assimp + dx libs.
|
# Link the executable to the assimp + dx libs.
|
||||||
TARGET_LINK_LIBRARIES ( assimp_viewer assimp ${DirectX_LIBRARY} ${DirectX_D3DX9_LIBRARY} comctl32.lib Winmm.lib )
|
TARGET_LINK_LIBRARIES ( assimp_viewer assimp ${DirectX_LIBRARY} ${DirectX_D3DX9_LIBRARY} comctl32.lib Winmm.lib )
|
||||||
|
|
Loading…
Reference in New Issue