2019-11-15 19:52:13 +00:00
|
|
|
FIND_PACKAGE(DirectX)
|
|
|
|
|
|
|
|
IF ( MSVC )
|
|
|
|
SET(M_LIB)
|
2020-02-23 12:09:35 +00:00
|
|
|
ENDIF ()
|
2019-11-15 19:52:13 +00:00
|
|
|
|
|
|
|
if ( MSVC )
|
|
|
|
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
|
|
|
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
|
|
|
REMOVE_DEFINITIONS( -DUNICODE -D_UNICODE )
|
2020-02-23 12:09:35 +00:00
|
|
|
endif ()
|
2019-11-15 19:52:13 +00:00
|
|
|
|
2020-03-06 15:26:51 +00:00
|
|
|
ADD_COMPILE_DEFINITIONS(SHADER_PATH="${CMAKE_CURRENT_SOURCE_DIR}/SimpleTexturedDirectx11/")
|
|
|
|
|
2019-11-15 19:52:13 +00:00
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${Assimp_SOURCE_DIR}/include
|
|
|
|
${Assimp_SOURCE_DIR}/code
|
2020-03-06 15:26:51 +00:00
|
|
|
${SAMPLES_SHARED_CODE_DIR}
|
2019-11-15 19:52:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
LINK_DIRECTORIES(
|
|
|
|
${Assimp_BINARY_DIR}
|
|
|
|
${Assimp_BINARY_DIR}/lib
|
|
|
|
)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE( assimp_simpletextureddirectx11 WIN32
|
2021-07-29 11:28:51 +00:00
|
|
|
SimpleTexturedDirectx11/Mesh.h
|
2019-11-15 19:52:13 +00:00
|
|
|
SimpleTexturedDirectx11/ModelLoader.cpp
|
|
|
|
SimpleTexturedDirectx11/ModelLoader.h
|
|
|
|
#SimpleTexturedDirectx11/PixelShader.hlsl
|
|
|
|
SimpleTexturedDirectx11/TextureLoader.cpp
|
2021-07-29 11:28:51 +00:00
|
|
|
SimpleTexturedDirectx11/TextureLoader.h
|
|
|
|
#SimpleTexturedDirectx11/VertexShader.hlsl
|
2019-11-15 19:52:13 +00:00
|
|
|
SimpleTexturedDirectx11/main.cpp
|
2020-03-06 15:26:51 +00:00
|
|
|
SimpleTexturedDirectx11/SafeRelease.hpp
|
|
|
|
${SAMPLES_SHARED_CODE_DIR}/UTFConverter.cpp
|
|
|
|
${SAMPLES_SHARED_CODE_DIR}/UTFConverter.h
|
2019-11-15 19:52:13 +00:00
|
|
|
)
|
|
|
|
|
2020-08-07 20:04:39 +00:00
|
|
|
TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp_simpletextureddirectx11)
|
|
|
|
|
2019-11-15 19:52:13 +00:00
|
|
|
SET_PROPERTY(TARGET assimp_simpletextureddirectx11 PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
|
|
|
|
2020-03-10 17:47:10 +00:00
|
|
|
TARGET_LINK_LIBRARIES( assimp_simpletextureddirectx11 assimp comctl32.lib winmm.lib )
|
2019-11-15 19:52:13 +00:00
|
|
|
SET_TARGET_PROPERTIES( assimp_simpletextureddirectx11 PROPERTIES
|
|
|
|
OUTPUT_NAME assimp_simpletextureddirectx11
|
|
|
|
)
|
|
|
|
|
|
|
|
INSTALL( TARGETS assimp_simpletextureddirectx11
|
|
|
|
DESTINATION "${ASSIMP_BIN_INSTALL_DIR}" COMPONENT assimp-dev
|
|
|
|
)
|