- Removed OpenGL/Glut references in SimpleTexturedDirectX11 CMakeFile - Moved UTFConverter from SimpleTexturedOpenGL to its own file to be able to reuse it. - Added compile definition SHADER_PATH to allow to locate the shader files in CMakeFile - Fixed compile warnings - Made global pointers null to help prevent dangling references. - Added missing members initialization in class constructors. - Removed references to missing model "Models/mymodel.fbx" - Fixed error when extracting model file directory - Added missing device context assignment in ModelLoader Load method - Fixed memory leak caused by variable 'ourModel' not deleted. - Removed call to dev->Release() in ModelLoader.cpp - Adjusted Release() calls in reverse order when cleaning up D3D - Made Throwanerror implementation throw an error instead of displaying a message box - Fixed leaking D3D resources - Added a pointer to an ID3D11Debug to dump live objects.
50 lines
1.3 KiB
CMake
50 lines
1.3 KiB
CMake
FIND_PACKAGE(OpenGL)
|
|
FIND_PACKAGE(GLUT)
|
|
|
|
IF ( NOT GLUT_FOUND )
|
|
IF ( MSVC )
|
|
SET ( GLUT_FOUND 1 )
|
|
SET ( GLUT_INCLUDE_DIR ${Assimp_SOURCE_DIR}/samples/freeglut/ )
|
|
SET ( GLUT_LIBRARIES ${Assimp_SOURCE_DIR}/samples/freeglut/lib/freeglut.lib )
|
|
ELSE ()
|
|
MESSAGE( WARNING "Please install glut." )
|
|
ENDIF ()
|
|
ENDIF ()
|
|
|
|
if ( MSVC )
|
|
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
|
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
|
endif ()
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
${Assimp_SOURCE_DIR}/include
|
|
${Assimp_SOURCE_DIR}/code
|
|
${OPENGL_INCLUDE_DIR}
|
|
${GLUT_INCLUDE_DIR}
|
|
${SAMPLES_SHARED_CODE_DIR}
|
|
)
|
|
|
|
LINK_DIRECTORIES(
|
|
${Assimp_BINARY_DIR}
|
|
${Assimp_BINARY_DIR}/lib/
|
|
)
|
|
|
|
ADD_EXECUTABLE( assimp_simpletexturedogl WIN32
|
|
SimpleTexturedOpenGL/include/boost_includes.h
|
|
SimpleTexturedOpenGL/src/model_loading.cpp
|
|
${SAMPLES_SHARED_CODE_DIR}/UTFConverter.cpp
|
|
${SAMPLES_SHARED_CODE_DIR}/UTFConverter.h
|
|
)
|
|
|
|
SET_PROPERTY(TARGET assimp_simpletexturedogl PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
|
|
|
TARGET_LINK_LIBRARIES( assimp_simpletexturedogl assimp ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} )
|
|
|
|
SET_TARGET_PROPERTIES( assimp_simpletexturedogl PROPERTIES
|
|
OUTPUT_NAME assimp_simpletexturedogl
|
|
)
|
|
|
|
INSTALL( TARGETS assimp_simpletexturedogl
|
|
DESTINATION "${ASSIMP_BIN_INSTALL_DIR}" COMPONENT assimp-dev
|
|
)
|